类似功能,单线PL线转闭合的PL钱
居然还在用vba,难得啊 (defun c:HLX()
(setvar "cmdecho" 0)
(setvar "osmode" 0)
(while (and (setq D1 (getdist "\n第1段距离:"))
(setq D2 (getdist "\n第2段距离:"))
(setq kd (getdist "\n宽度:"))
(setq p1 (getpoint "\n指定第1点:"))
)
(if (= (setq jd (getangle "\n角度<90>:")) nil)
(setq jd (* 0.5 pi))
)
(setq p2 (mapcar '+ p1 (list 0 D1 0)))
(setq ang (+ (angle p2 p1) jd))
(setq p3 (polar p2 ang D2))
(setq p6 (mapcar '+ p1 (list kd 0 0)))
(setq p4 (polar p3 (- ang (* 0.5 pi)) kd))
(setq p51 (polar p4 ang -50000))
(setq p52 (mapcar '+ p6 (list 0 50000 0)))
(if (setq p5 (inters p6 p52 p4 p51))
(command "_pline" p1 p2 p3 p4 p5 p6 "c")
)
)
(princ)
) yshf 发表于 2020-12-9 22:53
(defun c:HLX()
(setvar "cmdecho" 0)
(setvar "osmode" 0)
谢谢长老,基本功能已经实现,但是操作步骤和用ML或者PL画似乎差不多。如果点1输入距离再点2输入距离(方向跟随鼠标)角度和宽度设置为默认值90和60就行,那样就完美了。 封口勾上就把端头连起来了
凨仴黯夜 发表于 2020-12-11 00:08
封口勾上就把端头连起来了
这方法也不错。之前没注意到样式修改。谢谢
页:
1
[2]