I use a program to convert ellipses into plines, but this program does not do a good job with elliptical arcs. Infact it just makes them a full ellipse instead of the arc it is supposed to be. MAybe there is a way to either trim or break this ellipse back into its originally looking arc but still be a pline. I will post the code and if you want you can test it yourself to better explain what i have written. Just draw an elliptical arc in autocad and run the program and you will see what i mean. All help is appreciated.
(defun e2p( /
old new ;existent and new polyline
sav ;store system variables
cen ;center of ellipse
dep ;axis end point deplacement (relative to cen)
p1 p2 ;first axis enpoints
p3 ;sec. axis endpoint
ellObjs ; added
numObjs ; added
count ; added
)
(setq ellObjs (ssget "x" '((0 . "ELLIPSE"))))
(if ellObjs
(progn
(setq numOjbs (sslength ellObjs)
count 0
)
(while (> numOjbs count)
(setq old (cdr (assoc -1 (entget (ssname ellObjs count)))))
(setq sav (mapcar 'getvar '("PELLIPSE" "OSMODE" "UCSICON"))
cen (cdr (assoc 10 (entget old)))
dep (cdr (assoc 11 (entget old))))
(mapcar 'setvar '("PELLIPSE" "OSMODE" "UCSICON") '(1 0 0))
(command "UCS" "e" old)
(setq p1 (trans (list (+ (car cen) (car dep))
(+ (cadr cen) (cadr dep))
(+ (caddr cen) (caddr dep)))
0 1)
p2 (trans (list (- (car cen) (car dep))
(- (cadr cen) (cadr dep))
(- (caddr cen) (caddr dep)))
0 1)
p3 (trans (polar cen
(+ (/ PI 2.0) (angle p1 p2))
(* 0.5 (cdr (assoc 40 (entget old))) (distance p1 p2)))
0 1)
)
(command "ellipse" p1 p2 p3)
(command "_.chprop" old "" "la" "0" "")
(setq new (entget (entlast))
new (subst (cons 8 (cdr (assoc 8 (entget old)))) (assoc 8 new) new))
(entmod new)
(entdel old)
(command "ucs" "p")
(mapcar 'setvar '("PELLIPSE" "OSMODE" "UCSICON") sav)
(setq count (1+ count))
); while
); progn
); if
(princ)
);; end of program