Jump to content

distance between points


salman

Recommended Posts

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" )

)

Link to comment
Share on other sites

and when using reals / integers it is best to use (equal instead or (= .

 

It allow for some fuzz.....

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...