libDXF 0.0.1
A library with DXF related functions written in C.
Data Fields

dxf_polyline_struct Struct Reference

Definition of a DXF polyline entity. More...

#include <polyline.h>

Collaboration diagram for dxf_polyline_struct:
Collaboration graph
[legend]

Data Fields

int id_code
char * linetype
char * layer
double elevation
double thickness
double linetype_scale
int16_t visibility
int color
int paperspace
int graphics_data_size
int16_t shadow_mode
DxfBinaryGraphicsDatabinary_graphics_data
char * dictionary_owner_soft
char * material
char * dictionary_owner_hard
int16_t lineweight
char * plot_style_name
long color_value
char * color_name
long transparency
DxfPointp0
double start_width
double end_width
int vertices_follow
int flag
int polygon_mesh_M_vertex_count
int polygon_mesh_N_vertex_count
int smooth_M_surface_density
int smooth_N_surface_density
int surface_type
double extr_x0
double extr_y0
double extr_z0
DxfVertexvertices
struct DxfPolylinenext

Detailed Description

Definition of a DXF polyline entity.

A polyface mesh is represented in DXF as a variant of a Polyline entity.
The Polyline header is identified as introducing a polyface mesh by the presence of the 64 bit in the Polyline flags (70) group.
The 71 group specifies the number of vertices in the mesh, and the 72 group, the number of faces.
While these counts are correct for all meshes created with the PFACE command, applications are not required to place correct values in these fields, and AutoCAD actually never relies upon their accuracy.

Following the Polyline header is a sequence of Vertex entities that specify the vertex coordinates and faces that compose the mesh.
Vertices such as these are described in the following subsection on Vertex.

Applications might want to represent polygons with an arbitrarily large number of sides in polyface meshes.
However, the AutoCAD entity structure imposes a limit on the number of vertices that a given face entity can specify.
You can represent more complex polygons by decomposing them into triangular wedges.
Their edges should be made invisible to prevent visible artifacts of this subdivision from being drawn.
The PFACE command performs this subdivision automatically, but when applications generate polyface meshes directly, the applications must do this themselves.

The number of vertices per face is the key parameter in this subdivision process.
The PFACEVMAX system variable provides an application with the number of vertices per face entity.
This value is read-only, and is set to 4.

Polyface meshes created with the PFACE command are always generated with all the vertex coordinate entities first, followed by the face definition entities.
The code within AutoCAD that processes polyface meshes does not, at present, require this ordering; it works even with interleaved vertex coordinates and face definitions as long as no face specifies a vertex with an index that appears after it in the database.
Programs that read polyface meshes from DXF would be wise to be as tolerant of odd vertex and face ordering as AutoCAD is.

Definition at line 103 of file polyline.h.


Field Documentation

Identification number for the entity.
This is to be an unique (sequential) number in the DXF file.
Group code = 5.

Definition at line 108 of file polyline.h.

Referenced by dxf_polyline_get_id_code(), dxf_polyline_read(), and dxf_polyline_set_id_code().

The linetype of the entity.
Defaults to BYLAYER if ommitted in the DXF file.
Group code = 6.

Definition at line 113 of file polyline.h.

Referenced by dxf_polyline_get_linetype(), dxf_polyline_read(), and dxf_polyline_set_linetype().

Layer on which the entity is drawn.
Defaults to layer "0" if no valid layername is given.
Group code = 8.

Definition at line 117 of file polyline.h.

Referenced by dxf_polyline_get_layer(), dxf_polyline_read(), and dxf_polyline_set_layer().

Elevation of the entity in the local Z-direction.
Defaults to 0.0 if omitted in the DXF file, or prior to DXF version R12, or DXF_FLATLAND equals 0 (default).
Group code = 38.

Deprecated:
As of version R11.

Definition at line 121 of file polyline.h.

Referenced by dxf_polyline_get_elevation(), dxf_polyline_read(), and dxf_polyline_set_elevation().

Thickness of the arc in the local Z-direction.
Defaults to 0.0 if ommitted in the DXF file.
Group code = 39.

Definition at line 127 of file polyline.h.

Referenced by dxf_polyline_get_thickness(), dxf_polyline_read(), and dxf_polyline_set_thickness().

Linetype scale (optional).
Group code = 48.

Since:
Introduced in version R13.

Definition at line 131 of file polyline.h.

Referenced by dxf_polyline_get_linetype_scale(), dxf_polyline_read(), and dxf_polyline_set_linetype_scale().

Object visibility (optional):

  1. Visible
  2. Invisible

Group code = 60.

Since:
Introduced in version R13.

Definition at line 135 of file polyline.h.

Referenced by dxf_polyline_get_visibility(), dxf_polyline_read(), and dxf_polyline_set_visibility().

Color of the entity.
Defaults to BYLAYER if ommitted in the DXF file.
Note that entities encapsulated in a block with the color BYBLOCK are represented in the "native" color of the BLOCK entity.
Group code = 62.

Definition at line 143 of file polyline.h.

Referenced by dxf_polyline_get_color(), dxf_polyline_read(), and dxf_polyline_set_color().

Entities are to be drawn on either PAPERSPACE or MODELSPACE.
Optional, defaults to DXF_MODELSPACE (0).
Group code = 67.

Since:
Introduced in version R13.

Definition at line 150 of file polyline.h.

Referenced by dxf_polyline_get_paperspace(), dxf_polyline_read(), and dxf_polyline_set_paperspace().

Number of bytes in the proxy entity graphics represented in the sub-sequent 310 groups, which are binary chunk records (optional).
Group code = 92.

Since:
Introduced in version R2000.
Warning:
On some 64 bit workstations output is generated with group code "160", thus omitting group code "92".

Definition at line 156 of file polyline.h.

Referenced by dxf_polyline_get_graphics_data_size(), and dxf_polyline_set_graphics_data_size().

Shadow mode:

  1. Casts and receives shadows.
  2. Casts shadows.
  3. Receives shadows.
  4. Ignores shadows.


Group code = 284.

Since:
Introduced in version R2009.

Definition at line 165 of file polyline.h.

Referenced by dxf_polyline_get_shadow_mode(), and dxf_polyline_set_shadow_mode().

Proxy entity graphics data.
Multiple lines of 256 characters maximum per line (optional).
Group code = 310.

Since:
Introduced in version R2000.

Definition at line 175 of file polyline.h.

Referenced by dxf_polyline_get_binary_graphics_data(), and dxf_polyline_set_binary_graphics_data().

Soft-pointer ID/handle to owner dictionary (optional).
Group code = 330.

Since:
Introduced in version R14.

Definition at line 181 of file polyline.h.

Referenced by dxf_polyline_get_dictionary_owner_soft(), dxf_polyline_read(), dxf_polyline_set_dictionary_owner_soft(), and dxf_polyline_write().

Hard-pointer ID/handle to material object (present if not BYLAYER).
Group code = 347.

Since:
Introduced in version R2008.

Definition at line 185 of file polyline.h.

Referenced by dxf_polyline_get_material(), and dxf_polyline_set_material().

Hard owner ID/handle to owner dictionary (optional).
Group code = 360.

Since:
Introduced in version R14.

Definition at line 190 of file polyline.h.

Referenced by dxf_polyline_get_dictionary_owner_hard(), dxf_polyline_read(), dxf_polyline_set_dictionary_owner_hard(), and dxf_polyline_write().

Lineweight enum value.
Stored and moved around as a 16-bit integer.
Group code = 370.

Since:
Introduced in version R2002.

Definition at line 194 of file polyline.h.

Referenced by dxf_polyline_get_lineweight(), and dxf_polyline_set_lineweight().

Hard pointer ID / handle of PlotStyleName object.
Group code = 390.

Since:
Introduced in version R2009.

Definition at line 199 of file polyline.h.

Referenced by dxf_polyline_get_plot_style_name(), and dxf_polyline_set_plot_style_name().

A 24-bit color value that should be dealt with in terms of bytes with values of 0 to 255.
The lowest byte is the blue value, the middle byte is the green value, and the third byte is the red value.
The top byte is always 0.
The group code cannot be used by custom entities for their own data because the group code is reserved for AcDbEntity, class-level color data and AcDbEntity, class-level transparency data.
Group code = 420.

Since:
Introduced in version R2004.

Definition at line 203 of file polyline.h.

Referenced by dxf_polyline_get_color_value(), and dxf_polyline_set_color_value().

Color name.
The group code cannot be used by custom entities for their own data because the group code is reserved for AcDbEntity, class-level color data and AcDbEntity, class-level transparency data.
Group code = 430.

Since:
Introduced in version R2004.

Definition at line 215 of file polyline.h.

Referenced by dxf_polyline_get_color_name(), and dxf_polyline_set_color_name().

Transparency value.
The group code cannot be used by custom entities for their own data because the group code is reserved for AcDbEntity, class-level color data and AcDbEntity, class-level transparency data.
Group code = 440.

Since:
Introduced in version R2004.

Definition at line 223 of file polyline.h.

Referenced by dxf_polyline_get_transparency(), and dxf_polyline_set_transparency().

Insertion point for the polyline.
The z0 value of p0 is the default elevation for vertices.
Group codes = 10, 20 and 30.

Definition at line 232 of file polyline.h.

