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

body.c File Reference

Functions for a DXF body entity (BODY). More...

#include "body.h"
Include dependency graph for body.c:

Go to the source code of this file.

Functions

DxfBodydxf_body_new ()
 Allocate memory for a DxfBody.
DxfBodydxf_body_init (DxfBody *body)
 Allocate memory and initialize data fields in a BODY entity.
DxfBodydxf_body_read (DxfFile *fp, DxfBody *body)
 Read data from a DXF file into a DXF BODY entity.
int dxf_body_write (DxfFile *fp, DxfBody *body)
 Write DXF output to a file for a DXF BODY entity.
int dxf_body_free (DxfBody *body)
 Free the allocated memory for a DXF BODY and all it's data fields.
void dxf_body_free_chain (DxfBody *bodies)
 Free the allocated memory for a chain of DXF BODY entities and all their data fields.
int dxf_body_get_id_code (DxfBody *body)
 Get the ID code from a DXF BODY entity.
DxfBodydxf_body_set_id_code (DxfBody *body, int id_code)
 Set the ID code for a DXF BODY entity.
char * dxf_body_get_linetype (DxfBody *body)
 Get the linetype from a DXF BODY entity.
DxfBodydxf_body_set_linetype (DxfBody *body, char *linetype)
 Set the linetype for a DXF BODY entity.
char * dxf_body_get_layer (DxfBody *body)
 Get the layer from a DXF BODY entity.
DxfBodydxf_body_set_layer (DxfBody *body, char *layer)
 Set the layer for a DXF BODY entity.
double dxf_body_get_elevation (DxfBody *body)
 Get the elevation from a DXF BODY entity.
DxfBodydxf_body_set_elevation (DxfBody *body, double elevation)
 Set the elevation for a DXF BODY entity.
double dxf_body_get_thickness (DxfBody *body)
 Get the thickness from a DXF BODY entity.
DxfBodydxf_body_set_thickness (DxfBody *body, double thickness)
 Set the thickness for a DXF BODY entity.
double dxf_body_get_linetype_scale (DxfBody *body)
 Get the linetype scale from a DXF BODY entity.
DxfBodydxf_body_set_linetype_scale (DxfBody *body, double linetype_scale)
 Set the linetype scale for a DXF BODY entity.
int16_t dxf_body_get_visibility (DxfBody *body)
 Get the visibility from a DXF BODY entity.
DxfBodydxf_body_set_visibility (DxfBody *body, int16_t visibility)
 Set the visibility for a DXF BODY entity.
int dxf_body_get_color (DxfBody *body)
 Get the color from a DXF BODY entity.
DxfBodydxf_body_set_color (DxfBody *body, int color)
 Set the color for a DXF BODY entity.
int dxf_body_get_paperspace (DxfBody *body)
 Get the paperspace flag value from a DXF BODY entity.
DxfBodydxf_body_set_paperspace (DxfBody *body, int paperspace)
 Set the paperspace flag for a DXF BODY entity.
int dxf_body_get_graphics_data_size (DxfBody *body)
 Get the graphics_data_size value from a DXF BODY entity.
DxfBodydxf_body_set_graphics_data_size (DxfBody *body, int graphics_data_size)
 Set the graphics_data_size value for a DXF BODY entity.
int16_t dxf_body_get_shadow_mode (DxfBody *body)
 Get the shadow_mode from a DXF BODY entity.
DxfBodydxf_body_set_shadow_mode (DxfBody *body, int16_t shadow_mode)
 Set the shadow_mode for a DXF BODY entity.
DxfBinaryGraphicsDatadxf_body_get_binary_graphics_data (DxfBody *body)
 Get the pointer to the binary graphics data from a DXF BODY entity.
DxfBodydxf_body_set_binary_graphics_data (DxfBody *body, DxfBinaryGraphicsData *data)
 Set the pointer to the binary_graphics_data for a DXF BODY entity.
