- (defun c:test( / ss i ent ents pt r pts pte os)
- (setq os (getvar "osmode"))
- (setvar "osmode" 0)
- (setq ss (ssget "x" '((0 . "CIRCLE") (-4 . "<or") (40 . 1.5) (40 . 2) (40 . 2.5) (40 . 3) (40 . 4) (-4 . "or>"))))
- (setq i 0)
- (while (< i (sslength ss))
- (setq ent (ssname ss i))
- (setq ents (entget ent))
- (setq pt (cdr (assoc 10 ents)))
- (setq r (cdr (assoc 40 ents)))
- (setq pts (polar pt (+ pi (/ pi 12)) r))
- (setq pte (polar pt (+ (/ (* pi 3) 2) (/ pi 12)) r))
- (command "_.break" (list ent pts) pte)
- (setq i (1+ i))
- )
- (setvar "osmode" os)
- (princ)
- )
|