Referenced by dxf_polyline_get_p0(), dxf_polyline_get_x0(), dxf_polyline_get_y0(), dxf_polyline_get_z0(), dxf_polyline_read(), dxf_polyline_set_p0(), dxf_polyline_set_x0(), dxf_polyline_set_y0(), and dxf_polyline_set_z0().

Optional, defaults to 0.0
The default widths apply to any vertex that doesn't supply widths.
Group code = 40.

Definition at line 237 of file polyline.h.

Referenced by dxf_polyline_get_start_width(), dxf_polyline_read(), and dxf_polyline_set_start_width().

Optional, defaults to 0.0
The default widths apply to any vertex that doesn't supply widths.
Group code = 41.

Definition at line 242 of file polyline.h.

Referenced by dxf_polyline_get_end_width(), dxf_polyline_read(), and dxf_polyline_set_end_width().

Always 1
The "vertices follow" flag is always 1, indicating that a series of Vertex entities is expected to follow the Polyline, terminated by a "sequence end" entity.
Group code = 66.

Deprecated:
As of version 2002.

Definition at line 247 of file polyline.h.

Referenced by dxf_polyline_get_vertices_follow(), dxf_polyline_read(), and dxf_polyline_set_vertices_follow().

Optional, defaults to 0
bit coded:
1 = This is a closed Polyline (or a polygon mesh closed in the M direction)
2 = Curve-fit vertices have been added
4 = Spline-fit vertices have been added
8 = This is a 3D Polyline
16 = This is a 3D polygon mesh
32 = The polygon mesh is closed in the N direction
64 = This Polyline is a polyface mesh
128 = The linetype pattern is generated continuously around the vertices of this Polyline
. Group code = 70.

Definition at line 254 of file polyline.h.

Referenced by dxf_polyline_get_flag(), dxf_polyline_read(), and dxf_polyline_set_flag().

Optional, defaults to 0.
Group code = 71.

Definition at line 268 of file polyline.h.

Referenced by dxf_polyline_get_polygon_mesh_M_vertex_count(), dxf_polyline_read(), and dxf_polyline_set_polygon_mesh_M_vertex_count().

Optional, defaults to 0.
Group code = 72.

Definition at line 271 of file polyline.h.

Referenced by dxf_polyline_get_polygon_mesh_N_vertex_count(), dxf_polyline_read(), and dxf_polyline_set_polygon_mesh_N_vertex_count().

Optional, defaults to 0.
Group code = 73.

Definition at line 274 of file polyline.h.

Referenced by dxf_polyline_get_smooth_M_surface_density(), dxf_polyline_read(), and dxf_polyline_set_smooth_M_surface_density().

Optional, defaults to 0.
Group code = 74.

Definition at line 277 of file polyline.h.

Referenced by dxf_polyline_get_smooth_N_surface_density(), and dxf_polyline_set_smooth_N_surface_density().

Optional, defaults to 0
bit coded:
0 = no smooth surface fitted
5 = quadratic B-spline surface
6 = cubic B-spline surface
8 = Bezier surface.
Group code = 75.

Definition at line 280 of file polyline.h.

Referenced by dxf_polyline_get_surface_type(), dxf_polyline_read(), and dxf_polyline_set_surface_type().

Extrusion direction (optional; default = 0, 0, 1)
DXF: X value;
APP: 3D vector
Defaults to 0.0 if ommitted in the DXF file.
Group code = 210.

Definition at line 288 of file polyline.h.

Referenced by dxf_polyline_get_extr_x0(), dxf_polyline_read(), and dxf_polyline_set_extr_x0().

DXF: Y value of extrusion direction (optional).
Group code = 220.

Definition at line 294 of file polyline.h.

Referenced by dxf_polyline_get_extr_y0(), dxf_polyline_read(), and dxf_polyline_set_extr_y0().

DXF: Z value of extrusion direction (optional).
Group code = 230.

Definition at line 297 of file polyline.h.

Referenced by dxf_polyline_get_extr_z0(), dxf_polyline_read(), and dxf_polyline_set_extr_z0().

Pointer to the first DxfVertex of the polyline.
NULL in the last DxfVertex.

Note:
Not all members of the DxfVertex struct are used for polylines.

Definition at line 300 of file polyline.h.

Referenced by dxf_polyline_get_vertices(), and dxf_polyline_set_vertices().

pointer to the next DxfPolyline.
NULL in the last DxfPolyline.

Definition at line 304 of file polyline.h.

Referenced by dxf_polyline_free(), dxf_polyline_free_chain(), dxf_polyline_get_last(), dxf_polyline_get_next(), and dxf_polyline_set_next().


The documentation for this struct was generated from the following file: