TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Andrea on December 07, 2005, 03:11:22 PM
-
Hi all,
I'm trying to find where the Major Radius and Minor Radius comming from...
any idea ??
-
yes.
Select object: ; IAcadEllipse: AutoCAD Ellipse Interface
; Property values:
; Application (RO) = #<VLA-OBJECT IAcadApplication 00b9d604>
; Area (RO) = 28274.3
; Center = (937.04 703.597 0.0)
; Document (RO) = #<VLA-OBJECT IAcadDocument 01231f90>
; EndAngle = 6.28319
; EndParameter = 6.28319
; EndPoint (RO) = (1037.04 703.597 0.0)
; Handle (RO) = "10F"
; HasExtensionDictionary (RO) = 0
; Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 0618ede4>
; Layer = "0"
; Linetype = "ByLayer"
; LinetypeScale = 1.0
; Lineweight = -1
; MajorAxis = (100.0 0.0 0.0)
; MajorRadius = 100.0
; MinorAxis (RO) = (0.0 90.0 0.0)
; MinorRadius = 90.0
; Normal = (0.0 0.0 1.0)
; ObjectID (RO) = 2130161912
; ObjectName (RO) = "AcDbEllipse"
; OwnerID (RO) = 2130091256
; PlotStyleName = "ByLayer"
; RadiusRatio = 0.9
; StartAngle = 0.0
; StartParameter = 0.0
; StartPoint (RO) = (1037.04 703.597 0.0)
; TrueColor = #<VLA-OBJECT IAcadAcCmColor 0618ed70>
; Visible = -1
Select entity to display its DXF value data:
(-1 . <Entity name: 7ef7b0f8>)
(0 . "ELLIPSE")
(330 . <Entity name: 7ef69cf8>)
(5 . "10F")
(100 . "AcDbEntity")
(67 . 0)
(410 . "Model")
(8 . "0")
(100 . "AcDbEllipse")
(10 937.04 703.597 0.0)
(11 100.0 0.0 0.0)
(210 0.0 0.0 1.0)
(40 . 0.9)
(41 . 0.0)
(42 . 6.28319)
-
thanks...but this is not telling me where the Major and Minor radius comming from..
:|
-
As in how to draw an ellipse using major and minor?
-
thanks...but this is not telling me where the Major and Minor radius comming from..
:|
The information is there. He even marked the appropriate ActiveX property names and group codes in bold for you.
-
http://www.uwgb.edu/dutchs/MATHALGO/Ellipses.HTM
-
Also if you can, find the web site of master Paul Turvil, he has an specific routine for that....
-
thanks...but this is not telling me where the Major and Minor radius comming from..
:|
The information is there. He even marked the appropriate ActiveX property names and group codes in bold for you.
Nope Chuck ! sorry but he's just showing me the same result in diffrent way...
I need to know how the Major and minor coming from..
eg: Can I create the same ellipse with the same Major and Minor radius ?
if yes....how ?
:|
-
Andrea, can you create a circle using VLisp ActiveX ?
-
Andrea, can you create a circle using VLisp ActiveX ?
i'm better in lisp..but not expert..
why ?
-
OK, Can you draw a circle using DXF codes ?
.. ie with entmake ..
-
I cant wait around all day for you, so ..
(defun c:MakeCircle (/ doc mspace CenPt CenPt3d rad)
(setq doc (vla-get-activedocument (vlax-get-acad-object))
mspace (vla-get-modelspace doc)
CenPt3d (vlax-3d-point
(setq CenPt (getpoint "Specify center point: "))
)
rad (getdist "Specify Radius: " CenPt)
)
(vla-addcircle
mspace
CenPt3d
rad
)
)
(defun c:MakeEllipse (/ cenPt doc majoraxis
majorpt minorpt mspace ratio tmp
)
(setq doc (vla-get-activeDocument (vlax-get-acad-object))
mspace (vla-get-modelSpace doc)
CenPt (getpoint "Specify center point: ")
majorpt (getpoint "Specify endpoint of Major axis: " CenPt)
minorpt (getpoint "Specify endpoint of other axis: " CenPt)
)
;; swap if the major axis is smaller than the minor axis
(if (< (distance majorpt CenPt) (distance minorpt CenPt))
(setq tmp majorpt
majorpt minorpt
minorpt tmp
)
)
(setq majorAxis (list
(- (car majorpt) (car CenPt))
(- (cadr majorpt) (cadr CenPt))
)
ratio (/ (distance CenPt minorpt) (distance CenPt majorpt))
)
(vla-addEllipse
mspace
(vlax-3d-point CenPt)
(vlax-3d-point majorAxis)
ratio
)
)
-
thanks Kerry,..
But maybe I wasn't clear..
let me try a diffrent way...
is this image correct ?
if yes...
the Major and Minor value in the propreties dialog box do not seem to be right.
-
The Major axis is the longer axis, irrespective of rotation or orientation.
Google : first hit
http://www.mathwords.com/m/major_axis_ellipse.htm
-
If I remember correctly from my old geometry and drafting classes, the object Andrea shows in his illustration is an "isometric ellipse" rather than the true ellipse drawn by AutoCAD. The isometric ellipse is what was used as a shortcut when doing isometric views with a compass. I do not believe there is any portion of a true ellipse that is an arc segment.
That said, as for your original question, I have no idea what is meant by major and minor radii of an ellipse. I have only see them drawn by methods using Kerry's major and minor axis references.
-
See if this makes it an clearer
-
See if this makes it an clearer
GOD !! Kerry..your very good help !!
mucho gracias !!!!!
:roll:
-
My pleasure to be able to help.