libDXF 0.0.1
A library with DXF related functions written in C.
Data Structures | Typedefs | Functions

arc.h File Reference

Header file for a DXF arc entity (ARC). More...

#include "global.h"
#include "point.h"
#include "binary_graphics_data.h"
Include dependency graph for arc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dxf_arc_struct
 DXF definition of an AutoCAD arc entity (ARC). More...

Typedefs

typedef struct dxf_arc_struct DxfArc
 DXF definition of an AutoCAD arc entity (ARC).

Functions

DxfArcdxf_arc_new ()
 Allocate memory for a DXF ARC entity.
DxfArcdxf_arc_init (DxfArc *arc)
 Allocate memory and initialize data fields in a DXF ARC entity.
DxfArcdxf_arc_read (DxfFile *fp, DxfArc *arc)
 Read data from a DXF file into a DXF ARC entity.
int dxf_arc_write (DxfFile *fp, DxfArc *arc)
 Write DXF output for a DXF ARC entity.
int dxf_arc_free (DxfArc *arc)
 Free the allocated memory for a DXF ARC entity and all it's data fields.
void dxf_arc_free_chain (DxfArc *arcs)
 Free the allocated memory for a chain of DXF ARC entities and all their data fields.
int dxf_arc_get_id_code (DxfArc *arc)
 Get the id_code from a DXF ARC entity.
DxfArcdxf_arc_set_id_code (DxfArc *arc, int id_code)
 Set the id_code for a DXF ARC entity.
char * dxf_arc_get_linetype (DxfArc *arc)
 Get the linetype from a DXF ARC entity.
DxfArcdxf_arc_set_linetype (DxfArc *arc, char *linetype)
 Set the linetype for a DXF ARC entity.
char * dxf_arc_get_layer (DxfArc *arc)
 Get the layer from a DXF ARC entity.
DxfArcdxf_arc_set_layer (DxfArc *arc, char *layer)
 Set the layer for a DXF ARC entity.
double dxf_arc_get_elevation (DxfArc *arc)
 Get the elevation from a DXF ARC entity.
DxfArcdxf_arc_set_elevation (DxfArc *arc, double elevation)
 Set the elevation for a DXF ARC entity.
double dxf_arc_get_thickness (DxfArc *arc)
 Get the thickness from a DXF ARC entity.
DxfArcdxf_arc_set_thickness (DxfArc *arc, double thickness)
 Set the thickness for a DXF ARC entity.
double dxf_arc_get_linetype_scale (DxfArc *arc)
 Get the linetype_scale from a DXF ARC entity.
DxfArcdxf_arc_set_linetype_scale (DxfArc *arc, double linetype_scale)
 Set the linetype_scale for a DXF ARC entity.
int16_t dxf_arc_get_visibility (DxfArc *arc)
 Get the visibility from a DXF ARC entity.
DxfArcdxf_arc_set_visibility (DxfArc *arc, int16_t visibility)
 Set the visibility for a DXF ARC entity.
int dxf_arc_get_color (DxfArc *arc)
 Get the color from a DXF ARC entity.
DxfArcdxf_arc_set_color (DxfArc *arc, int color)
 Set the color for a DXF ARC entity.
int dxf_arc_get_paperspace (DxfArc *arc)
 Get the paperspace flag value from a DXF ARC entity.
DxfArcdxf_arc_set_paperspace (DxfArc *arc, int paperspace)
 Set the paperspace flag for a DXF ARC entity.
int dxf_arc_get_graphics_data_size (DxfArc *arc)
 Get the graphics_data_size value from a DXF ARC entity.
DxfArcdxf_arc_set_graphics_data_size (DxfArc *arc, int graphics_data_size)
 Set the graphics_data_size value for a DXF ARC entity.
int16_t dxf_arc_get_shadow_mode (DxfArc *arc)
 Get the shadow_mode from a DXF ARC entity.
DxfArcdxf_arc_set_shadow_mode (DxfArc *arc, int16_t shadow_mode)
 Set the shadow_mode for a DXF ARC entity.
DxfBinaryGraphicsDatadxf_arc_get_binary_graphics_data (DxfArc *arc)
 Get the pointer to the binary_graphics_data from a DXF ARC entity.
