- (DEFUN C:HF ()
- (CMDLA0)
- (setvar "PICKSTYLE" 3)
- (xyp-initSet '(z) '(10))
- (setq p1 (getpoint "\n焊缝起始点: " )
- p2 (getpoint p1 "\n焊缝结束点: " )
- z (UREAL 7 "" "焊缝尺寸<弧半径>大小" z)
- ss1 (ssget "x" )
- );end setq p1
- (Setvar "osmode" 0)
- (setq p3 (polar p1 (angle p1 p2) (* 2 z)))
- (command "arc" p1 "e" p3 "a" 180)
- (setq p4 (polar p3 (- (angle p1 p2) (* 120 (/ PI 180))) Z)
- n (fix (- (/ (distance p1 p2) z) 2))
- );end setq p4
- (command "arc" p4 "c" p3 "a" 120)
- (setvar "snapang" (angle p1 p2))
- (command "array" "last" "" "r" "" n z)
- (setvar "snapang" 0)
- (setq ss2 (ssget "X" )
- ss (SSDIFF SS2 SS1)
- );end setq ss2
- (command "group" "" "*" "" ss "" )
- (CMDLA1)
- );end DEFUN
- ;好像是YXP的!!!
|