libDXF 0.0.1
A library with DXF related functions written in C.
|
Definition of a DXF polyline entity. More...
#include <polyline.h>
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 |
DxfBinaryGraphicsData * | binary_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 |
DxfPoint * | p0 |
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 |
DxfVertex * | vertices |
struct DxfPolyline * | next |
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.
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.
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.
Definition at line 131 of file polyline.h.
Referenced by dxf_polyline_get_linetype_scale(), dxf_polyline_read(), and dxf_polyline_set_linetype_scale().
int16_t dxf_polyline_struct::visibility |
Object visibility (optional):
Group code = 60.
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.
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.
Definition at line 156 of file polyline.h.
Referenced by dxf_polyline_get_graphics_data_size(), and dxf_polyline_set_graphics_data_size().
int16_t dxf_polyline_struct::shadow_mode |
Shadow mode:
Group code = 284.
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.
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.
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.
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.
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().
int16_t dxf_polyline_struct::lineweight |
Lineweight enum value.
Stored and moved around as a 16-bit integer.
Group code = 370.
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.
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.
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.
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.
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.
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().
double dxf_polyline_struct::extr_x0 |
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().
double dxf_polyline_struct::extr_y0 |
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().
double dxf_polyline_struct::extr_z0 |
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.
Definition at line 300 of file polyline.h.
Referenced by dxf_polyline_get_vertices(), and dxf_polyline_set_vertices().
struct DxfPolyline* dxf_polyline_struct::next |
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().