Line direction is slightly rotated, Can I make them parallel?

Here’s the wall line in dwg.

The problem is the lines, which I thought was supposed to be parallel, is actually not.

So, I imported it to revit, and have seen what’s going on

Like above, I made a code to rotate The lines that are slightly off the axis in the way they are supposed to.

The result is that, some of the vector are corrected, but the others not.

If you could help me with this, I would really appreciate. Thanks in advance :slight_smile:

Hello…could it help you to round your numbers by ceiling or floor rounds ??

These are floating point errors. Math.Round should resolve the issue.

If you’re really concerned about the accuracy, don’t be - you’d have to be measuring at the cellular level to have anything less than a rounding error as far as discrepancy goes.

Cocktail Napkin Math To Confirm

By applying a bit of trig we know that the tangent of 1/2 of your angle * your length is 1/2 of the separation between the points. So Tan(0.000000000118) * 44 * 2 is equal to the length of separation. Multiply that by 5280 feet per mile, and then multiply by 12 inches per foot and we get 0.000011483048936 inches of separation.

That is about 1/5 the length of a mitochondrion, so you’d have to be measuring at the cellular level to have an accuracy issue.

3 Likes

I’ve learned Revit recognize little gap between two elements, which cause the error when using [solid.byunion] node. That’s why I managed to figure it out.