(car (entsel)) 发表于 2022-7-5 17:09:48

entmake xline, vector argument

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?

marko_ribar 发表于 2022-7-5 17:30:47

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

Lee Mac 发表于 2022-7-5 18:04:15

An example.

(car (entsel)) 发表于 2022-7-5 18:28:51

 
Thank you mr.Ribar, the second example with unit vector worked!
页: [1]
查看完整版本: entmake xline, vector argument