(car (entsel)) Posted October 4, 2016 Share Posted October 4, 2016 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? Quote Link to comment Share on other sites More sharing options...
marko_ribar Posted October 4, 2016 Share Posted October 4, 2016 (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. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted October 4, 2016 Share Posted October 4, 2016 An example. Quote Link to comment Share on other sites More sharing options...
(car (entsel)) Posted October 4, 2016 Author Share Posted October 4, 2016 (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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.