DxfArcdxf_arc_set_binary_graphics_data (DxfArc *arc, DxfBinaryGraphicsData *data)
 Set the pointer to the binary_graphics_data for a DXF ARC entity.
char * dxf_arc_get_dictionary_owner_soft (DxfArc *arc)
 Get the pointer to the dictionary_owner_soft from a DXF ARC entity.
DxfArcdxf_arc_set_dictionary_owner_soft (DxfArc *arc, char *dictionary_owner_soft)
 Set the pointer to the dictionary_owner_soft for a DXF ARC entity.
char * dxf_arc_get_material (DxfArc *arc)
 Get the pointer to the material from a DXF ARC entity.
DxfArcdxf_arc_set_material (DxfArc *arc, char *material)
 Set the pointer to the material for a DXF ARC entity.
char * dxf_arc_get_dictionary_owner_hard (DxfArc *arc)
 Get the pointer to the dictionary_owner_hard from a DXF ARC entity.
DxfArcdxf_arc_set_dictionary_owner_hard (DxfArc *arc, char *dictionary_owner_hard)
 Set the pointer to the dictionary_owner_hard for a DXF ARC entity.
int16_t dxf_arc_get_lineweight (DxfArc *arc)
 Get the lineweight from a DXF ARC entity.
DxfArcdxf_arc_set_lineweight (DxfArc *arc, int16_t lineweight)
 Set the lineweight for a DXF ARC entity.
char * dxf_arc_get_plot_style_name (DxfArc *arc)
 Get the plot_style_name from a DXF ARC entity.
DxfArcdxf_arc_set_plot_style_name (DxfArc *arc, char *plot_style_name)
 Set the plot_style_name for a DXF ARC entity.
long dxf_arc_get_color_value (DxfArc *arc)
 Get the color_value from a DXF ARC entity.
DxfArcdxf_arc_set_color_value (DxfArc *arc, long color_value)
 Set the color_value for a DXF ARC entity.
char * dxf_arc_get_color_name (DxfArc *arc)
 Get the color_name from a DXF ARC entity.
DxfArcdxf_arc_set_color_name (DxfArc *arc, char *color_name)
 Set the color_name for a DXF ARC entity.
long dxf_arc_get_transparency (DxfArc *arc)
 Get the transparency from a DXF ARC entity.
DxfArcdxf_arc_set_transparency (DxfArc *arc, long transparency)
 Set the transparency for a DXF ARC entity.
DxfPointdxf_arc_get_p0 (DxfArc *arc)
 Get the center point p0 of a DXF ARC entity.
DxfArcdxf_arc_set_p0 (DxfArc *arc, DxfPoint *p0)
 Set the center point p0 of a DXF ARC entity.
double dxf_arc_get_x0 (DxfArc *arc)
 Get the X-value of the center point x0 of a DXF ARC entity.
DxfArcdxf_arc_set_x0 (DxfArc *arc, double x0)
 Set the X-value of the center point x0 of a DXF ARC entity.
double dxf_arc_get_y0 (DxfArc *arc)
 Get the Y-value of the center point y0 of a DXF ARC entity.
DxfArcdxf_arc_set_y0 (DxfArc *arc, double y0)
 Set the Y-value of the center point y0 of a DXF ARC entity.
double dxf_arc_get_z0 (DxfArc *arc)
 Get the Z-value of the center point z0 of a DXF ARC entity.
DxfArcdxf_arc_set_z0 (DxfArc *arc, double z0)
 Set the Z-value of the center point z0 of a DXF ARC entity.
double dxf_arc_get_radius (DxfArc *arc)
 Get the radius from a DXF ARC entity.
DxfArcdxf_arc_set_radius (DxfArc *arc, double radius)
 Set the radius for a DXF ARC entity.
double dxf_arc_get_start_angle (DxfArc *arc)
 Get the start_angle from a DXF ARC entity.
DxfArcdxf_arc_set_start_angle (DxfArc *arc, double start_angle)
 Set the start_angle for a DXF ARC entity.
double dxf_arc_get_end_angle (DxfArc *arc)
 Get the end_angle from a DXF ARC entity.
DxfArcdxf_arc_set_end_angle (DxfArc *arc, double end_angle)
 Set the end_angle for a DXF ARC entity.
double dxf_arc_get_length (DxfArc *arc)
 Calculate the length of a DXF ARC entity.
