非现场双面围焊fsmwh
(defun c:fsmwh()(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 (polar p8 Pi 2))
(setq p11 (list (- (car p10) 3) (cadr p10)))
(setq p12 (list (car p11) (+ (cadr p11) 2.5)))
(setq p13 (list (car p10) (cadr p12)))
(command "line" p1 p2 p3 "")
(command "line" p4 p5 "")
(command "line" p4 p7 "")
(command "pline" p1 "w" "0" "0.8" p9 "")
(command "line" p10 p11 p12 p13 "")
(command "text" p8 "4" "0" z$ "")
)
页:
[1]