- (defun C:door ()
- (setvar "CMDECHO" 0)
- (setq oldos (getvar "OSMODE"))
- (setq pt1 (getpoint))
- (setq pt2 (getpoint pt1))
- (setq rad (+ (/ pi 2) (angle pt1 pt2)))
- (setq pt3 (polar pt1 rad 800))
- (setq pt4 (polar pt2 rad 800))
- (setq pt5 (polar pt1 rad 400))
- (setq pt6 (polar pt2 rad 400))
- (setvar "OSMODE" 0)
- (command "line" pt1 pt2 "")
- (setq b1 (entlast))
- (command "line" pt3 pt4 "")
- (setq b2 (entlast))
- (command "trim" b1 b2 "" pt5 pt6 "")
- (setvar "OSMODE" oldos)
- (setvar "CMDECHO" 1)
- (prin1)
- )
|