DxfPointdxf_arc_get_extrusion_vector_as_point (DxfArc *arc)
 Get the extrusion vector as a DXF POINT entity from a DXF ARC entity.
double dxf_arc_get_extr_x0 (DxfArc *arc)
 Get the X-value of the extrusion vector extr_x0 of a DXF ARC entity.
DxfArcdxf_arc_set_extr_x0 (DxfArc *arc, double extr_x0)
 Set the X-value of the extrusion vector extr_x0 of a DXF ARC entity.
double dxf_arc_get_extr_y0 (DxfArc *arc)
 Get the Y-value of the extrusion vector extr_y0 of a DXF ARC entity.
DxfArcdxf_arc_set_extr_y0 (DxfArc *arc, double extr_y0)
 Set the Y-value of the extrusion vector extr_y0 of a DXF ARC entity.
double dxf_arc_get_extr_z0 (DxfArc *arc)
 Get the Z-value of the extrusion vector extr_z0 of a DXF ARC entity.
DxfArcdxf_arc_set_extr_z0 (DxfArc *arc, double extr_z0)
 Set the Z-value of the extrusion vector extr_z0 of a DXF ARC entity.
DxfArcdxf_arc_set_extrusion_vector_from_point (DxfArc *arc, DxfPoint *point)
 Set the extrusion vector from a DXF POINT for a DXF ARC entity.
DxfArcdxf_arc_set_extrusion_vector (DxfArc *arc, double extr_x0, double extr_y0, double extr_z0)
 Set the extrusion vector for a DXF ARC entity.
DxfArcdxf_arc_get_next (DxfArc *arc)
 Get the pointer to the next ARC entity from a DXF ARC entity.
DxfArcdxf_arc_set_next (DxfArc *arc, DxfArc *next)
 Set the pointer to the next ARC for a DXF ARC entity.
DxfArcdxf_arc_get_last (DxfArc *arc)
 Get the pointer to the last ARC entity from a linked list of DXF ARC entities.

Detailed Description

Header file for a DXF arc entity (ARC).

Author:
Copyright (C) 2008, 2009, 2010, 2012, 2103, 2014, 2015, 2016, 2017 by Bert Timmerman <bert.timmerman@xs4all.nl>.

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 arc.h.


Typedef Documentation

typedef struct dxf_arc_struct DxfArc

DXF definition of an AutoCAD arc entity (ARC).

Version:
According to DXF R10.
According to DXF R11.
According to DXF R12.
According to DXF R13.
According to DXF R14.

Function Documentation

DxfArc* dxf_arc_new ( )

Allocate memory for a DXF ARC entity.

Fill the memory contents with zeros.

Returns:
NULL when no memory was allocated, a pointer to the allocated memory when succesful.

Definition at line 54 of file arc.c.

References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_arc_init(), and dxf_arc_read().

DxfArc* dxf_arc_init ( DxfArc arc)
DxfArc* dxf_arc_read ( DxfFile fp,
DxfArc arc 
)

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

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

Returns:
a pointer to arc.
Parameters:
fpDXF file pointer to an input file (or device).
arca pointer to the DXF ARC entity.

Definition at line 168 of file arc.c.

References _, dxf_file_struct::acad_version_number, AutoCAD_11, AutoCAD_13, dxf_arc_struct::color, dxf_arc_struct::dictionary_owner_hard, dxf_arc_struct::dictionary_owner_soft, dxf_arc_init(), dxf_arc_new(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, dxf_arc_struct::elevation, dxf_arc_struct::end_angle, dxf_arc_struct::extr_x0, dxf_arc_struct::extr_y0, dxf_arc_struct::extr_z0, dxf_file_struct::filename, dxf_file_struct::fp, dxf_arc_struct::id_code, dxf_arc_struct::layer, dxf_file_struct::line_number, dxf_arc_struct::linetype, dxf_arc_struct::linetype_scale, dxf_arc_struct::p0, dxf_arc_struct::paperspace, dxf_arc_struct::radius, dxf_arc_struct::start_angle, dxf_arc_struct::thickness, dxf_arc_struct::visibility, dxf_point_struct::x0, dxf_point_struct::y0, and dxf_point_struct::z0.

Here is the call graph for this function:

int dxf_arc_write ( DxfFile fp,
DxfArc arc 
)

Write DXF output for a DXF ARC entity.

Returns:
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.

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).
arca pointer to the DXF ARC entity.

