这可能会有所帮助
- ;; This lisp breaks a two lines which cross each other
- (defun c:bc ()
- (setq scl (getvar "dimscale" ))
- (setq dis (* scl 0.052))
- (if
- (= "WASTE" name)
- (setq dist (* dis 1.5))
- (if
- (= "DUCT" name)
- (setq dist (* dis 1.5))
- (if
- (= "DUCT-RA" name)
- (setq dist (* dis 1.5))
- (setq dist (* dis 1.5))
- )))
- (setq lne (entsel "\nPick line to break:")) (terpri)
- (setq pnt (getpoint "\nPick break point:" )) (terpri)
- (setq pick (entget (car lne)))
- (setq pt1 (cdr (assoc 10 pick)))
- (setq pt2 (cdr (assoc 11 pick)))
- (setq a (angle pt1 pt2))
- (setq ang ( * a 57.3))
- (setq bpt1 (polar pnt a dis))
- (setq bpt2 (polar pnt (- a pi) dis))
- (command "break" lne "f" bpt1 bpt2 )
- )
|