非现场圈焊fqh
(defun c:fqh()(setq p1 (getpoint "\n焊缝位置:"))
(Setq p2 (getpoint "\n基线位置:"))
(Setq z$ (getstring "\n焊缝高度:"))
(if (> (car p2) (car p1)) (setq p3 (polar p2 0 20))
(setq p3 (polar p2 pi 20))
)
(if (> (car p2) (car p1)) (setq p4 (list (+ (car p2) 15) (+ (cadr p2) 3)))
(setq p4 (list (- (car p2) 8) (+ (cadr p2) 3)))
)
(setq p5 (list (car p4) (- (cadr p4) 3)))
(setq p7 (list (+ (car p5) 3) (cadr p5)))
(setq p8 (list (- (car p5) 5.5) (+ (cadr p2) 1.2)))
(setq ang (angle p1 p2))
(setq p9 (polar p1 ang 4))
(setq p10 (list (- (car p8) 4) (+ (cadr p8) 1.5)))
(command "line" p1 p2 p3 "")
(command "line" p4 p5 "")
(command "line" p4 p7 "")
(command "pline" p1 "w" "0" "0.8" p9 "")
(command "circle" p10 "1.5")
(command "text" p8 "4" "0" z$ "")
)
页:
[1]