- (defun C:qs (/ pt pt1 pt2 pt3 pt4 pt5)
- (setq os (getvar 'osmode));备份捕捉
- (setq cmd (getvar 'cmdecho));备份回显
- (mapcar 'setvar (list 'osmode 'cmdecho) '(0 0));设置捕捉为零,关闭回显
- (setvar "blipmode" 0);关闭点标记
- (setq pt1 (getpoint "第一点:"))
- (setq pt2 (getpoint "第二点:"))
- (setq pt (getpoint "第三点:"))
-
- (setq ptangle (angle pt1 pt2)
- ptn (polar pt (+ (* 0.5 pi) ptangle) 0.01)
- jptx (inters pt ptn pt1 pt2 nil)
- dist (distance pt jptx)
- )
- (setq pt4 (polar pt1 (+ (* 0.5 pi) ptangle) dist))
- (setq pt5 (polar pt2 (+ (* 0.5 pi) ptangle) dist))
- (command "pline" pt5 pt4 "")
-
- (mapcar 'setvar (list 'osmode 'cmdecho) (list os cmd));恢复捕捉,打开回显
- (princ)
-
- )
|