|
Acad::ErrorStatus
addVertexAt(unsigned int index,
const AcGePoint2d& pt,
double bulge = 0.,
double startWidth = -1.,
double endWidth = -1);
index Input index (0 based) before which to insert the vertex
pt Input vertex location point
bulge Input bulge value for vertex // bulge = tan(1/4. * Angle)
startWidth Input start width for vertex
endWidth Input end width for vertex
//Sample
double dRadius = 1.;
double bulge = tan(1 / 4. * PI);
AcGePoint2d ptCenter(0,0);
AcDbPolyline * pLine=new AcDbPolyline;
AcGePoint2d sPt = ptCenter;
AcGePoint2d ePt = sPt;
sPt.x -= dRadius / 2.;
pLine->addVertexAt(0,sPt,bulge ,dRadius ,dRadius );
ePt.x += dRadius / 2.;
pLine->addVertexAt(1,ePt,bulge ,dRadius ,dRadius );
pLine->addVertexAt(2,sPt,bulge ,dRadius ,dRadius ); |
|