Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ellipse Entity: pb to read it in a DXF file.

Status
Not open for further replies.

jiperscam

Industrial
Dec 11, 2002
4
0
0
FR
Hello.

I use to import dxf files in my cad/cam software.
sometimes there is a bug and the ellipse is not correctly drawn, in the case where it is rotated, and it is not closed.
the default is the ellipse need to be mirrored by is major axis.
i tryed several methods, but always going back on this bug.
the last method used is the one given by Autodesk Doc. "dxf group codes".
So, if somebody could help me, it will be great.
thanks in advance.
 
Replies continue below

Recommended for you

Is the bug with your CADCAM software importing it incorrectly or is the ellipse in AutoCAD broken up also? Try reading the DXF into AutoCAD and see how the ellipse comes in.

BU
 
Yes, the bug is in my soft.
(This soft has been developped by myself, and is used as polystyrene cutting, it looks not gentle to give my web address here, if you want more infos please email me)
The problem is, using the Autodesk reading method, the result is sometimes wrong.
There is no error in the DXF file (unless sometimes the start and end parameter of the ellipse are not the sames as displayed in the properties window).
It seems, something is missing in Autodesk explanations, and perhaps the formula is incomplete.
In other words, what is the right formula to get an ellipse from DXF entitie group codes?
I know this question is far away from a good user, and could touch much better a developper...

Thanks to have taken time to read my post.

Note: when a no-closed ellipse is exported as DXF R12 (polyline), sometimes start and end segments are missing...
perhaps ther's a pb with ellipses?
 
I am not quite sure what you are looking for but here is the ellipse DXF code reference from Autodesk (let know if you were looking for something else):

Ellipse group codes
Group codes Description
100 Subclass marker (AcDbEllipse)
10 Center point (in WCS)
DXF: X value; APP: 3D point
20, 30 DXF: Y and Z values of center point (in WCS)
11 Endpoint of major axis, relative to the center (in WCS)
DXF: X value; APP: 3D point
21, 31 DXF: Y and Z values of endpoint of major axis, relative to the center (in WCS)
210 Extrusion direction (optional; default = 0, 0, 1)
DXF: X value; APP: 3D vector
220, 230 DXF: Y and Z values of extrusion direction (optional)
40 Ratio of minor axis to major axis
41 Start parameter (this value is 0.0 for a full ellipse)
42 End parameter (this value is 2pi for a full ellipse)


The group codes 41 and 42 are the start and end values for u in the equation describing the Parameter option of the ELLIPSE command (see the following topic, ELLIPSE Command's Parameter Option ). The magnitude of the codes 11,21,31 vector is equal to 1/2 of the major axis which is the a value in the equation. The point 10,20,30 is the c value in the equation. Knowing all these, we can calculate the b value to complete the equation.

 
Thank you, but I know this.

Autodesk not explains how to use precisely those informations, to create an ellipse.
The formula given just after the description you kindly send me, is not complete...

So, thanks a lot.
 
Status
Not open for further replies.
Back
Top