# Thread: Convert Ellipse to Arc

1. ## Convert Ellipse to Arc

Registered forum members do not see this ad.

I have been trying to figure this out for a couple of days now. The only thing I could find is this LISP that takes the Ellipse properties and uses them to creat an arc.

When I use this, the start and end angles are not correct in the drawing. Ellipses must have been drawn in a different UCS).

I have tried to get the LISP to use the start and end points of the ellipse along with the radius and center point. For the life of me I cannot figure it out. If anyone knows how to do this please let me know.

*NOTE* Elllipses that I am trying to convert have the same minor and major radii.

Thanks in advance!!

Code:
```
(defun c:e2a (/ acaddoc acadms acadobj center endangle obj radius ss ssn startangle)
(vl-load-com)
(if
(setq ss (ssget '((0 . "ellipse"))))
(progn
(setq acadobj (vlax-get-acad-object))
(setq acaddoc (vla-get-activeDocument acadobj))
(setq acadms (vla-get-modelspace acaddoc))
(setq ssn (ssname ss 0))
(setq obj (vlax-ename->vla-object ssn))
(if
obj ;(equal (vla-get-RadiusRatio obj) 1 0.0001)
(progn
(setq radius (vla-get-MajorRadius obj))
(setq Startangle (vla-get-Startangle obj))
(setq Endangle (vla-get-Endangle obj))
(setq Center (vlax-get obj 'center))
(entdel ssn)
(vla-addarc acadms (vlax-3d-point Center) radius Startangle Endangle)
) ; progn
(alert "> Ellipse objects failed to be converted")
)   ; if
)     ; progn
)       ; if
(princ)
)       ; defun```

2. I am not sure that getting an arc from ellipse is possible. The arc is part of a circle.
The equation of a circle is (X-X1)^2 + (Y-Y1)^2=R^2.
The equation of an ellipse is (X^2)/(A^2) + (Y^2)/(B^2) = 1

It seems that an arc and an ellipse can only have common graphics if A = B which makes the ellipse circle....

3. Registered forum members do not see this ad.

The ellipse that I am lloking to replace with an arc has the same major and minor radii, therefore it is an arc. If we use the start and end points as well as the radius, we can construct an arc.

Lee Mac helped me out with a LISP program that works wonders!!

http://www.cadtutor.net/forum/showth...Ellipse-to-Arc

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts