Page 1 of 1

Drawing arcs in CADPolyLine manually

Posted: 30 Apr 2008, 19:35
by thomascheah
If I want to draw the arc of a CADPolyLine manually, how would I do that?

I found that the Vertex3D of CADPolyLine.Vertexes property has a Bulge property that determine the arc roundedness. How do I translate this property (and other relevant properties of Vertex3D) to the parameters of DrawArc method in .NET?

Thanks!

Re: Drawing arcs in CADPolyLine manually

Posted: 05 May 2008, 11:55
by thomascheah
Hmm... nobody has any ideas on this? Or no one understands what I am talking about? :)

I am curious how does CAD Import.NET inteprete the Vertex3D properties CADPolyLine.Vertexes property to draw arcs.

Re: Drawing arcs in CADPolyLine manually

Posted: 06 May 2008, 09:32
by support
Hi,

CADPolyLine is already split to a set of points which allow to draw it taking into account its line type.

CADPolyLine.dottedSingPts - contains a list of points to which polyline is split. It is necessary to take pairs of these points to draw polyline's segments and they can draw a CADPolyLine entity with all its lines and arcs.
I am curious how does CAD Import.NET inteprete the Vertex3D properties CADPolyLine.Vertexes property to draw arcs.
It is closed information. It can't be discovered.

Sergey.

Re: Drawing arcs in CADPolyLine manually

Posted: 06 May 2008, 11:14
by thomascheah
Thanks Sergey! I know about the DottedSingPts property, but that's a less than my ideal way as it is still a finite set points that are pre-splitted by the library. What I want is to able to interprete the attributes of CADPolyLine manually so that I can decide how to split it myself at different resolutions to produce arcs of different smoothness under various modes in my application. Also, that allows me to perform various geometric compuation that is not available under CAD Import library.

Having said that, I don't mean you should expose CAD Import.NET source code here. As long as you can let me know how to inteprete various attributes of Vertex3D of CADPolyLine.Vertexes property related to an arc shape mathematically, that's all I am asking for. I just thought if you can let me know how the attributes of Vertex3D can be mapped to the parameters of DrawArc method in .NET, that be the easiest way for me to understand, and also others that keen to know.

Re: Drawing arcs in CADPolyLine manually

Posted: 07 May 2008, 15:05
by support
Hi Thomas,

The only information we can share with you can be found in official documentation from Autodesk - DXF Reference:
ENTITIES Section -> VERTEX -> Group code 42:

Bulge (optional; default is 0). The bulge is the tangent of one fourth the included angle for an arc segment, made negative if the arc goes clockwise from the start point to the endpoint. A bulge of 0 indicates a straight segment, and a bulge of 1 is a semicircle.

Sergey.

Re: Drawing arcs in CADPolyLine manually

Posted: 27 Mar 2009, 19:14
by francoas
Hi Sergey
The only information we can share with you can be found in official documentation from Autodesk - DXF Reference:
ENTITIES Section -> VERTEX -> Group code 42:

Bulge (optional; default is 0). The bulge is the tangent of one fourth the included angle for an arc segment, made negative if the arc goes clockwise from the start point to the endpoint. A bulge of 0 indicates a straight segment, and a bulge of 1 is a semicircle.
For a 3D polyline, given two 3D points in the space and a bulge, how dow I know which is the plane where the arc lies ?

Thanks

Franco

Re: Drawing arcs in CADPolyLine manually

Posted: 30 Mar 2009, 09:27
by support
Hello Franco,

AutoCAD ignores bulges for a 3D polyline. There is no sense to have bulges in a 3D polyline. It is necessary to check Z coordinate for given two 3D points to determine if they are in the same plane.

Sergey.

Re: Drawing arcs in CADPolyLine manually

Posted: 30 Mar 2009, 12:26
by francoas
Thanks, Sergey.

I asked that because your demo tools don't ignore the bulges in 3D.
I edited a 2D file with bulges inserting Z coordinates (tag 30) and the viewer had unexpected results.

Bye.

Franco

Re: Drawing arcs in CADPolyLine manually

Posted: 30 Mar 2009, 16:11
by support
Hello Franco,
francoas wrote: I asked that because your demo tools don't ignore the bulges in 3D.
I edited a 2D file with bulges inserting Z coordinates (tag 30) and the viewer had unexpected results.
this is incorrect behaviour in the demo. It will be fixed in future.

The base is:
3D polyline should not containg bulges.
2D polilne (LWPolyline) has bulges but it does not support Z coordinate.

Sergey.