以下程序为拉筋绘制程序,以两个点筋为基准点,但问题是绘制后的拉筋的弯钩中心和点筋中心不重合,求牛人修改,谢!如不方便告知,可将源程序传至QQ:41490442。有酬谢!(defun c:wj () (sn) (setq os (getvar "osmode")) (command "_layer" "_n" "_钢筋" "_c" "13" "_钢筋" "_s" "_钢筋" "") (setq pt1 (getpoint "\nEnter start point "))
(defun c:wj ()
(sn)
(setq os (getvar "osmode"))
(command "_layer" "_n" "_钢筋" "_c" "13" "_钢筋" "_s" "_钢筋" "")
(setq pt1 (getpoint "\nEnter start point "))
(setq pt2 (getpoint pt1 "\nEnter end point "))
(setq ang (angle pt1 pt2))
(setq p1 (polar pt1 (+ ang (dtr 90)) 150)
spt (polar p1 ang 120)
p2 (polar pt2 (+ ang (dtr 90)) 150)
ept (polar p2 (+ ang (dtr 180)) 120)
)
(setvar "osmode" 0)
(command "pline" spt "w" "45" "" p1 "a" pt1 "l" pt2 "a" p2 "l" ept "")
(setvar "osmode" os)
(snen)
)
(princ)