zhd81617 发表于 2007-12-30 15:12

非现场双面角焊缝fsmjh

(defun c:fsmjh()
   (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) 13) (+ (cadr p2) 3)))
       (setq p4 (list (- (car p2) 8) (+ (cadr p2) 3)))
   )
   (setq p5 (list (car p4) (- (cadr p4) 3)))
   (setq p6 (list (car p5) (- (cadr p5) 3)))
   (setq p7 (list (+ (car p5) 3) (cadr p5)))
   (setq p8 (list (- (car p5) 8) (+ (cadr p2) 1.2)))
   (setq ang (angle p1 p2))
   (setq p9 (polar p1 ang 4))
   (command "line" p1 p2 p3 "")
   (command "line" p4 p6 "")
   (command "line" p4 p7 p6 "")
   (command "pline" p1 "w" "0" "0.8" p9 "")
   (command "text" p8 "4" "0" z$ "")
)
页: [1]
查看完整版本: 非现场双面角焊缝fsmjh