;| FOCI.LSP -- Locate and mark the foci of AutoCAD ELLIPSE objects. (c) 1998 Tee Square Graphics. Creates a POINT object at each focus of each selected ELLIPSE; user may set point display mode (PDMODE) and size (PDSIZE) in accordance with personal preferences. Use the NODE Object Snap to select foci for purposes of dimensioning and other operations. |; (defun c:foci (/ ss i en c ep m a n h) (setq ss (ssget '((0 . "ELLIPSE"))) i 0) (while (and ss (< i (sslength ss))) (setq en (entget (ssname ss i)) c (cdr (assoc 10 en)) ep (cdr (assoc 11 en)) m (distance '(0 0 0) ep) a (angle '(0 0 0) ep) n (* m (cdr (assoc 40 en))) h (sqrt (- (* m m)(* n n))) i (1+ i)) (entmake (list '(0 . "POINT")(cons 10 (polar c a h)))) (entmake (list '(0 . "POINT")(cons 10 (polar c a (- h)))))) (princ) )