- (defun c:MH (/ pa pb ww p1 p2)
- (setq pa (getpoint "请输入开始点: "))
- (setq pb (getpoint "请输入终止点: "))
- (setq ww (getreal "\n请输入螺纹大小M(6,8,10,12,14): "))
- (if (= ww nil) (setq ww 6))
- (setq ang (angle pa pb))
- (setq p1 (polar pa (+ (/ pi 2) ang) (/ ww 2)))
- (setq p2 (polar pb (+ (/ pi 2) ang) (/ ww 2)))
- (command "line" "non" pa "non" pb "" )
- (command "line" "non" p1 "non" p2 "" )
- (command "mirror" "L" "" "non" pa "non" pb "")
- (princ)
- )
|