Hello,
Can you help me please.
I'm trying to create polygon with dxflib.
But unfortunately it does not work: (
Maybe you have an outtake from the Sourse code?
Moderator: andrew
DL_Dxf dxf;
...
dxf.writePolyline(
<DL_WriterA instance>,
DL_PolylineData(
<number of segments>,
0, 0,
<true for closed polyline, false for open polylines>
),
<DL_Attributes instance>
);
// for every vertex in the polyline:
dxf.writeVertex(
<DL_WriterA instance>,
DL_VertexData(
<vertex position X>, <vertex position Y>, <vertex position Z>,
<vertex bulge, always 0.0 for straight segments>
)
);
dxf.writePolylineEnd(<DL_WriterA instance>);
andrew wrote:I assume you mean to write a polyline entity to a DXF file:
- Code: Select all
DL_Dxf dxf;
...
dxf.writePolyline(
<DL_WriterA instance>,
DL_PolylineData(
<number of segments>,
0, 0,
<true for closed polyline, false for open polylines>
),
<DL_Attributes instance>
);
// for every vertex in the polyline:
dxf.writeVertex(
<DL_WriterA instance>,
DL_VertexData(
<vertex position X>, <vertex position Y>, <vertex position Z>,
<vertex bulge, always 0.0 for straight segments>
)
);
dxf.writePolylineEnd(<DL_WriterA instance>);
andrew wrote:A polyline is an entity that consists of a sequence of lines (and sometimes arcs).
Since a polyline is not a shape or surface, it cannot have a "hole" or "island" by definition.
Hatches and solid fills can have holes or islands.
Davidow wrote:The result have to be a filled surface with two serarate entities.
Return to dxflib 'How Do I' Questions
Users browsing this forum: No registered users and 3 guests