libDXF 0.0.1
A library with DXF related functions written in C.
|
Functions for a DXF vertex entity (VERTEX
).
More...
#include "vertex.h"
Go to the source code of this file.
Functions | |
DxfVertex * | dxf_vertex_new () |
Allocate memory for a DxfVertex . | |
DxfVertex * | dxf_vertex_init (DxfVertex *vertex) |
Allocate memory and initialize data fields in a VERTEX entity. | |
DxfVertex * | dxf_vertex_read (DxfFile *fp, DxfVertex *vertex) |
Read data from a DXF file into an VERTEX entity. | |
int | dxf_vertex_write (DxfFile *fp, DxfVertex *vertex) |
Write DXF output to fp for a vertex entity. | |
int | dxf_vertex_free (DxfVertex *vertex) |
Free the allocated memory for a VERTEX entity and all it's data fields.. | |
void | dxf_vertex_free_chain (DxfVertex *vertices) |
Free the allocated memory for a chain of DXF VERTEX entities and all their data fields. |
Functions for a DXF vertex entity (VERTEX
).
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to:
Free Software Foundation, Inc.,
59 Temple Place,
Suite 330,
Boston,
MA 02111 USA.
Drawing eXchange Format (DXF) is a defacto industry standard for the exchange of drawing files between various Computer Aided Drafting programs.
DXF is an industry standard designed by Autodesk(TM).
For more details see http://www.autodesk.com.
Definition in file vertex.c.
DxfVertex* dxf_vertex_new | ( | ) |
Allocate memory for a DxfVertex
.
Fill the memory contents with zeros.
Definition at line 53 of file vertex.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_donut_write(), dxf_lwpolyline_init(), dxf_lwpolyline_read(), dxf_polyline_init(), dxf_vertex_init(), and dxf_vertex_read().
Allocate memory and initialize data fields in a VERTEX
entity.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful.vertex | a pointer to the DXF VERTEX entity. |
Definition at line 96 of file vertex.c.
References _, dxf_vertex_struct::bulge, dxf_vertex_struct::color, dxf_vertex_struct::curve_fit_tangent_direction, dxf_vertex_struct::dictionary_owner_hard, dxf_vertex_struct::dictionary_owner_soft, DXF_COLOR_BYLAYER, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, DXF_DEFAULT_LINETYPE_SCALE, DXF_DEFAULT_VISIBILITY, DXF_MODELSPACE, dxf_vertex_new(), dxf_vertex_struct::elevation, dxf_vertex_struct::end_width, dxf_vertex_struct::flag, dxf_vertex_struct::id_code, dxf_vertex_struct::layer, dxf_vertex_struct::linetype, dxf_vertex_struct::linetype_scale, dxf_vertex_struct::next, dxf_vertex_struct::paperspace, dxf_vertex_struct::start_width, dxf_vertex_struct::thickness, dxf_vertex_struct::visibility, dxf_vertex_struct::x0, dxf_vertex_struct::y0, and dxf_vertex_struct::z0.
Referenced by dxf_donut_write(), dxf_polyline_init(), and dxf_vertex_read().
Read data from a DXF file into an VERTEX
entity.
The last line read from file contained the string "VERTEX".
Now follows some data for the VERTEX
, to be terminated with a " 0" string announcing the following entity, or the end of the ENTITY
section marker ENDSEC
.
While parsing the DXF file store data in vertex
.
vertex
.fp | filepointer to the input file (or device). |
vertex | a pointer to the DXF VERTEX entity. |
Definition at line 165 of file vertex.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_11, AutoCAD_13, dxf_vertex_struct::bulge, dxf_vertex_struct::color, dxf_vertex_struct::curve_fit_tangent_direction, dxf_vertex_struct::dictionary_owner_hard, dxf_vertex_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, dxf_vertex_init(), dxf_vertex_new(), dxf_vertex_struct::elevation, dxf_vertex_struct::end_width, dxf_file_struct::filename, dxf_vertex_struct::flag, dxf_file_struct::fp, dxf_vertex_struct::id_code, dxf_vertex_struct::layer, dxf_file_struct::line_number, dxf_vertex_struct::linetype, dxf_vertex_struct::linetype_scale, dxf_vertex_struct::paperspace, dxf_vertex_struct::polyface_mesh_vertex_index_1, dxf_vertex_struct::polyface_mesh_vertex_index_2, dxf_vertex_struct::polyface_mesh_vertex_index_3, dxf_vertex_struct::polyface_mesh_vertex_index_4, dxf_vertex_struct::start_width, dxf_vertex_struct::thickness, dxf_vertex_struct::visibility, dxf_vertex_struct::x0, dxf_vertex_struct::y0, and dxf_vertex_struct::z0.
Write DXF output to fp for a vertex entity.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred.thickness
in the correct order. 3dPolylineVertex
for now, it could have been a 2dVertex
as well, in that case use:fp | DXF file pointer to an output file (or device). |
vertex | a pointer to the DXF VERTEX entity. |
Definition at line 434 of file vertex.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_11, AutoCAD_13, AutoCAD_14, dxf_vertex_struct::bulge, dxf_vertex_struct::color, dxf_vertex_struct::curve_fit_tangent_direction, dxf_vertex_struct::dictionary_owner_hard, dxf_vertex_struct::dictionary_owner_soft, DXF_COLOR_BYLAYER, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, DXF_FLATLAND, DXF_PAPERSPACE, dxf_vertex_struct::elevation, dxf_vertex_struct::end_width, dxf_vertex_struct::flag, dxf_file_struct::fp, dxf_vertex_struct::id_code, dxf_vertex_struct::layer, dxf_vertex_struct::linetype, dxf_vertex_struct::linetype_scale, dxf_vertex_struct::paperspace, dxf_vertex_struct::polyface_mesh_vertex_index_1, dxf_vertex_struct::polyface_mesh_vertex_index_2, dxf_vertex_struct::polyface_mesh_vertex_index_3, dxf_vertex_struct::polyface_mesh_vertex_index_4, dxf_vertex_struct::start_width, dxf_vertex_struct::thickness, dxf_vertex_struct::visibility, dxf_vertex_struct::x0, dxf_vertex_struct::y0, and dxf_vertex_struct::z0.
Referenced by dxf_donut_write(), and dxf_polyline_write().
int dxf_vertex_free | ( | DxfVertex * | vertex | ) |
Free the allocated memory for a VERTEX
entity and all it's data fields.
.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred.vertex | a pointer to the DXF VERTEX entity. |
Definition at line 617 of file vertex.c.
References _, dxf_vertex_struct::dictionary_owner_hard, dxf_vertex_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_vertex_struct::layer, dxf_vertex_struct::linetype, and dxf_vertex_struct::next.
Referenced by dxf_polyline_write(), and dxf_vertex_free_chain().
void dxf_vertex_free_chain | ( | DxfVertex * | vertices | ) |
Free the allocated memory for a chain of DXF VERTEX
entities and all their data fields.
vertices | a pointer to the chain of DXF VERTEX entities. |
Definition at line 665 of file vertex.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_vertex_free(), and dxf_vertex_struct::next.
Referenced by dxf_polyline_free().