Jump to content

3d Arc using acbd3dpolyline


dnyandevp

Recommended Posts

In my code there is previous condition to draw polyline Arc. Which are handled as shown bellow,

1 . Getting three points

eg. Pt1, pt2, pt3 (which are 2d points).

2 . creating object of AcGeCircArc2d.

Eg. AcGeCircArc2d* arc2D = new AcGeCircArc2d();

3 . set three points to AcgeCircArc2d.

Eg. arc2D>set(Pt1, pt2, pt3 , error);

4. Angles of arc , direction and bulge is calculated shown bellow

double fStartAngle = arc2D->startAng();

double fEndAngle = arc2D->endAng();

int nClockWise = arc2D->isClockWise(); //

fBulge = tan((fEndAngle - fStartAngle ) / 4);

5 . At last bulge and vertex is added to acDbPolyline

AcDbPolyline *pPolyLine

pPolyLine->addVertexAt(pPolyLine->numVerts(),Pt1 ,(nClockWise ? -fBulge : fBulge);

pPolyLine->addVertexAt(pPolyLine->numVerts(),pt3);

By using abouve code Arc is drawn using acdbPolyline (2D Vertex).

But I want to draw same arc by using acDb3dPolyline. I found that there method is not available to set bulge to acdb3dpolylineVertex . Is there any way to draw arc by using acbd3dPolyline.

 

Please help...

Link to comment
Share on other sites

The AcDb3dPolyline entity does not support Bulge/Arcs.

 

One workaround would be to segment an arc with some quantity of line segments.

 

Another option – given that you are using unmanaged code – would be to create your own custom entity that supports 3d segments and arcs. The docs warn against deriving from AcDb3DPolyline, but you may be able to simulate the proper graphics from the spline entity.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...