TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: ItsNerfOrNothing on August 21, 2018, 09:35:05 AM
-
I have a list of points from a poly line that runs in the 0.0 direction & the Y value may or may not change.
When verifying the angle from said point to the next point I run into where the angle is equal to [ 360.0 or (*2.0 pi) ] instead of an angle of 0.0.
Is this a quirk ? or do I just need to make a check and convert the results to 0.0 ?
It only happens when the direction is 0.0
Thanks in advance for any suggestsions or ideas.
-
It's not a quirk, you should check and convert angle to 0.0...
-
Thanks ribarm
-
What does this return on your angle in question? (rem (getangle) pi)
-
I get "3.14159" = pi
-
I get "3.14159" = pi
Hmmm .. so your angle is not really 0.
(rem (* (+ pi pi) 0.999999999999) pi)
-
ronjonp, I see what your saying. thanks.
Just going to need to make a check with a fuzz of 1/4 of a deg.
these points are generated from a user selecting points on a drawing so I guess some inacuracies should be expected.
(if (equal (result angle) (* pi 2.0) 0.00436332)
0.0
(result angle)
)
Thanks again for the input, nice to see a different angle on something.
-
ronjonp, I see what your saying. thanks.
...
Thanks again for the input, nice to see a different angle on something.
I see what you did there ... punny :)