Definition at line 407 of file arc.c.

References _, dxf_file_struct::acad_version_number, AutoCAD_11, AutoCAD_12, AutoCAD_13, AutoCAD_14, dxf_arc_get_color(), dxf_arc_get_dictionary_owner_hard(), dxf_arc_get_dictionary_owner_soft(), dxf_arc_get_elevation(), dxf_arc_get_end_angle(), dxf_arc_get_extr_x0(), dxf_arc_get_extr_y0(), dxf_arc_get_extr_z0(), dxf_arc_get_id_code(), dxf_arc_get_layer(), dxf_arc_get_linetype(), dxf_arc_get_linetype_scale(), dxf_arc_get_paperspace(), dxf_arc_get_radius(), dxf_arc_get_start_angle(), dxf_arc_get_thickness(), dxf_arc_get_visibility(), dxf_arc_get_x0(), dxf_arc_get_y0(), dxf_arc_get_z0(), dxf_arc_set_layer(), dxf_arc_set_linetype(), DXF_COLOR_BYLAYER, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, DXF_FLATLAND, DXF_PAPERSPACE, and dxf_file_struct::fp.

Here is the call graph for this function:

int dxf_arc_free ( DxfArc arc)

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

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

Definition at line 625 of file arc.c.

References _, dxf_arc_struct::color_name, dxf_arc_struct::dictionary_owner_hard, dxf_arc_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_point_free(), dxf_arc_struct::layer, dxf_arc_struct::linetype, dxf_arc_struct::material, dxf_arc_struct::next, dxf_arc_struct::p0, and dxf_arc_struct::plot_style_name.

Referenced by dxf_arc_free_chain().

Here is the call graph for this function:

void dxf_arc_free_chain ( DxfArc arcs)

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

Parameters:
arcsa pointer to the chain of DXF ARC entities.

Definition at line 672 of file arc.c.

