When working in different UCS's use TRANS to convert all the points to the WCS, then perform your calculations.![]()

Registered forum members do not see this ad.
I draw point using WCS. No I align WCS to some object and draw another point exactly at the same location where first point is drawn. Now in a lisp program I get the coordinates of the two points apply distance command to them display the disatance using alert command, it is show to be 0, but in an if statement when i check that condition, it does not work. Can anyone explain why the if statement is not working although the distance displayed between the point ( using alert ) is shown to be 0.
the reference code is
( setq dis( distance p1 p2 ) )
( if ( = 0 dis )
( alert "pts are same" )
)
When working in different UCS's use TRANS to convert all the points to the WCS, then perform your calculations.![]()
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
Registered forum members do not see this ad.
and when using reals / integers it is best to use (equal instead or (= .
It allow for some fuzz.....
Timothy Spangler
--theswamp--
Bookmarks