char * dxf_body_get_dictionary_owner_soft (DxfBody *body)
 Get the soft pointer to the dictionary owner from a DXF BODY entity.
DxfBodydxf_body_set_dictionary_owner_soft (DxfBody *body, char *dictionary_owner_soft)
 Set the pointer to the dictionary_owner_soft for a DXF BODY entity.
char * dxf_body_get_material (DxfBody *body)
 Get the pointer to the material from a DXF BODY entity.
DxfBodydxf_body_set_material (DxfBody *body, char *material)
 Set the pointer to the material for a DXF BODY entity.
char * dxf_body_get_dictionary_owner_hard (DxfBody *body)
 Get the hard pointer to the dictionary owner from a DXF BODY entity.
DxfBodydxf_body_set_dictionary_owner_hard (DxfBody *body, char *dictionary_owner_hard)
 Set the pointer to the dictionary_owner_hard for a DXF BODY entity.
int16_t dxf_body_get_lineweight (DxfBody *body)
 Get the lineweight from a DXF BODY entity.
DxfBodydxf_body_set_lineweight (DxfBody *body, int16_t lineweight)
 Set the lineweight for a DXF BODY entity.
char * dxf_body_get_plot_style_name (DxfBody *body)
 Get the plot_style_name from a DXF BODY entity.
DxfBodydxf_body_set_plot_style_name (DxfBody *body, char *plot_style_name)
 Set the plot_style_name for a DXF BODY entity.
long dxf_body_get_color_value (DxfBody *body)
 Get the color_value from a DXF BODY entity.
DxfBodydxf_body_set_color_value (DxfBody *body, long color_value)
 Set the color_value for a DXF BODY entity.
char * dxf_body_get_color_name (DxfBody *body)
 Get the color_name from a DXF BODY entity.
DxfBodydxf_body_set_color_name (DxfBody *body, char *color_name)
 Set the color_name for a DXF BODY entity.
long dxf_body_get_transparency (DxfBody *body)
 Get the transparency from a DXF BODY entity.
DxfBodydxf_body_set_transparency (DxfBody *body, long transparency)
 Set the transparency for a DXF BODY entity.
DxfProprietaryDatadxf_body_get_proprietary_data (DxfBody *body)
 Get the pointer to the proprietary_data from a DXF BODY entity.
DxfBodydxf_body_set_proprietary_data (DxfBody *body, DxfProprietaryData *proprietary_data)
 Set the proprietary data for a DXF BODY entity.
DxfProprietaryDatadxf_body_get_additional_proprietary_data (DxfBody *body)
 Get the additional_proprietary_data from a DXF BODY entity.
DxfBodydxf_body_set_additional_proprietary_data (DxfBody *body, DxfProprietaryData *additional_proprietary_data)
 Set the pointer to the additional proprietary data for a DXF BODY entity.
int dxf_body_get_modeler_format_version_number (DxfBody *body)
 Get the modeler format version number from a DXF BODY entity.
DxfBodydxf_body_set_modeler_format_version_number (DxfBody *body, int modeler_format_version_number)
 Set the modeler format version number for a DXF BODY entity.
DxfBodydxf_body_get_next (DxfBody *body)
 Get the pointer to the next BODY entity from a DXF BODY entity.
DxfBodydxf_body_set_next (DxfBody *body, DxfBody *next)
 Set the pointer to the next BODY for a DXF BODY entity.
DxfBodydxf_body_get_last (DxfBody *body)
 Get the pointer to the last BODY entity from a linked list of DXF BODY entities.

Detailed Description

Functions for a DXF body entity (BODY).

Author:
Copyright (C) 2013, 2014, 2015, 2016, 2017 by Bert Timmerman <bert.timmerman@xs4all.nl>.
Warning:
The BODY entity requires AutoCAD version R13 or higher.
Version:
According to DXF R10 (backward compatibility).
According to DXF R11 (backward compatibility).
According to DXF R12 (backward compatibility).
According to DXF R13.
According to DXF R14.

