Jump to content

entmake xline, vector argument


(car (entsel))

Recommended Posts

Hello, I'm trying to entmake xline by specifying 2 points.

But the (xline) subfunction, created by Lee Mac expects point and vector, how do I calculate it from the 2 points I specify?

Link to comment
Share on other sites

(mapcar '- pt2 pt1)

 

But I think you need unit vector, so :

(mapcar '/ (mapcar '- pt2 pt1) (list (distance pt1 pt2) (distance pt1 pt2) (distance pt1 pt2)))

 

HTH, M.R.

Link to comment
Share on other sites

(mapcar '- pt2 pt1)

 

But I think you need unit vector, so :

(mapcar '/ (mapcar '- pt2 pt1) (list (distance pt1 pt2) (distance pt1 pt2) (distance pt1 pt2)))

 

HTH, M.R.

 

Thank you mr.Ribar, the second example with unit vector worked!

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...