Bill_Myron Posted August 25, 2011 Posted August 25, 2011 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!! (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 Quote
Joro-- Posted August 26, 2011 Posted August 26, 2011 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.... Quote
Bill_Myron Posted August 26, 2011 Author Posted August 26, 2011 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/showthread.php?62173-Convert-Ellipse-to-Arc Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.