(defun c:tt ()
"tt(两端画线)"
(defun abc (s1 / p1 p2 r1 r2 l1 l2)
(setq p1 (vlax-curve-getStartPoint s1)
p2 (vlax-curve-getEndPoint s1)
)
(if (not (equal p1 p2 1e-3))
(setq r1 (xyp-AngleAtPoint s1 p1)
r2 (xyp-AngleAtPoint s1 p2)
l1 (xyp-Line p1 (polar p1 r1 (- dd)))
l2 (xyp-Line p2 (polar p2 r2 dd))
)
)
)
(setq dd (Udist 7 "" "线长<输入或鼠标直接量取>" dd nil))
(setq i -1)
(if (setq ss (ssget '((0 . "*line,arc"))))
(while (setq s1 (ssname ss (setq i (1+ i))))
(abc s1)
)
)
(princ)
)
kozmosovia 发表于 2024-10-17 20:26
任意曲线的,拐弯也不怕,端点曲线也相切
写的真好!!!!牛逼 飞雪神光 发表于 2024-10-17 19:21
谢谢大佬,这就是我要的
页:
1
[2]