libDXF 0.0.1
A library with DXF related functions written in C.
|
Header file for a DXF block entity (BLOCK
).
More...
Go to the source code of this file.
Data Structures | |
struct | dxf_block_struct |
DXF definition of an AutoCAD block entity. More... | |
Typedefs | |
typedef struct dxf_block_struct | DxfBlock |
DXF definition of an AutoCAD block entity. | |
Functions | |
DxfBlock * | dxf_block_new () |
Allocate memory for a DxfBlock (a DXF BLOCK entity). | |
DxfBlock * | dxf_block_init (DxfBlock *block) |
Allocate memory and initialize data fields in a DxfBlock (a DXF BLOCK entity). | |
DxfBlock * | dxf_block_read (DxfFile *fp, DxfBlock *block) |
Read data from a DXF file into a DxfBlock (a DXF BLOCK entity). | |
int | dxf_block_write (DxfFile *fp, DxfBlock *block) |
Write DXF output for a DXF BLOCK entity. | |
int | dxf_block_write_endblk (DxfFile *fp) |
int | dxf_block_write_table (DxfFile *fp, DxfBlock *blocks_list) |
Write DXF output to a file for a list of block definitions. | |
int | dxf_block_free (DxfBlock *block) |
Free the allocated memory for a DxfBlock (a BLOCK entity) and all it's data fields. | |
void | dxf_block_free_chain (DxfBlock *blocks) |
Free the allocated memory for a chain of DXF BLOCK entities and all their data fields. | |
char * | dxf_block_get_xref_name (DxfBlock *block) |
Get the xref name from a DXF BLOCK entity. | |
DxfBlock * | dxf_block_set_xref_name (DxfBlock *block, char *xref_name) |
Set the xref name for a DXF BLOCK entity. | |
char * | dxf_block_get_block_name (DxfBlock *block) |
Get the block name from a DXF BLOCK entity. | |
DxfBlock * | dxf_block_set_block_name (DxfBlock *block, char *block_name) |
Set the block name for a DXF BLOCK entity. | |
char * | dxf_block_get_block_name_additional (DxfBlock *block) |
Get the additional block name from a DXF BLOCK entity. | |
DxfBlock * | dxf_block_set_block_name_additional (DxfBlock *block, char *block_name_additional) |
Set the additional block name for a DXF BLOCK entity. | |
char * | dxf_block_get_description (DxfBlock *block) |
Get the description from a DXF BLOCK entity. | |
DxfBlock * | dxf_block_set_description (DxfBlock *block, char *description) |
Set the description for a DXF BLOCK entity. | |
int | dxf_block_get_id_code (DxfBlock *block) |
Get the ID code from a DXF BLOCK entity. | |
DxfBlock * | dxf_block_set_id_code (DxfBlock *block, int id_code) |
Set the ID code for a DXF BLOCK entity. | |
char * | dxf_block_get_layer (DxfBlock *block) |
Get the layer from a DXF BLOCK entity. | |
DxfBlock * | dxf_block_set_layer (DxfBlock *block, char *layer) |
Set the layer for a DXF BLOCK entity. | |
DxfPoint * | dxf_block_get_p0 (DxfBlock *block) |
Get the base point of a DXF BLOCK entity. | |
DxfBlock * | dxf_block_set_p0 (DxfBlock *block, DxfPoint *p0) |
Set the base point of a DXF BLOCK entity. | |
double | dxf_block_get_x0 (DxfBlock *block) |
Get the X-value of the base point x0 of a DXF BLOCK entity. | |
DxfBlock * | dxf_block_set_x0 (DxfBlock *block, double x0) |
Set the X-value of the base point x0 of a DXF BLOCK entity. | |
double | dxf_block_get_y0 (DxfBlock *block) |
Get the Y-value of the base point y0 of a DXF BLOCK entity. | |
DxfBlock * | dxf_block_set_y0 (DxfBlock *block, double y0) |
Set the Y-value of the base point y0 of a DXF BLOCK entity. | |
double | dxf_block_get_z0 (DxfBlock *block) |
Get the Z-value of the base point z0 of a DXF BLOCK entity. | |
DxfBlock * | dxf_block_set_z0 (DxfBlock *block, double z0) |
Set the Z-value of the base point z0 of a DXF BLOCK entity. | |
int | dxf_block_get_block_type (DxfBlock *block) |
Get the block type from a DXF BLOCK entity. | |
DxfBlock * | dxf_block_set_block_type (DxfBlock *block, int block_type) |
Set the blcok type for a DXF BLOCK entity. | |
int | dxf_block_is_anonymous (DxfBlock *block) |
Test if this block is anonymous. | |
int | dxf_block_has_attributes (DxfBlock *block) |
Test if this block has attributes. | |
int | dxf_block_is_xreferenced (DxfBlock *block) |
Test if this DXF BLOCK is an external refence (Xref). | |
int | dxf_block_is_xdependent (DxfBlock *block) |
Test if this DXF BLOCK is externally dependent on an xref. | |
int | dxf_block_is_xresolved (DxfBlock *block) |
Test if this DXF BLOCK is a resolved external reference, or dependent of an external reference. | |
int | dxf_block_is_referenced (DxfBlock *block) |
Test if this DXF BLOCK is referenced. | |
double | dxf_block_get_extr_x0 (DxfBlock *block) |
Get the X-value of the extrusion vector extr_x0 of a DXF BLOCK entity. | |
DxfBlock * | dxf_block_set_extr_x0 (DxfBlock *block, double extr_x0) |
Set the X-value of the extrusion vector extr_x0 of a DXF BLOCK entity. | |
double | dxf_block_get_extr_y0 (DxfBlock *block) |
Get the Y-value of the extrusion vector extr_y0 of a DXF BLOCK entity. | |
DxfBlock * | dxf_block_set_extr_y0 (DxfBlock *block, double extr_y0) |
Set the Y-value of the extrusion vector extr_y0 of a DXF BLOCK entity. | |
double | dxf_block_get_extr_z0 (DxfBlock *block) |
Get the Z-value of the extrusion vector extr_z0 of a DXF BLOCK entity. | |
DxfBlock * | dxf_block_set_extr_z0 (DxfBlock *block, double extr_z0) |
Set the Z-value of the extrusion vector extr_z0 of a DXF BLOCK entity. | |
DxfPoint * | dxf_block_get_extrusion_vector_as_point (DxfBlock *block) |
Get the extrusion vector as a DXF POINT entity from a DXF BLOCK entity. | |
DxfBlock * | dxf_block_set_extrusion_vector (DxfBlock *block, double extr_x0, double extr_y0, double extr_z0) |
Set the extrusion vector for a DXF BLOCK entity. | |
char * | dxf_block_get_dictionary_owner_soft (DxfBlock *block) |
Get the soft pointer to the dictionary owner from a DXF BLOCK entity. | |
DxfBlock * | dxf_block_set_dictionary_owner_soft (DxfBlock *block, char *dictionary_owner_soft) |
Set the pointer to the dictionary_owner_soft for a DXF BLOCK entity. | |
struct DxfEndblk * | dxf_block_get_endblk (DxfBlock *block) |
Get the pointer to the DXF ENDBLK (end of block) marker from a DXF BLOCK entity. | |
DxfBlock * | dxf_block_set_endblk (DxfBlock *block, struct DxfEndblk *endblk) |
Set the pointer to the DXF ENDBLK (end of block) marker for a DXF BLOCK entity. | |
DxfBlock * | dxf_block_get_next (DxfBlock *block) |
Get the pointer to the next DXF BLOCK entity from a DXF BLOCK entity. | |
DxfBlock * | dxf_block_set_next (DxfBlock *block, DxfBlock *next) |
Set the pointer to the next DXF BLOCK for a DXF BLOCK entity. | |
DxfBlock * | dxf_block_get_last (DxfBlock *block) |
Get the pointer to the last DXF BLOCK entity from a linked list of DXF BLOCK entities. |
Header file for a DXF block entity (BLOCK
).
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 block.h.
typedef struct dxf_block_struct DxfBlock |
DXF definition of an AutoCAD block entity.
The Blocks section of the DXF file contains all the Block Definitions.
This section contains the entities that make up the Blocks used in the drawing, including anonymous Blocks generated by the HATCH command and by associative dimensioning.
The format of the entities in this section is identical to those in the Entities section described later, so see that section for details.
All entities in the Blocks section appear between Block and Endblk entities.
Block and Endblk entities appear only in the Blocks section.
Block definitions are never nested (that is, no Block or Endblk entity ever appears within another Block-Endblk pair), although a Block definition can contain an INSERT entity.
External References are written in the DXF file as any Block Definition, except they also include a text string (group code 1) of the path and filename of the External Reference.
DxfBlock* dxf_block_new | ( | ) |
Allocate memory for a DxfBlock
(a DXF BLOCK
entity).
Fill the memory contents with zeros.
Definition at line 54 of file block.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_init(), and dxf_block_read().
Allocate memory and initialize data fields in a DxfBlock
(a DXF BLOCK
entity).
NULL
when no memory was allocated, a pointer to the allocated memory when succesful. block | DXF block entity. |
Definition at line 92 of file block.c.
References _, dxf_block_get_p0(), dxf_block_new(), dxf_block_set_block_name(), dxf_block_set_block_name_additional(), dxf_block_set_block_type(), dxf_block_set_description(), dxf_block_set_dictionary_owner_soft(), dxf_block_set_endblk(), dxf_block_set_extr_x0(), dxf_block_set_extr_y0(), dxf_block_set_extr_z0(), dxf_block_set_id_code(), dxf_block_set_layer(), dxf_block_set_next(), dxf_block_set_p0(), dxf_block_set_x0(), dxf_block_set_xref_name(), dxf_block_set_y0(), dxf_block_set_z0(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, dxf_endblk_new(), dxf_point_init(), and dxf_point_new().
Referenced by dxf_block_read(), and dxf_drawing_init().
Read data from a DXF file into a DxfBlock
(a DXF BLOCK
entity).
The last line read from file contained the string "BLOCK".
Now follows some data for the BLOCK
, 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 dxf_block
.
block
.BLOCK
entity up until the closing Group code 0, the pointer to the following ENDBLK
entity needs to be stored in the current (last) DxfBlock
struct member endblk
. fp | DXF file handle of input file (or device). |
block | DXF block entity. |
Definition at line 159 of file block.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_11, AutoCAD_13, dxf_block_struct::block_name, dxf_block_struct::block_name_additional, dxf_block_struct::block_type, dxf_block_struct::description, dxf_block_struct::dictionary_owner_soft, dxf_block_get_block_name(), dxf_block_get_block_type(), dxf_block_get_layer(), dxf_block_init(), dxf_block_new(), dxf_block_set_block_type(), dxf_block_set_layer(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, dxf_block_struct::extr_x0, dxf_block_struct::extr_y0, dxf_block_struct::extr_z0, dxf_file_struct::filename, dxf_file_struct::fp, dxf_block_struct::id_code, dxf_block_struct::layer, dxf_file_struct::line_number, dxf_block_struct::p0, dxf_point_struct::x0, dxf_block_struct::xref_name, dxf_point_struct::y0, and dxf_point_struct::z0.
Write DXF output for a DXF BLOCK
entity.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred. fp | DXF file pointer to an output file (or device). |
block | DXF block entity |
Definition at line 359 of file block.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_13, AutoCAD_14, AutoCAD_2000, dxf_block_get_block_name(), dxf_block_get_block_type(), dxf_block_get_description(), dxf_block_get_dictionary_owner_soft(), dxf_block_get_endblk(), dxf_block_get_id_code(), dxf_block_get_layer(), dxf_block_get_x0(), dxf_block_get_xref_name(), dxf_block_get_y0(), dxf_block_get_z0(), dxf_block_set_description(), dxf_block_set_dictionary_owner_soft(), dxf_block_set_layer(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, dxf_endblk_write(), and dxf_file_struct::fp.
int dxf_block_write_endblk | ( | DxfFile * | fp | ) |
Write DXF output to a file for a list of block definitions.
Appears only in the BLOCKS
section.
fp | DXF file pointer to an output file (or device). |
blocks_list | Pointer to a list of block definitions. |
Definition at line 523 of file block.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
int dxf_block_free | ( | DxfBlock * | block | ) |
Free the allocated memory for a DxfBlock (a BLOCK
entity) and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred. block | Pointer to the memory occupied by the DXF BLOCK entity. |
Definition at line 559 of file block.c.
References _, dxf_block_struct::block_name, dxf_block_struct::block_name_additional, dxf_block_struct::description, dxf_block_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_block_struct::layer, dxf_block_struct::next, and dxf_block_struct::xref_name.
Referenced by dxf_block_free_chain().
void dxf_block_free_chain | ( | DxfBlock * | blocks | ) |
Free the allocated memory for a chain of DXF BLOCK
entities and all their data fields.
blocks | pointer to the chain of DXF BLOCK entities. |
Definition at line 603 of file block.c.
References _, dxf_block_free(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::next.
Referenced by dxf_drawing_free().
char* dxf_block_get_xref_name | ( | DxfBlock * | block | ) |
Get the xref name from a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
Definition at line 638 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::xref_name.
Referenced by dxf_block_write().
Set the xref name for a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
xref_name | a string containing the xref name for the entity. |
Definition at line 673 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::xref_name.
Referenced by dxf_block_init().
char* dxf_block_get_block_name | ( | DxfBlock * | block | ) |
Get the block name from a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
Definition at line 716 of file block.c.
References _, dxf_block_struct::block_name, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_read(), and dxf_block_write().
Set the block name for a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
block_name | a string containing the block name for the entity. |
Definition at line 751 of file block.c.
References _, dxf_block_struct::block_name, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_init().
char* dxf_block_get_block_name_additional | ( | DxfBlock * | block | ) |
Get the additional block name from a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
Definition at line 794 of file block.c.
References _, dxf_block_struct::block_name_additional, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Set the additional block name for a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
block_name_additional | a string containing the additional block name for the entity. |
Definition at line 829 of file block.c.
References _, dxf_block_struct::block_name_additional, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_init().
char* dxf_block_get_description | ( | DxfBlock * | block | ) |
Get the description from a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
Definition at line 872 of file block.c.
References _, dxf_block_struct::description, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_write().
Set the description for a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
description | a string containing the description for the entity. |
Definition at line 907 of file block.c.
References _, dxf_block_struct::description, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_init(), and dxf_block_write().
int dxf_block_get_id_code | ( | DxfBlock * | block | ) |
Get the ID code from a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
Definition at line 948 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::id_code.
Referenced by dxf_block_write().
Set the ID code for a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
id_code | Identification number for the entity. This is to be an unique (sequential) number in the DXF file. |
Definition at line 983 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::id_code.
Referenced by dxf_block_init().
char* dxf_block_get_layer | ( | DxfBlock * | block | ) |
Get the layer from a DXF BLOCK
entity.
NULL
when an error occurred. block | a pointer to a DXF BLOCK entity. |
Definition at line 1025 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::layer.
Referenced by dxf_block_read(), and dxf_block_write().
Set the layer for a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
layer | a string containing the layer for the entity. |
Definition at line 1060 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::layer.
Referenced by dxf_block_init(), dxf_block_read(), and dxf_block_write().
Get the base point of a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
Definition at line 1100 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::p0.
Referenced by dxf_block_init().
Set the base point of a DXF BLOCK
entity.
BLOCK
entity. block | a pointer to a DXF BLOCK entity. |
p0 | a pointer to a DXF POINT entity. |
Definition at line 1137 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::p0.
Referenced by dxf_block_init().
double dxf_block_get_x0 | ( | DxfBlock * | block | ) |
Get the X-value of the base point x0
of a DXF BLOCK
entity.
x0
. block | a pointer to a DXF BLOCK entity. |
Definition at line 1178 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_block_struct::p0, and dxf_point_struct::x0.
Referenced by dxf_block_write().
Set the X-value of the base point x0
of a DXF BLOCK
entity.
block
when successful, or NULL
when an error occurred. block | a pointer to a DXF BLOCK entity. |
x0 | the X-value of the base point x0 of a DXF ARC entity. |
Definition at line 1218 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_block_struct::p0, and dxf_point_struct::x0.
Referenced by dxf_block_init().
double dxf_block_get_y0 | ( | DxfBlock * | block | ) |
Get the Y-value of the base point y0
of a DXF BLOCK
entity.
y0
. block | a pointer to a DXF BLOCK entity. |
Definition at line 1260 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_block_struct::p0, and dxf_point_struct::y0.
Referenced by dxf_block_write().
Set the Y-value of the base point y0
of a DXF BLOCK
entity.
block
when successful, or NULL
when an error occurred. block | a pointer to a DXF BLOCK entity. |
y0 | the Y-value of the base point y0 of a DXF BLOCK entity. |
Definition at line 1300 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_block_struct::p0, and dxf_point_struct::y0.
Referenced by dxf_block_init().
double dxf_block_get_z0 | ( | DxfBlock * | block | ) |
Get the Z-value of the base point z0
of a DXF BLOCK
entity.
z0
. block | a pointer to a DXF BLOCK entity. |
Definition at line 1342 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_block_struct::p0, and dxf_point_struct::z0.
Referenced by dxf_block_write().
Set the Z-value of the base point z0
of a DXF BLOCK
entity.
block
when successful, or NULL
when an error occurred. block | a pointer to a DXF BLOCK entity. |
z0 | the Z-value of the base point z0 of a DXF BLOCK entity. |
Definition at line 1382 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_block_struct::p0, and dxf_point_struct::z0.
Referenced by dxf_block_init().
int dxf_block_get_block_type | ( | DxfBlock * | block | ) |
Get the block type from a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
Definition at line 1423 of file block.c.
References _, dxf_block_struct::block_type, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_read(), and dxf_block_write().
Set the blcok type for a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
block_type | block type for the entity. |
Definition at line 1457 of file block.c.
References _, dxf_block_struct::block_type, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_init(), and dxf_block_read().
int dxf_block_is_anonymous | ( | DxfBlock * | block | ) |
Test if this block is anonymous.
TRUE
when this block is anonymous, or FALSE
when this block is not anonymous. block | DXF BLOCK entity. |
Definition at line 1498 of file block.c.
References _, dxf_block_struct::block_type, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
int dxf_block_has_attributes | ( | DxfBlock * | block | ) |
Test if this block has attributes.
TRUE
when this block has attributes, or FALSE
when this block has no attributes. block | DXF BLOCK entity. |
Definition at line 1529 of file block.c.
References _, dxf_block_struct::block_type, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
int dxf_block_is_xreferenced | ( | DxfBlock * | block | ) |
Test if this DXF BLOCK
is an external refence (Xref).
TRUE
when BLOCK
is an external refence, or FALSE
when BLOCK
is not an external refence. block | DXF BLOCK entity. |
Definition at line 1560 of file block.c.
References _, dxf_block_struct::block_type, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
int dxf_block_is_xdependent | ( | DxfBlock * | block | ) |
Test if this DXF BLOCK
is externally dependent on an xref.
TRUE
when BLOCK
is externally dependent on an xref, or FALSE
when BLOCK
is not externally dependent on an xref. block | DXF BLOCK entity. |
Definition at line 1591 of file block.c.
References _, dxf_block_struct::block_type, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
int dxf_block_is_xresolved | ( | DxfBlock * | block | ) |
Test if this DXF BLOCK
is a resolved external reference, or dependent of an external reference.
TRUE
when BLOCK
is a resolved xref, or FALSE
when BLOCK
is not a resolved xref. block | DXF BLOCK entity. |
Definition at line 1623 of file block.c.
References _, dxf_block_struct::block_type, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
int dxf_block_is_referenced | ( | DxfBlock * | block | ) |
Test if this DXF BLOCK
is referenced.
TRUE
when BLOCK
is referenced, or FALSE
when BLOCK
is not referenced. block | DXF BLOCK entity. |
Definition at line 1654 of file block.c.
References _, dxf_block_struct::block_type, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
double dxf_block_get_extr_x0 | ( | DxfBlock * | block | ) |
Get the X-value of the extrusion vector extr_x0
of a DXF BLOCK
entity.
extr_x0
. block | a pointer to a DXF BLOCK entity. |
Definition at line 1685 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::extr_x0.
Set the X-value of the extrusion vector extr_x0
of a DXF BLOCK
entity.
block
when successful, or NULL
when an error occurred. block | a pointer to a DXF BLOCK entity. |
extr_x0 | the X-value of the extrusion vector extr_x0 of a DXF BLOCK entity. |
Definition at line 1718 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::extr_x0.
Referenced by dxf_block_init().
double dxf_block_get_extr_y0 | ( | DxfBlock * | block | ) |
Get the Y-value of the extrusion vector extr_y0
of a DXF BLOCK
entity.
extr_y0
. block | a pointer to a DXF BLOCK entity. |
Definition at line 1753 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::extr_y0.
Set the Y-value of the extrusion vector extr_y0
of a DXF BLOCK
entity.
block
when successful, or NULL
when an error occurred. block | a pointer to a DXF BLOCK entity. |
extr_y0 | the Y-value of the extrusion vector extr_y0 of a DXF BLOCK entity. |
Definition at line 1786 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::extr_y0.
Referenced by dxf_block_init().
double dxf_block_get_extr_z0 | ( | DxfBlock * | block | ) |
Get the Z-value of the extrusion vector extr_z0
of a DXF BLOCK
entity.
extr_z0
. block | a pointer to a DXF BLOCK entity. |
Definition at line 1821 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::extr_z0.
Set the Z-value of the extrusion vector extr_z0
of a DXF BLOCK
entity.
block
when successful, or NULL
when an error occurred. block | a pointer to a DXF BLOCK entity. |
extr_z0 | the Z-value of the extrusion vector extr_z0 of a DXF BLOCK entity. |
Definition at line 1854 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::extr_z0.
Referenced by dxf_block_init().
Get the extrusion vector as a DXF POINT
entity from a DXF BLOCK
entity.
POINT
containing the extrusion coordinates.POINT
. block | a pointer to a DXF BLOCK entity. |
Definition at line 1891 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_point_init(), dxf_block_struct::extr_x0, dxf_block_struct::extr_y0, and dxf_block_struct::extr_z0.
DxfBlock* dxf_block_set_extrusion_vector | ( | DxfBlock * | block, |
double | extr_x0, | ||
double | extr_y0, | ||
double | extr_z0 | ||
) |
Set the extrusion vector for a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
extr_x0 | X-value of the extrusion direction. |
extr_y0 | Y-value of the extrusion direction. |
extr_z0 | Z-value of the extrusion direction. |
Definition at line 1932 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_block_struct::extr_x0, dxf_block_struct::extr_y0, and dxf_block_struct::extr_z0.
char* dxf_block_get_dictionary_owner_soft | ( | DxfBlock * | block | ) |
Get the soft pointer to the dictionary owner from a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
Definition at line 1974 of file block.c.
References _, dxf_block_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_write().
Set the pointer to the dictionary_owner_soft for a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
dictionary_owner_soft | a string containing the pointer to the dictionary_owner_soft for the entity. |
Definition at line 2010 of file block.c.
References _, dxf_block_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_init(), and dxf_block_write().
Get the pointer to the DXF ENDBLK
(end of block) marker from a DXF BLOCK
entity.
ENDBLK
(end of block) marker.block | a pointer to a DXF BLOCK entity. |
Definition at line 2054 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::endblk.
Referenced by dxf_block_write().
Set the pointer to the DXF ENDBLK
(end of block) marker for a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
endblk | a pointerto the DXF ENDBLK (end of block) marker for the entity. |
Definition at line 2090 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::endblk.
Referenced by dxf_block_init().
Get the pointer to the next DXF BLOCK
entity from a DXF BLOCK
entity.
BLOCK
entity.block | a pointer to a DXF BLOCK entity. |
Definition at line 2134 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::next.
Set the pointer to the next DXF BLOCK
for a DXF BLOCK
entity.
block | a pointer to a DXF BLOCK entity. |
next | a pointer to the next DXF BLOCK for the entity. |
Definition at line 2170 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::next.
Referenced by dxf_block_init().
Get the pointer to the last DXF BLOCK
entity from a linked list of DXF BLOCK
entities.
BLOCK
entity.block | a pointer to a DXF BLOCK entity. |
Definition at line 2213 of file block.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_struct::next.