References _, dxf_arc_free(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_arc_struct::next.

Here is the call graph for this function:

int dxf_arc_get_id_code ( DxfArc arc)

Get the id_code from a DXF ARC entity.

Returns:
id_code.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 705 of file arc.c.

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

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_id_code ( DxfArc arc,
int  id_code 
)

Set the id_code for a DXF ARC entity.

Parameters:
arca pointer to a DXF ARC entity.
id_codethe id_code to be set for the entity.
This is to be an unique (sequential) number in the DXF file.

Definition at line 739 of file arc.c.

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

Referenced by dxf_arc_init().

char* dxf_arc_get_linetype ( DxfArc arc)

Get the linetype from a DXF ARC entity.

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

Definition at line 780 of file arc.c.

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

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_linetype ( DxfArc arc,
char *  linetype 
)

Set the linetype for a DXF ARC entity.

Parameters:
arca pointer to a DXF ARC entity.
linetypea pointer to a string containing the linetype to be set for the entity.

Definition at line 815 of file arc.c.

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

Referenced by dxf_arc_init(), and dxf_arc_write().

char* dxf_arc_get_layer ( DxfArc arc)

Get the layer from a DXF ARC entity.

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

Definition at line 856 of file arc.c.

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

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_layer ( DxfArc arc,
char *  layer 
)

Set the layer for a DXF ARC entity.

Parameters:
arca pointer to a DXF ARC entity.
layera pointer to a string containing the layer to be set for the entity.

Definition at line 891 of file arc.c.

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

Referenced by dxf_arc_init(), and dxf_arc_write().

double dxf_arc_get_elevation ( DxfArc arc)

Get the elevation from a DXF ARC entity.

Returns:
elevation.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 932 of file arc.c.

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

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_elevation ( DxfArc arc,
double  elevation 
)

Set the elevation for a DXF ARC entity.

Parameters:
arca pointer to a DXF ARC entity.
elevationthe elevation to be set for the entity.

Definition at line 960 of file arc.c.

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

Referenced by dxf_arc_init().

double dxf_arc_get_thickness ( DxfArc arc)

Get the thickness from a DXF ARC entity.

Returns:
thickness.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 993 of file arc.c.

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

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_thickness ( DxfArc arc,
double  thickness 
)

Set the thickness for a DXF ARC entity.

Parameters:
arca pointer to a DXF ARC entity.
thicknessthe thickness to be set for the entity.

Definition at line 1028 of file arc.c.

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

Referenced by dxf_arc_init().

double dxf_arc_get_linetype_scale ( DxfArc arc)

Get the linetype_scale from a DXF ARC entity.

Returns:
linetype_scale.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 1068 of file arc.c.

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

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_linetype_scale ( DxfArc arc,
double  linetype_scale 
)

Set the linetype_scale for a DXF ARC entity.

Parameters:
arca pointer to a DXF ARC entity.
linetype_scalethe linetype_scale to be set for the entity.

Definition at line 1103 of file arc.c.

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

Referenced by dxf_arc_init().

int16_t dxf_arc_get_visibility ( DxfArc arc)

Get the visibility from a DXF ARC entity.

Returns:
visibility.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 1143 of file arc.c.

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

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_visibility ( DxfArc arc,
int16_t  visibility 
)

Set the visibility for a DXF ARC entity.

Parameters:
arca pointer to a DXF ARC entity.
visibilitythe visibility to be set for the entity.

Definition at line 1185 of file arc.c.

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

Referenced by dxf_arc_init().

int dxf_arc_get_color ( DxfArc arc)

Get the color from a DXF ARC entity.

Returns:
color.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 1232 of file arc.c.

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

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_color ( DxfArc arc,
int  color 
)

Set the color for a DXF ARC entity.

Parameters:
arca pointer to a DXF ARC entity.
colorthe color to be set for the entity.

Definition at line 1266 of file arc.c.

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

Referenced by dxf_arc_init().

int dxf_arc_get_paperspace ( DxfArc arc)

Get the paperspace flag value from a DXF ARC entity.

Returns:
paperspace flag value.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 1305 of file arc.c.

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

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_paperspace ( DxfArc arc,
int  paperspace 
)

Set the paperspace flag for a DXF ARC entity.

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

Definition at line 1345 of file arc.c.

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

Referenced by dxf_arc_init().

int dxf_arc_get_graphics_data_size ( DxfArc arc)

Get the graphics_data_size value from a DXF ARC entity.

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

Definition at line 1394 of file arc.c.

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

DxfArc* dxf_arc_set_graphics_data_size ( DxfArc arc,
int  graphics_data_size 
)

Set the graphics_data_size value for a DXF ARC entity.

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

Definition at line 1437 of file arc.c.

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

Referenced by dxf_arc_init().

int16_t dxf_arc_get_shadow_mode ( DxfArc arc)

Get the shadow_mode from a DXF ARC entity.

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

Definition at line 1485 of file arc.c.

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

DxfArc* dxf_arc_set_shadow_mode ( DxfArc arc,
int16_t  shadow_mode 
)

Set the shadow_mode for a DXF ARC entity.

Returns:
a pointer to arc when successful, or NULL when an error occurred.
Parameters:
arca pointer to a DXF ARC entity.
shadow_modethe shadow_mode to be set for the entity.

Definition at line 1530 of file arc.c.

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

Referenced by dxf_arc_init().

DxfBinaryGraphicsData* dxf_arc_get_binary_graphics_data ( DxfArc arc)

Get the pointer to the binary_graphics_data from a DXF ARC entity.

Returns:
pointer to the binary_graphics_data.
Warning:
No checks are performed on the returned pointer.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 1580 of file arc.c.

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

Referenced by dxf_arc_init().

DxfArc* dxf_arc_set_binary_graphics_data ( DxfArc arc,
DxfBinaryGraphicsData data 
)

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

Parameters:
arca pointer to a DXF ARC entity.
dataa string containing the pointer to the binary_graphics_data for the entity.

Definition at line 1616 of file arc.c.

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

Referenced by dxf_arc_init().

char* dxf_arc_get_dictionary_owner_soft ( DxfArc arc)

Get the pointer to the dictionary_owner_soft from a DXF ARC entity.

Returns:
pointer to the dictionary_owner_soft.
Warning:
No checks are performed on the returned pointer (string).
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 1660 of file arc.c.

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

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_dictionary_owner_soft ( DxfArc arc,
char *  dictionary_owner_soft 
)

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

Parameters:
arca pointer to a DXF ARC entity.
dictionary_owner_softa string containing the pointer to the dictionary_owner_soft for the entity.

Definition at line 1696 of file arc.c.

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

Referenced by dxf_arc_init().

char* dxf_arc_get_material ( DxfArc arc)

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

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

Definition at line 1740 of file arc.c.

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

DxfArc* dxf_arc_set_material ( DxfArc arc,
char *  material 
)

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

Returns:
a pointer to arc when successful, or NULL when an error occurred.
Parameters:
arca pointer to a DXF ARC entity.
materiala string containing the pointer to the material for the entity.

Definition at line 1778 of file arc.c.

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

Referenced by dxf_arc_init().

char* dxf_arc_get_dictionary_owner_hard ( DxfArc arc)

Get the pointer to the dictionary_owner_hard from a DXF ARC entity.

Returns:
pointer to the dictionary_owner_hard.
Warning:
No checks are performed on the returned pointer (string).
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 1822 of file arc.c.

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

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_dictionary_owner_hard ( DxfArc arc,
char *  dictionary_owner_hard 
)

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

Parameters:
arca pointer to a DXF ARC entity.
dictionary_owner_harda string containing the pointer to the dictionary_owner_hard for the entity.

Definition at line 1858 of file arc.c.

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

Referenced by dxf_arc_init().

int16_t dxf_arc_get_lineweight ( DxfArc arc)

Get the lineweight from a DXF ARC entity.

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

Definition at line 1900 of file arc.c.

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

DxfArc* dxf_arc_set_lineweight ( DxfArc arc,
int16_t  lineweight 
)

Set the lineweight for a DXF ARC entity.

Returns:
a pointer to arc when successful, or NULL when an error occurred.
Parameters:
arca pointer to a DXF ARC entity.
lineweightthe lineweight to be set for the entity.

Definition at line 1931 of file arc.c.

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

Referenced by dxf_arc_init().

char* dxf_arc_get_plot_style_name ( DxfArc arc)

Get the plot_style_name from a DXF ARC entity.

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

Definition at line 1965 of file arc.c.

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

DxfArc* dxf_arc_set_plot_style_name ( DxfArc arc,
char *  plot_style_name 
)

Set the plot_style_name for a DXF ARC entity.

Returns:
a pointer to arc when successful, or NULL when an error occurred.
Parameters:
arca pointer to a DXF ARC entity.
plot_style_namea string containing the plot_style_name for the entity.

Definition at line 2003 of file arc.c.

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

Referenced by dxf_arc_init().

long dxf_arc_get_color_value ( DxfArc arc)

Get the color_value from a DXF ARC entity.

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

Definition at line 2045 of file arc.c.

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

DxfArc* dxf_arc_set_color_value ( DxfArc arc,
long  color_value 
)

Set the color_value for a DXF ARC entity.

Returns:
a pointer to arc when successful, or NULL when an error occurred.
Parameters:
arca pointer to a DXF ARC entity.
color_valuethe color_value to be set for the entity.

Definition at line 2076 of file arc.c.

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

Referenced by dxf_arc_init().

char* dxf_arc_get_color_name ( DxfArc arc)

Get the color_name from a DXF ARC entity.

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

Definition at line 2110 of file arc.c.

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

DxfArc* dxf_arc_set_color_name ( DxfArc arc,
char *  color_name 
)

Set the color_name for a DXF ARC entity.

Returns:
a pointer to arc when successful, or NULL when an error occurred.
Parameters:
arca pointer to a DXF ARC entity.
color_namea string containing the color_name for the entity.

Definition at line 2148 of file arc.c.

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

Referenced by dxf_arc_init().

long dxf_arc_get_transparency ( DxfArc arc)

Get the transparency from a DXF ARC entity.

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

Definition at line 2190 of file arc.c.

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

DxfArc* dxf_arc_set_transparency ( DxfArc arc,
long  transparency 
)

Set the transparency for a DXF ARC entity.

Returns:
a pointer to arc when successful, or NULL when an error occurred.
Parameters:
arca pointer to a DXF ARC entity.
transparencythe transparency to be set for the entity.

Definition at line 2221 of file arc.c.

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

Referenced by dxf_arc_init().

DxfPoint* dxf_arc_get_p0 ( DxfArc arc)

Get the center point p0 of a DXF ARC entity.

Returns:
the center point p0.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 2254 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_arc_struct::p0.

Referenced by dxf_arc_init().

DxfArc* dxf_arc_set_p0 ( DxfArc arc,
DxfPoint p0 
)

Set the center point p0 of a DXF ARC entity.

Returns:
a pointer to a DXF ARC entity.
Parameters:
arca pointer to a DXF ARC entity.
p0a pointer to a DXF POINT entity.

Definition at line 2291 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_arc_struct::p0.

Referenced by dxf_arc_init().

double dxf_arc_get_x0 ( DxfArc arc)

Get the X-value of the center point x0 of a DXF ARC entity.

Returns:
the X-value of the center point x0.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 2332 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_arc_struct::p0, and dxf_point_struct::x0.

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_x0 ( DxfArc arc,
double  x0 
)

Set the X-value of the center point x0 of a DXF ARC entity.

Returns:
a pointer to arc when successful, or NULL when an error occurred.
Parameters:
arca pointer to a DXF ARC entity.
x0the X-value of the center point x0 of a DXF ARC entity.

Definition at line 2372 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_arc_struct::p0, and dxf_point_struct::x0.

Referenced by dxf_arc_init().

double dxf_arc_get_y0 ( DxfArc arc)

Get the Y-value of the center point y0 of a DXF ARC entity.

Returns:
the Y-value of the center point y0.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 2414 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_arc_struct::p0, and dxf_point_struct::y0.

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_y0 ( DxfArc arc,
double  y0 
)

Set the Y-value of the center point y0 of a DXF ARC entity.

Returns:
a pointer to arc when successful, or NULL when an error occurred.
Parameters:
arca pointer to a DXF ARC entity.
y0the Y-value of the center point y0 of a DXF ARC entity.

Definition at line 2454 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_arc_struct::p0, and dxf_point_struct::y0.

Referenced by dxf_arc_init().

double dxf_arc_get_z0 ( DxfArc arc)

Get the Z-value of the center point z0 of a DXF ARC entity.

Returns:
the Z-value of the center point z0.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 2496 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_arc_struct::p0, and dxf_point_struct::z0.

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_z0 ( DxfArc arc,
double  z0 
)

Set the Z-value of the center point z0 of a DXF ARC entity.

Returns:
a pointer to arc when successful, or NULL when an error occurred.
Parameters:
arca pointer to a DXF ARC entity.
z0the Z-value of the center point z0 of a DXF ARC entity.

Definition at line 2536 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_arc_struct::p0, and dxf_point_struct::z0.

Referenced by dxf_arc_init().

double dxf_arc_get_radius ( DxfArc arc)

Get the radius from a DXF ARC entity.

Returns:
radius.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 2577 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_arc_struct::radius.

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_radius ( DxfArc arc,
double  radius 
)

Set the radius for a DXF ARC entity.

Parameters:
arca pointer to a DXF ARC entity.
radiusthe radius to be set for the entity.

Definition at line 2619 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_arc_struct::radius.

Referenced by dxf_arc_init().

double dxf_arc_get_start_angle ( DxfArc arc)

Get the start_angle from a DXF ARC entity.

Returns:
start_angle.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 2666 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_arc_struct::start_angle.

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_start_angle ( DxfArc arc,
double  start_angle 
)

Set the start_angle for a DXF ARC entity.

Parameters:
arca pointer to a DXF ARC entity.
start_anglethe start_angle to be set for the entity.

Definition at line 2694 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_arc_struct::start_angle.

Referenced by dxf_arc_init().

double dxf_arc_get_end_angle ( DxfArc arc)

Get the end_angle from a DXF ARC entity.

Returns:
end_angle.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 2727 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_arc_struct::end_angle.

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_end_angle ( DxfArc arc,
double  end_angle 
)

Set the end_angle for a DXF ARC entity.

Parameters:
arca pointer to a DXF ARC entity.
end_anglethe end_angle to be set for the entity.

Definition at line 2755 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_arc_struct::end_angle.

Referenced by dxf_arc_init().

double dxf_arc_get_length ( DxfArc arc)

Calculate the length of a DXF ARC entity.

Returns:
the length.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 2788 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_arc_struct::end_angle, dxf_arc_struct::radius, and dxf_arc_struct::start_angle.

DxfPoint* dxf_arc_get_extrusion_vector_as_point ( DxfArc arc)

Get the extrusion vector as a DXF POINT entity from a DXF ARC entity.

Returns:
a DXF POINT containing the extrusion coordinates.
Warning:
No other members are copied into the DXF POINT.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 2836 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_point_init(), dxf_arc_struct::extr_x0, dxf_arc_struct::extr_y0, and dxf_arc_struct::extr_z0.

Here is the call graph for this function:

double dxf_arc_get_extr_x0 ( DxfArc arc)

Get the X-value of the extrusion vector extr_x0 of a DXF ARC entity.

Returns:
the X-value of the extrusion vector extr_x0.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 2880 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_arc_struct::extr_x0.

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_extr_x0 ( DxfArc arc,
double  extr_x0 
)

Set the X-value of the extrusion vector extr_x0 of a DXF ARC entity.

Returns:
a pointer to arc when successful, or NULL when an error occurred.
Parameters:
arca pointer to a DXF ARC entity.
extr_x0the X-value of the extrusion vector extr_x0 of a DXF ARC entity.

Definition at line 2913 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_arc_struct::extr_x0.

Referenced by dxf_arc_init().

double dxf_arc_get_extr_y0 ( DxfArc arc)

Get the Y-value of the extrusion vector extr_y0 of a DXF ARC entity.

Returns:
the Y-value of the extrusion vector extr_y0.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 2948 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_arc_struct::extr_y0.

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_extr_y0 ( DxfArc arc,
double  extr_y0 
)

Set the Y-value of the extrusion vector extr_y0 of a DXF ARC entity.

Returns:
a pointer to arc when successful, or NULL when an error occurred.
Parameters:
arca pointer to a DXF ARC entity.
extr_y0the Y-value of the extrusion vector extr_y0 of a DXF ARC entity.

Definition at line 2981 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_arc_struct::extr_y0.

Referenced by dxf_arc_init().

double dxf_arc_get_extr_z0 ( DxfArc arc)

Get the Z-value of the extrusion vector extr_z0 of a DXF ARC entity.

Returns:
the Z-value of the extrusion vector extr_z0.
Parameters:
arca pointer to a DXF ARC entity.

Definition at line 3016 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_arc_struct::extr_z0.

Referenced by dxf_arc_write().

DxfArc* dxf_arc_set_extr_z0 ( DxfArc arc,
double  extr_z0 
)

Set the Z-value of the extrusion vector extr_z0 of a DXF ARC entity.

Returns:
a pointer to arc when successful, or NULL when an error occurred.
Parameters:
arca pointer to a DXF ARC entity.
extr_z0the Z-value of the extrusion vector extr_z0 of a DXF ARC entity.

Definition at line 3049 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_arc_struct::extr_z0.

Referenced by dxf_arc_init().

DxfArc* dxf_arc_set_extrusion_vector_from_point ( DxfArc arc,
DxfPoint point 
)

Set the extrusion vector from a DXF POINT for a DXF ARC entity.

Parameters:
arca pointer to a DXF ARC entity.
pointa pointer to a DXF POINT entity.

Definition at line 3082 of file arc.c.

References _, DEBUG, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_arc_struct::extr_x0, dxf_arc_struct::extr_y0, dxf_arc_struct::extr_z0, dxf_point_struct::x0, dxf_point_struct::y0, and dxf_point_struct::z0.

DxfArc* dxf_arc_set_extrusion_vector ( DxfArc arc,
double  extr_x0,
double  extr_y0,
double  extr_z0 
)

Set the extrusion vector for a DXF ARC entity.

Parameters:
arca pointer to a DXF ARC entity.
extr_x0X-value of the extrusion direction.
extr_y0Y-value of the extrusion direction.
extr_z0Z-value of the extrusion direction.

Definition at line 3122 of file arc.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_arc_struct::extr_x0, dxf_arc_struct::extr_y0, and dxf_arc_struct::extr_z0.

DxfArc* dxf_arc_get_next ( DxfArc arc)

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

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

Definition at line 3164 of file arc.c.

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

DxfArc* dxf_arc_set_next ( DxfArc arc,
DxfArc next 
)

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

Parameters:
arca pointer to a DXF ARC entity.
nexta pointer to the next ARC for the entity.

Definition at line 3200 of file arc.c.

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

Referenced by dxf_arc_init().

DxfArc* dxf_arc_get_last ( DxfArc arc)

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

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

Definition at line 3243 of file arc.c.

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