Copyright Notices.


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 body.c.


Function Documentation

DxfBody* dxf_body_new ( )

Allocate memory for a DxfBody.

Fill the memory contents with zeros.

Definition at line 53 of file body.c.

References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_body_init(), and dxf_body_read().

DxfBody* dxf_body_init ( DxfBody body)
DxfBody* dxf_body_read ( DxfFile fp,
DxfBody body 
)

Read data from a DXF file into a DXF BODY entity.

The last line read from file contained the string "BODY".
Now follows some data for the BODY, 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 body.

Returns:
a pointer to body.
Parameters:
fpDXF file pointer to an input file (or device).
bodyDXF BODY entity.

Definition at line 159 of file body.c.

References _, dxf_file_struct::acad_version_number, dxf_body_struct::additional_proprietary_data, AutoCAD_11, AutoCAD_13, dxf_body_struct::color, dxf_body_struct::dictionary_owner_hard, dxf_body_struct::dictionary_owner_soft, dxf_body_init(), dxf_body_new(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, DXF_FLATLAND, dxf_proprietary_data_init(), dxf_body_struct::elevation, dxf_file_struct::filename, dxf_file_struct::fp, dxf_body_struct::id_code, dxf_body_struct::layer, dxf_proprietary_data_struct::line, dxf_file_struct::line_number, dxf_body_struct::linetype, dxf_body_struct::modeler_format_version_number, dxf_proprietary_data_struct::next, dxf_proprietary_data_struct::order, dxf_body_struct::paperspace, dxf_body_struct::proprietary_data, and dxf_body_struct::thickness.

Here is the call graph for this function:

int dxf_body_write ( DxfFile fp,
DxfBody body 
)

Write DXF output to a file for a DXF BODY entity.

Returns:
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred while reading from the input file.

Todo:
for version R14.
Implementing the start of application-defined group "{application_name", with Group code 102.
For example: "{ACAD_REACTORS" indicates the start of the AutoCAD persistent reactors group.

application-defined codes: Group codes and values within the 102 groups are application defined (optional).

End of group, "}" (optional), with Group code 102.

Parameters:
fpDXF file pointer to an output file (or device).
bodyDXF BODY entity.

Definition at line 367 of file body.c.

References _, dxf_file_struct::acad_version_number, AutoCAD_11, AutoCAD_13, AutoCAD_14, dxf_body_get_additional_proprietary_data(), dxf_body_get_color(), dxf_body_get_dictionary_owner_hard(), dxf_body_get_dictionary_owner_soft(), dxf_body_get_elevation(), dxf_body_get_id_code(), dxf_body_get_layer(), dxf_body_get_linetype(), dxf_body_get_linetype_scale(), dxf_body_get_modeler_format_version_number(), dxf_body_get_paperspace(), dxf_body_get_proprietary_data(), dxf_body_get_thickness(), dxf_body_get_visibility(), dxf_body_set_layer(), dxf_body_set_linetype(), DXF_COLOR_BYLAYER, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, DXF_FLATLAND, DXF_PAPERSPACE, dxf_proprietary_data_get_line(), dxf_proprietary_data_get_next(), dxf_file_struct::fp, and dxf_proprietary_data_struct::order.

Here is the call graph for this function:

int dxf_body_free ( DxfBody body)

Free the allocated memory for a DXF BODY and all it's data fields.

Returns:
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.
Parameters:
bodyPointer to the memory occupied by the DXF BODY entity.

Definition at line 536 of file body.c.

References _, dxf_body_struct::additional_proprietary_data, dxf_body_struct::dictionary_owner_hard, dxf_body_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_proprietary_data_free_chain(), dxf_body_struct::layer, dxf_body_struct::linetype, dxf_body_struct::next, and dxf_body_struct::proprietary_data.

Referenced by dxf_body_free_chain().

Here is the call graph for this function:

void dxf_body_free_chain ( DxfBody bodies)

Free the allocated memory for a chain of DXF BODY entities and all their data fields.

Parameters:
bodiespointer to the chain of DXF BODY entities.

Definition at line 581 of file body.c.

References _, dxf_body_free(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::next.

Here is the call graph for this function:

int dxf_body_get_id_code ( DxfBody body)

Get the ID code from a DXF BODY entity.

Returns:
ID code.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 614 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::id_code.

Referenced by dxf_body_write().

DxfBody* dxf_body_set_id_code ( DxfBody body,
int  id_code 
)

Set the ID code for a DXF BODY entity.

Parameters:
bodya pointer to a DXF BODY entity.
id_codeIdentification number for the entity.
This is to be an unique (sequential) number in the DXF file.

Definition at line 649 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::id_code.

Referenced by dxf_body_init().

char* dxf_body_get_linetype ( DxfBody body)

Get the linetype from a DXF BODY entity.

Returns:
linetype when sucessful, NULL when an error occurred.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 691 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::linetype.

Referenced by dxf_body_write().

DxfBody* dxf_body_set_linetype ( DxfBody body,
char *  linetype 
)

Set the linetype for a DXF BODY entity.

Parameters:
bodya pointer to a DXF BODY entity.
linetypea string containing the linetype for the entity.

Definition at line 726 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::linetype.

Referenced by dxf_body_init(), and dxf_body_write().

char* dxf_body_get_layer ( DxfBody body)

Get the layer from a DXF BODY entity.

Returns:
layer when sucessful, NULL when an error occurred.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 766 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::layer.

Referenced by dxf_body_write().

DxfBody* dxf_body_set_layer ( DxfBody body,
char *  layer 
)

Set the layer for a DXF BODY entity.

Parameters:
bodya pointer to a DXF BODY entity.
layera string containing the layer for the entity.

Definition at line 801 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::layer.

Referenced by dxf_body_init(), and dxf_body_write().

double dxf_body_get_elevation ( DxfBody body)

Get the elevation from a DXF BODY entity.

Returns:
elevation.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 841 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::elevation.

Referenced by dxf_body_write().

DxfBody* dxf_body_set_elevation ( DxfBody body,
double  elevation 
)

Set the elevation for a DXF BODY entity.

Parameters:
bodya pointer to a DXF BODY entity.
elevationthe elevation to be set for the entity.

Definition at line 869 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::elevation.

Referenced by dxf_body_init().

double dxf_body_get_thickness ( DxfBody body)

Get the thickness from a DXF BODY entity.

Returns:
thickness.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 902 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::thickness.

Referenced by dxf_body_write().

DxfBody* dxf_body_set_thickness ( DxfBody body,
double  thickness 
)

Set the thickness for a DXF BODY entity.

Parameters:
bodya pointer to a DXF BODY entity.
thicknessthe thickness to be set for the entity.

Definition at line 937 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::thickness.

Referenced by dxf_body_init().

double dxf_body_get_linetype_scale ( DxfBody body)

Get the linetype scale from a DXF BODY entity.

Returns:
linetype scale.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 977 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::linetype_scale.

Referenced by dxf_body_write().

DxfBody* dxf_body_set_linetype_scale ( DxfBody body,
double  linetype_scale 
)

Set the linetype scale for a DXF BODY entity.

Parameters:
bodya pointer to a DXF BODY entity.
linetype_scalethe linetype scale to be set for the entity.

Definition at line 1012 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::linetype_scale.

Referenced by dxf_body_init().

int16_t dxf_body_get_visibility ( DxfBody body)

Get the visibility from a DXF BODY entity.

Returns:
visibility.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 1052 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::visibility.

Referenced by dxf_body_write().

DxfBody* dxf_body_set_visibility ( DxfBody body,
int16_t  visibility 
)

Set the visibility for a DXF BODY entity.

Parameters:
bodya pointer to a DXF BODY entity.
visibilitythe visibility to be set for the entity.

Definition at line 1094 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::visibility.

Referenced by dxf_body_init().

int dxf_body_get_color ( DxfBody body)

Get the color from a DXF BODY entity.

Returns:
color.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 1141 of file body.c.

References _, dxf_body_struct::color, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_body_write().

DxfBody* dxf_body_set_color ( DxfBody body,
int  color 
)

Set the color for a DXF BODY entity.

Parameters:
bodya pointer to a DXF BODY entity.
colorthe color to be set for the entity.

Definition at line 1175 of file body.c.

References _, dxf_body_struct::color, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_body_init().

int dxf_body_get_paperspace ( DxfBody body)

Get the paperspace flag value from a DXF BODY entity.

Returns:
paperspace flag value.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 1216 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::paperspace.

Referenced by dxf_body_write().

DxfBody* dxf_body_set_paperspace ( DxfBody body,
int  paperspace 
)

Set the paperspace flag for a DXF BODY entity.

Parameters:
bodya pointer to a DXF BODY entity.
paperspacethe paperspace flag value to be set for the entity.

Definition at line 1256 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::paperspace.

Referenced by dxf_body_init().

int dxf_body_get_graphics_data_size ( DxfBody body)

Get the graphics_data_size value from a DXF BODY entity.

Returns:
graphics_data_size value when successful, or EXIT_FAILURE when an error occurred.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 1304 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::graphics_data_size.

DxfBody* dxf_body_set_graphics_data_size ( DxfBody body,
int  graphics_data_size 
)

Set the graphics_data_size value for a DXF BODY entity.

Returns:
a pointer to body when successful, or NULL when an error occurred.
Parameters:
bodya pointer to a DXF BODY entity.
graphics_data_sizethe graphics_data_size value to be set for the entity.

Definition at line 1347 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::graphics_data_size.

Referenced by dxf_body_init().

int16_t dxf_body_get_shadow_mode ( DxfBody body)

Get the shadow_mode from a DXF BODY entity.

Returns:
shadow_mode when successful, or EXIT_FAILURE when an error occurred.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 1396 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::shadow_mode.

DxfBody* dxf_body_set_shadow_mode ( DxfBody body,
int16_t  shadow_mode 
)

Set the shadow_mode for a DXF BODY entity.

Returns:
a pointer to body when successful, or NULL when an error occurred.
Parameters:
bodya pointer to a DXF BODY entity.
shadow_modethe shadow mode to be set for the entity.

Definition at line 1441 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::shadow_mode.

Referenced by dxf_body_init().

DxfBinaryGraphicsData* dxf_body_get_binary_graphics_data ( DxfBody body)

Get the pointer to the binary graphics data from a DXF BODY entity.

Returns:
pointer to the binary graphics data.
Warning:
No checks are performed on the returned pointer.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 1491 of file body.c.

References _, dxf_body_struct::binary_graphics_data, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_body_init().

DxfBody* dxf_body_set_binary_graphics_data ( DxfBody body,
DxfBinaryGraphicsData data 
)

Set the pointer to the binary_graphics_data for a DXF BODY entity.

Returns:
a pointer to body when successful, or NULL when an error occurred.
Parameters:
bodya pointer to a DXF BODY entity.
dataa string containing the pointer to the binary_graphics_data for the entity.

Definition at line 1530 of file body.c.

References _, dxf_body_struct::binary_graphics_data, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_body_init().

char* dxf_body_get_dictionary_owner_soft ( DxfBody body)

Get the soft pointer to the dictionary owner from a DXF BODY entity.

Returns:
soft pointer to the dictionary owner.
Warning:
No checks are performed on the returned pointer (string).
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 1574 of file body.c.

References _, dxf_body_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_body_write().

DxfBody* dxf_body_set_dictionary_owner_soft ( DxfBody body,
char *  dictionary_owner_soft 
)

Set the pointer to the dictionary_owner_soft for a DXF BODY entity.

Parameters:
bodya pointer to a DXF BODY entity.
dictionary_owner_softa string containing the pointer to the dictionary_owner_soft for the entity.

Definition at line 1610 of file body.c.

References _, dxf_body_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_body_init().

char* dxf_body_get_material ( DxfBody body)

Get the pointer to the material from a DXF BODY entity.

Returns:
a pointer to material when successful, or NULL when an error occurred.
Warning:
No checks are performed on the returned pointer.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 1655 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::material.

DxfBody* dxf_body_set_material ( DxfBody body,
char *  material 
)

Set the pointer to the material for a DXF BODY entity.

Returns:
a pointer to body when successful, or NULL when an error occurred.
Parameters:
bodya pointer to a DXF BODY entity.
materiala string containing the pointer to the material for the entity.

Definition at line 1693 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::material.

Referenced by dxf_body_init().

char* dxf_body_get_dictionary_owner_hard ( DxfBody body)

Get the hard pointer to the dictionary owner from a DXF BODY entity.

Returns:
hard pointer to the dictionary owner.
Warning:
No checks are performed on the returned pointer (string).
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 1737 of file body.c.

References _, dxf_body_struct::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_body_write().

DxfBody* dxf_body_set_dictionary_owner_hard ( DxfBody body,
char *  dictionary_owner_hard 
)

Set the pointer to the dictionary_owner_hard for a DXF BODY entity.

Parameters:
bodya pointer to a DXF BODY entity.
dictionary_owner_harda string containing the pointer to the dictionary_owner_hard for the entity.

Definition at line 1773 of file body.c.

References _, dxf_body_struct::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_body_init().

int16_t dxf_body_get_lineweight ( DxfBody body)

Get the lineweight from a DXF BODY entity.

Returns:
lineweight when successful, or EXIT_FAILURE when an error occurred.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 1815 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::lineweight.

DxfBody* dxf_body_set_lineweight ( DxfBody body,
int16_t  lineweight 
)

Set the lineweight for a DXF BODY entity.

Returns:
a pointer to body when successful, or NULL when an error occurred.
Parameters:
bodya pointer to a DXF BODY entity.
lineweightthe lineweight to be set for the entity.

Definition at line 1846 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::lineweight.

Referenced by dxf_body_init().

char* dxf_body_get_plot_style_name ( DxfBody body)

Get the plot_style_name from a DXF BODY entity.

Returns:
plot_style_name when sucessful, or NULL when an error occurred.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 1880 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::plot_style_name.

DxfBody* dxf_body_set_plot_style_name ( DxfBody body,
char *  plot_style_name 
)

Set the plot_style_name for a DXF BODY entity.

Returns:
a pointer to body when successful, or NULL when an error occurred.
Parameters:
bodya pointer to a DXF BODY entity.
plot_style_namea string containing the plot_style_name for the entity.

Definition at line 1918 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::plot_style_name.

Referenced by dxf_body_init().

long dxf_body_get_color_value ( DxfBody body)

Get the color_value from a DXF BODY entity.

Returns:
color_value when successful, or EXIT_FAILURE when an error occurred.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 1960 of file body.c.

References _, dxf_body_struct::color_value, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

DxfBody* dxf_body_set_color_value ( DxfBody body,
long  color_value 
)

Set the color_value for a DXF BODY entity.

Returns:
a pointer to body when successful, or NULL when an error occurred.
Parameters:
bodya pointer to a DXF BODY entity.
color_valuethe color_value to be set for the entity.

Definition at line 1991 of file body.c.

References _, dxf_body_struct::color_value, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_body_init().

char* dxf_body_get_color_name ( DxfBody body)

Get the color_name from a DXF BODY entity.

Returns:
color_name when sucessful, or NULL when an error occurred.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 2025 of file body.c.

References _, dxf_body_struct::color_name, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

DxfBody* dxf_body_set_color_name ( DxfBody body,
char *  color_name 
)

Set the color_name for a DXF BODY entity.

Returns:
a pointer to body when successful, or NULL when an error occurred.
Parameters:
bodya pointer to a DXF BODY entity.
color_namea string containing the color_name for the entity.

Definition at line 2063 of file body.c.

References _, dxf_body_struct::color_name, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_body_init().

long dxf_body_get_transparency ( DxfBody body)

Get the transparency from a DXF BODY entity.

Returns:
transparency when successful, or EXIT_FAILURE when an error occurred.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 2105 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::transparency.

DxfBody* dxf_body_set_transparency ( DxfBody body,
long  transparency 
)

Set the transparency for a DXF BODY entity.

Returns:
a pointer to body when successful, or NULL when an error occurred.
Parameters:
bodya pointer to a DXF BODY entity.
transparencythe transparency to be set for the entity.

Definition at line 2136 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::transparency.

Referenced by dxf_body_init().

DxfProprietaryData* dxf_body_get_proprietary_data ( DxfBody body)

Get the pointer to the proprietary_data from a DXF BODY entity.

Returns:
pointer to the proprietary_data.
Warning:
No checks are performed on the returned pointer.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 2172 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::proprietary_data.

Referenced by dxf_body_write().

DxfBody* dxf_body_set_proprietary_data ( DxfBody body,
DxfProprietaryData proprietary_data 
)

Set the proprietary data for a DXF BODY entity.

Parameters:
bodya pointer to a DXF BODY entity.
proprietary_dataa pointer to a linked list containing the proprietary_data for the entity.

Definition at line 2207 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::proprietary_data.

Referenced by dxf_body_init().

DxfProprietaryData* dxf_body_get_additional_proprietary_data ( DxfBody body)

Get the additional_proprietary_data from a DXF BODY entity.

Returns:
pointer to the additional_proprietary_data.
Warning:
No checks are performed on the returned pointer (string).
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 2250 of file body.c.

References _, dxf_body_struct::additional_proprietary_data, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_body_write().

DxfBody* dxf_body_set_additional_proprietary_data ( DxfBody body,
DxfProprietaryData additional_proprietary_data 
)

Set the pointer to the additional proprietary data for a DXF BODY entity.

Parameters:
bodya pointer to a DXF BODY entity.
additional_proprietary_dataan array containing the additional proprietary data for the entity.

Definition at line 2286 of file body.c.

References _, dxf_body_struct::additional_proprietary_data, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

int dxf_body_get_modeler_format_version_number ( DxfBody body)

Get the modeler format version number from a DXF BODY entity.

Returns:
ID code.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 2327 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::modeler_format_version_number.

Referenced by dxf_body_write().

DxfBody* dxf_body_set_modeler_format_version_number ( DxfBody body,
int  modeler_format_version_number 
)

Set the modeler format version number for a DXF BODY entity.

Parameters:
bodya pointer to a DXF BODY entity.
modeler_format_version_numberModeler format version number (currently = 1).

Definition at line 2362 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::modeler_format_version_number.

Referenced by dxf_body_init().

DxfBody* dxf_body_get_next ( DxfBody body)

Get the pointer to the next BODY entity from a DXF BODY entity.

Returns:
pointer to the next BODY entity.
Warning:
No checks are performed on the returned pointer.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 2405 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::next.

DxfBody* dxf_body_set_next ( DxfBody body,
DxfBody next 
)

Set the pointer to the next BODY for a DXF BODY entity.

Parameters:
bodya pointer to a DXF BODY entity.
nexta pointer to the next BODY for the entity.

Definition at line 2441 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::next.

Referenced by dxf_body_init().

DxfBody* dxf_body_get_last ( DxfBody body)

Get the pointer to the last BODY entity from a linked list of DXF BODY entities.

Returns:
pointer to the last BODY entity.
Warning:
No checks are performed on the returned pointer.
Parameters:
bodya pointer to a DXF BODY entity.

Definition at line 2484 of file body.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_body_struct::next.