1
/****************************************************************************
2
** $Id: dl_entities.h 2398 2005-06-06 18:12:14Z andrew $
4
** Copyright (C) 2001-2003 RibbonSoft. All rights reserved.
6
** This file is part of the dxflib project.
8
** This file may be distributed and/or modified under the terms of the
9
** GNU General Public License version 2 as published by the Free Software
10
** Foundation and appearing in the file LICENSE.GPL included in the
11
** packaging of this file.
13
** Licensees holding valid dxflib Professional Edition licenses may use
14
** this file in accordance with the dxflib Commercial License
15
** Agreement provided with the Software.
17
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
18
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20
** See http://www.ribbonsoft.com for further details.
22
** Contact info@ribbonsoft.com if any conditions of this licensing are
25
**********************************************************************/
37
* @author Andrew Mustun
43
* Parameters: see member variables.
45
DL_LayerData( const string& lName,
54
/** Layer flags. (1 = frozen, 2 = frozen by default, 4 = locked) */
63
* @author Andrew Mustun
69
* Parameters: see member variables.
71
DL_BlockData( const string& bName,
73
double bbpx, double bbpy, double bbpz )
84
/** Block flags. (not used currently) */
86
/** X Coordinate of base point. */
88
/** Y Coordinate of base point. */
90
/** Z Coordinate of base point. */
99
* @author Andrew Mustun
101
struct DL_LineTypeData
105
* Parameters: see member variables.
107
DL_LineTypeData( const string& lName,
114
/** Line type name. */
116
/** Line type flags. */
125
* @author Andrew Mustun
131
* Parameters: see member variables.
133
DL_PointData( double px = 0.0, double py = 0.0, double pz = 0.0 )
140
/*! X Coordinate of the point. */
142
/*! Y Coordinate of the point. */
144
/*! Z Coordinate of the point. */
153
* @author Andrew Mustun
159
* Parameters: see member variables.
161
DL_LineData( double lx1, double ly1, double lz1,
162
double lx2, double ly2, double lz2 )
173
/*! X Start coordinate of the point. */
175
/*! Y Start coordinate of the point. */
177
/*! Z Start coordinate of the point. */
180
/*! X End coordinate of the point. */
182
/*! Y End coordinate of the point. */
184
/*! Z End coordinate of the point. */
193
* @author Andrew Mustun
199
* Parameters: see member variables.
201
DL_ArcData( double acx, double acy, double acz,
203
double aAngle1, double aAngle2 )
214
/*! X Coordinate of center point. */
216
/*! Y Coordinate of center point. */
218
/*! Z Coordinate of center point. */
221
/*! Radius of arc. */
223
/*! Startangle of arc in degrees. */
225
/*! Endangle of arc in degrees. */
234
* @author Andrew Mustun
240
* Parameters: see member variables.
242
DL_CircleData( double acx, double acy, double acz,
252
/*! X Coordinate of center point. */
254
/*! Y Coordinate of center point. */
256
/*! Z Coordinate of center point. */
259
/*! Radius of arc. */
268
* @author Andrew Mustun
270
struct DL_PolylineData
274
* Parameters: see member variables.
276
DL_PolylineData( int pNumber, int pMVerteces, int pNVerteces, int pFlags )
284
/*! Number of vertices in this polyline. */
287
/*! Number of vertices in m direction if polyline is a polygon mesh. */
290
/*! Number of vertices in n direction if polyline is a polygon mesh. */
302
* @author Andrew Mustun
308
* Parameters: see member variables.
310
DL_VertexData( double px = 0.0, double py = 0.0, double pz = 0.0,
311
double pBulge = 0.0 )
319
/*! X Coordinate of the vertex. */
321
/*! Y Coordinate of the vertex. */
323
/*! Z Coordinate of the vertex. */
326
* (The tangent of 1/4 of the arc angle or 0 for lines) */
349
typedef DL_TraceData DL_SolidData;
355
* @author Andrew Mustun
361
* Parameters: see member variables.
363
DL_SplineData( int pDegree, int pNKnots, int pNControl, int pFlags )
367
nControl = pNControl;
371
/*! Degree of the spline curve. */
374
/*! Number of knots. */
377
/*! Number of control points. */
378
unsigned int nControl;
389
* @author Andrew Mustun
396
* Parameters: see member variables.
398
DL_KnotData( double pk )
410
* Spline control point data.
412
* @author Andrew Mustun
414
struct DL_ControlPointData
418
* Parameters: see member variables.
420
DL_ControlPointData( double px, double py, double pz )
427
/*! X coordinate of the control point. */
429
/*! Y coordinate of the control point. */
431
/*! Z coordinate of the control point. */
439
* @author Andrew Mustun
441
struct DL_EllipseData
445
* Parameters: see member variables.
447
DL_EllipseData( double ecx, double ecy, double ecz,
448
double emx, double emy, double emz,
450
double eAngle1, double eAngle2 )
464
/*! X Coordinate of center point. */
466
/*! Y Coordinate of center point. */
468
/*! Z Coordinate of center point. */
471
/*! X coordinate of the endpoint of the major axis. */
473
/*! Y coordinate of the endpoint of the major axis. */
475
/*! Z coordinate of the endpoint of the major axis. */
478
/*! Ratio of minor axis to major axis.. */
480
/*! Startangle of ellipse in rad. */
482
/*! Endangle of ellipse in rad. */
491
* @author Andrew Mustun
497
* Parameters: see member variables.
499
DL_InsertData( const string& iName,
500
double iipx, double iipy, double iipz,
501
double isx, double isy, double isz,
503
int iCols, int iRows,
504
double iColSp, double iRowSp )
520
/*! Name of the referred block. */
522
/*! X Coordinate of insertion point. */
524
/*! Y Coordinate of insertion point. */
526
/*! Z Coordinate of insertion point. */
528
/*! X Scale factor. */
530
/*! Y Scale factor. */
532
/*! Z Scale factor. */
534
/*! Rotation angle in rad. */
536
/*! Number of colums if we insert an array of the block or 1. */
538
/*! Number of rows if we insert an array of the block or 1. */
540
/*! Values for the spacing between cols. */
542
/*! Values for the spacing between rows. */
551
* @author Andrew Mustun
557
* Parameters: see member variables.
559
DL_MTextData( double tipx, double tipy, double tipz,
560
double tHeight, double tWidth,
561
int tAttachmentPoint,
562
int tDrawingDirection,
563
int tLineSpacingStyle,
564
double tLineSpacingFactor,
566
const string& tStyle,
575
attachmentPoint = tAttachmentPoint;
576
drawingDirection = tDrawingDirection;
577
lineSpacingStyle = tLineSpacingStyle;
578
lineSpacingFactor = tLineSpacingFactor;
584
/*! X Coordinate of insertion point. */
586
/*! Y Coordinate of insertion point. */
588
/*! Z Coordinate of insertion point. */
592
/*! Width of the text box. */
597
* 1 = Top left, 2 = Top center, 3 = Top right,
598
* 4 = Middle left, 5 = Middle center, 6 = Middle right,
599
* 7 = Bottom left, 8 = Bottom center, 9 = Bottom right
605
* 1 = left to right, 3 = top to bottom, 5 = by style
607
int drawingDirection;
609
* Line spacing style.
611
* 1 = at least, 2 = exact
613
int lineSpacingStyle;
615
* Line spacing factor. 0.25 .. 4.0
617
double lineSpacingFactor;
622
/*! Rotation angle. */
631
* @author Andrew Mustun
637
* Parameters: see member variables.
639
DL_TextData( double tipx, double tipy, double tipz,
640
double tapx, double tapy, double tapz,
641
double tHeight, double tXScaleFactor,
642
int tTextGenerationFlags,
646
const string& tStyle,
658
xScaleFactor = tXScaleFactor;
659
textGenerationFlags = tTextGenerationFlags;
660
hJustification = tHJustification;
661
vJustification = tVJustification;
667
/*! X Coordinate of insertion point. */
669
/*! Y Coordinate of insertion point. */
671
/*! Z Coordinate of insertion point. */
674
/*! X Coordinate of alignment point. */
676
/*! Y Coordinate of alignment point. */
678
/*! Z Coordinate of alignment point. */
683
/*! Relative X scale factor. */
685
/*! 0 = default, 2 = Backwards, 4 = Upside down */
686
int textGenerationFlags;
688
* Horizontal justification.
690
* 0 = Left (default), 1 = Center, 2 = Right,
691
* 3 = Aligned, 4 = Middle, 5 = Fit
692
* For 3, 4, 5 the vertical alignment has to be 0.
696
* Vertical justification.
698
* 0 = Baseline (default), 1 = Bottom, 2 = Middle, 3= Top
705
/*! Rotation angle of dimension text away from default orientation. */
712
* Generic Dimension Data.
714
* @author Andrew Mustun
716
struct DL_DimensionData
720
* Parameters: see member variables.
722
DL_DimensionData( double ddpx, double ddpy, double ddpz,
723
double dmpx, double dmpy, double dmpz,
725
int dAttachmentPoint,
726
int dLineSpacingStyle,
727
double dLineSpacingFactor,
729
const string& dStyle,
743
attachmentPoint = dAttachmentPoint;
744
lineSpacingStyle = dLineSpacingStyle;
745
lineSpacingFactor = dLineSpacingFactor;
751
/*! X Coordinate of definition point. */
753
/*! Y Coordinate of definition point. */
755
/*! Z Coordinate of definition point. */
757
/*! X Coordinate of middle point of the text. */
759
/*! Y Coordinate of middle point of the text. */
761
/*! Z Coordinate of middle point of the text. */
766
* 0 Rotated, horizontal, or vertical
773
* 64 Ordinate type. This is a bit value (bit 7)
774
* used only with integer value 6. If set,
775
* ordinate is X-type; if not set, ordinate is
777
* 128 This is a bit value (bit 8) added to the
778
* other group 70 values if the dimension text
779
* has been positioned at a user-defined
780
* location rather than at the default location
786
* 1 = Top left, 2 = Top center, 3 = Top right,
787
* 4 = Middle left, 5 = Middle center, 6 = Middle right,
788
* 7 = Bottom left, 8 = Bottom center, 9 = Bottom right,
792
* Line spacing style.
794
* 1 = at least, 2 = exact
796
int lineSpacingStyle;
798
* Line spacing factor. 0.25 .. 4.0
800
double lineSpacingFactor;
804
* Text string entered explicitly by user or null
805
* or "<>" for the actual measurement or " " (one blank space).
806
* for supressing the text.
809
/*! Dimension style (font name). */
812
* Rotation angle of dimension text away from
813
* default orientation.
821
* Aligned Dimension Data.
823
* @author Andrew Mustun
825
struct DL_DimAlignedData
829
* Parameters: see member variables.
831
DL_DimAlignedData( double depx1, double depy1, double depz1,
832
double depx2, double depy2, double depz2 )
844
/*! X Coordinate of Extension point 1. */
846
/*! Y Coordinate of Extension point 1. */
848
/*! Z Coordinate of Extension point 1. */
851
/*! X Coordinate of Extension point 2. */
853
/*! Y Coordinate of Extension point 2. */
855
/*! Z Coordinate of Extension point 2. */
862
* Linear Dimension Data.
864
* @author Andrew Mustun
866
struct DL_DimLinearData
870
* Parameters: see member variables.
872
DL_DimLinearData( double ddpx1, double ddpy1, double ddpz1,
873
double ddpx2, double ddpy2, double ddpz2,
874
double dAngle, double dOblique )
889
/*! X Coordinate of Extension point 1. */
891
/*! Y Coordinate of Extension point 1. */
893
/*! Z Coordinate of Extension point 1. */
896
/*! X Coordinate of Extension point 2. */
898
/*! Y Coordinate of Extension point 2. */
900
/*! Z Coordinate of Extension point 2. */
903
/*! Rotation angle (angle of dimension line) in degrees. */
905
/*! Oblique angle in degrees. */
912
* Radial Dimension Data.
914
* @author Andrew Mustun
916
struct DL_DimRadialData
920
* Parameters: see member variables.
922
DL_DimRadialData( double ddpx, double ddpy, double ddpz, double dleader )
931
/*! X Coordinate of definition point. */
933
/*! Y Coordinate of definition point. */
935
/*! Z Coordinate of definition point. */
945
* Diametric Dimension Data.
947
* @author Andrew Mustun
949
struct DL_DimDiametricData
953
* Parameters: see member variables.
955
DL_DimDiametricData( double ddpx, double ddpy, double ddpz, double dleader )
964
/*! X Coordinate of definition point. */
966
/*! Y Coordinate of definition point. */
968
/*! Z Coordinate of definition point. */
978
* Angular Dimension Data.
980
* @author Andrew Mustun
982
struct DL_DimAngularData
986
* Parameters: see member variables.
988
DL_DimAngularData( double ddpx1, double ddpy1, double ddpz1,
989
double ddpx2, double ddpy2, double ddpz2,
990
double ddpx3, double ddpy3, double ddpz3,
991
double ddpx4, double ddpy4, double ddpz4 )
1011
/*! X Coordinate of definition point 1. */
1013
/*! Y Coordinate of definition point 1. */
1015
/*! Z Coordinate of definition point 1. */
1018
/*! X Coordinate of definition point 2. */
1020
/*! Y Coordinate of definition point 2. */
1022
/*! Z Coordinate of definition point 2. */
1025
/*! X Coordinate of definition point 3. */
1027
/*! Y Coordinate of definition point 3. */
1029
/*! Z Coordinate of definition point 3. */
1032
/*! X Coordinate of definition point 4. */
1034
/*! Y Coordinate of definition point 4. */
1036
/*! Z Coordinate of definition point 4. */
1042
* Angular Dimension Data (3 points version).
1044
* @author Andrew Mustun
1046
struct DL_DimAngular3PData
1050
* Parameters: see member variables.
1052
DL_DimAngular3PData( double ddpx1, double ddpy1, double ddpz1,
1053
double ddpx2, double ddpy2, double ddpz2,
1054
double ddpx3, double ddpy3, double ddpz3 )
1070
/*! X Coordinate of definition point 1. */
1072
/*! Y Coordinate of definition point 1. */
1074
/*! Z Coordinate of definition point 1. */
1077
/*! X Coordinate of definition point 2. */
1079
/*! Y Coordinate of definition point 2. */
1081
/*! Z Coordinate of definition point 2. */
1084
/*! X Coordinate of definition point 3. */
1086
/*! Y Coordinate of definition point 3. */
1088
/*! Z Coordinate of definition point 3. */
1097
* @author Andrew Mustun
1099
struct DL_LeaderData
1103
* Parameters: see member variables.
1105
DL_LeaderData( int lArrowHeadFlag,
1106
int lLeaderPathType,
1107
int lLeaderCreationFlag,
1108
int lHooklineDirectionFlag,
1110
double lTextAnnotationHeight,
1111
double lTextAnnotationWidth,
1115
arrowHeadFlag = lArrowHeadFlag;
1116
leaderPathType = lLeaderPathType;
1117
leaderCreationFlag = lLeaderCreationFlag;
1118
hooklineDirectionFlag = lHooklineDirectionFlag;
1119
hooklineFlag = lHooklineFlag;
1120
textAnnotationHeight = lTextAnnotationHeight;
1121
textAnnotationWidth = lTextAnnotationWidth;
1125
/*! Arrow head flag (71). */
1127
/*! Leader path type (72). */
1129
/*! Leader creation flag (73). */
1130
int leaderCreationFlag;
1131
/*! Hookline direction flag (74). */
1132
int hooklineDirectionFlag;
1133
/*! Hookline flag (75) */
1135
/*! Text annotation height (40). */
1136
double textAnnotationHeight;
1137
/*! Text annotation width (41) */
1138
double textAnnotationWidth;
1139
/*! Number of vertices in leader (76). */
1146
* Leader Vertex Data.
1148
* @author Andrew Mustun
1150
struct DL_LeaderVertexData
1154
* Parameters: see member variables.
1156
DL_LeaderVertexData( double px = 0.0, double py = 0.0, double pz = 0.0 )
1163
/*! X Coordinate of the vertex. */
1165
/*! Y Coordinate of the vertex. */
1167
/*! Z Coordinate of the vertex. */
1179
* Default constructor.
1185
* Parameters: see member variables.
1187
DL_HatchData( int hNumLoops,
1191
const string& hPattern )
1193
numLoops = hNumLoops;
1200
/*! Number of boundary paths (loops). */
1202
/*! Solid fill flag (true=solid, false=pattern). */
1204
/*! Pattern scale or spacing */
1206
/*! Pattern angle */
1208
/*! Pattern name. */
1215
* Hatch boundary path (loop) data.
1217
struct DL_HatchLoopData
1220
* Default constructor.
1222
DL_HatchLoopData() {}
1225
* Parameters: see member variables.
1227
DL_HatchLoopData( int hNumEdges )
1229
numEdges = hNumEdges;
1232
/*! Number of edges in this loop. */
1241
struct DL_HatchEdgeData
1244
* Default constructor.
1252
* Constructor for a line edge.
1253
* Parameters: see member variables.
1255
DL_HatchEdgeData( double lx1, double ly1,
1256
double lx2, double ly2 )
1267
* Constructor for an arc edge.
1268
* Parameters: see member variables.
1270
DL_HatchEdgeData( double acx, double acy,
1272
double aAngle1, double aAngle2,
1286
* Edge type. 1=line, 2=arc.
1291
* Set to true if this edge is fully defined.
1295
/*! Start point (X). */
1297
/*! Start point (Y). */
1299
/*! End point (X). */
1301
/*! End point (Y). */
1303
/*! Center point of arc (X). */
1305
/*! Center point of arc (Y). */
1313
/*! Counterclockwise flag. */
1322
* @author Andrew Mustun
1328
* Parameters: see member variables.
1330
DL_ImageData( const string& iref,
1331
double iipx, double iipy, double iipz,
1332
double iux, double iuy, double iuz,
1333
double ivx, double ivy, double ivz,
1334
int iwidth, int iheight,
1335
int ibrightness, int icontrast, int ifade )
1349
brightness = ibrightness;
1350
contrast = icontrast;
1354
/*! Reference to the image file
1355
(unique, used to refer to the image def object). */
1357
/*! X Coordinate of insertion point. */
1359
/*! Y Coordinate of insertion point. */
1361
/*! Z Coordinate of insertion point. */
1363
/*! X Coordinate of u vector along bottom of image. */
1365
/*! Y Coordinate of u vector along bottom of image. */
1367
/*! Z Coordinate of u vector along bottom of image. */
1369
/*! X Coordinate of v vector along left side of image. */
1371
/*! Y Coordinate of v vector along left side of image. */
1373
/*! Z Coordinate of v vector along left side of image. */
1375
/*! Width of image in pixel. */
1377
/*! Height of image in pixel. */
1379
/*! Brightness (0..100, default = 50). */
1381
/*! Contrast (0..100, default = 50). */
1383
/*! Fade (0..100, default = 0). */
1390
* Image Definition Data.
1392
* @author Andrew Mustun
1394
struct DL_ImageDefData
1398
* Parameters: see member variables.
1400
DL_ImageDefData( const string& iref,
1401
const string& ifile )
1407
/*! Reference to the image file
1408
(unique, used to refer to the image def object). */