Hi.
I need some help.
I am trying to write arc of ellipses using the DXFExport.net.
Using the DXFData structure, I fill
- point
- point1
- radius
- startAngle
- endAngle
and then I call AddElipse
On the file all data are written BUT the angles with the result that instead of writing an arc, i write an entire ellipse.
Can you help me ?
Franco
Ellipse's arc - DXFExport.NET
Moderators: SDS, support, admin
Hello!
The following example is based on <b>DXF Export Demo</b> from <b>DXF Export .NET</b> package (available at: http://www.cadsofttools.com/download/dxfexportnet.zip):<b>Important</b>: Data.startAngle and Data.endAngle are radians.
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
The following example is based on <b>DXF Export Demo</b> from <b>DXF Export .NET</b> package (available at: http://www.cadsofttools.com/download/dxfexportnet.zip):
Code: Select all
<font color="blue">private void</font id="blue"> AddEllipticArc_Click(<font color="blue">object</font id="blue"> sender, System.EventArgs e)
{
DXFExport vDXF = <font color="blue">new</font id="blue"> DXFExport();
vDXF.AddLType("_DASH",<font color="blue">new float</font id="blue">[]{5,-2});
DXFData Data = <font color="blue">new</font id="blue"> DXFData();
Data.Clear();
Data.color = DXFExport.ColorToDXF(Color.Green);
Data.text = "_DASH";
Data.thickness = 3;
Data.point.X = 0;
Data.point.Y = 0;
Data.point1.X = 50;
Data.point1.Y = 40;
Data.selfType = (<font color="blue">byte</font id="blue">)ArcType.atEllipse;
Data.radius = (<font color="blue">float</font id="blue">)0.3;
Data.startAngle = (<font color="blue">float</font id="blue">)0.0;
Data.endAngle = (<font color="blue">float</font id="blue">)1.3;
vDXF.AddArc(Data);
vDXF.SaveToFile("c:\\AddArc.dxf");
}
Sergey.
Please post questions to the forum or write to support@cadsofttools.com