Horizon
dl_entities.h
1 /****************************************************************************
2 ** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved.
3 **
4 ** This file is part of the dxflib project.
5 **
6 ** This file is free software; you can redistribute it and/or modify
7 ** it under the terms of the GNU General Public License as published by
8 ** the Free Software Foundation; either version 2 of the License, or
9 ** (at your option) any later version.
10 **
11 ** Licensees holding valid dxflib Professional Edition licenses may use
12 ** this file in accordance with the dxflib Commercial License
13 ** Agreement provided with the Software.
14 **
15 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 **
18 ** See http://www.ribbonsoft.com for further details.
19 **
20 ** Contact info@ribbonsoft.com if any conditions of this licensing are
21 ** not clear to you.
22 **
23 **********************************************************************/
24 
25 #ifndef DL_ENTITIES_H
26 #define DL_ENTITIES_H
27 
28 #include "dl_global.h"
29 
30 #include <string>
31 #include <vector>
32 
36 struct DXFLIB_EXPORT DL_LayerData {
41  DL_LayerData(const std::string& lName,
42  int lFlags) {
43  name = lName;
44  flags = lFlags;
45  }
46 
48  std::string name;
50  int flags;
51 };
52 
53 
54 
58 struct DXFLIB_EXPORT DL_BlockData {
63  DL_BlockData(const std::string& bName,
64  int bFlags,
65  double bbpx, double bbpy, double bbpz) {
66  name = bName;
67  flags = bFlags;
68  bpx = bbpx;
69  bpy = bbpy;
70  bpz = bbpz;
71  }
72 
74  std::string name;
76  int flags;
78  double bpx;
80  double bpy;
82  double bpz;
83 };
84 
85 
89 struct DXFLIB_EXPORT DL_LinetypeData {
95  const std::string& name,
96  const std::string& description,
97  int flags,
98  int numberOfDashes,
99  double patternLength,
100  double* pattern = NULL
101  )
102  : name(name),
103  description(description),
104  flags(flags),
105  numberOfDashes(numberOfDashes),
106  patternLength(patternLength),
107  pattern(pattern)
108  {}
109 
111  std::string name;
113  std::string description;
115  int flags;
117  int numberOfDashes;
119  double patternLength;
121  double* pattern;
122 };
123 
124 
125 
129 struct DXFLIB_EXPORT DL_StyleData {
134  DL_StyleData(
135  const std::string& name,
136  int flags,
137  double fixedTextHeight,
138  double widthFactor,
139  double obliqueAngle,
140  int textGenerationFlags,
141  double lastHeightUsed,
142  const std::string& primaryFontFile,
143  const std::string& bigFontFile
144  )
145  : name(name),
146  flags(flags),
147  fixedTextHeight(fixedTextHeight),
148  widthFactor(widthFactor),
149  obliqueAngle(obliqueAngle),
150  textGenerationFlags(textGenerationFlags),
151  lastHeightUsed(lastHeightUsed),
152  primaryFontFile(primaryFontFile),
153  bigFontFile(bigFontFile),
154  bold(false),
155  italic(false) {
156  }
157 
158  bool operator==(const DL_StyleData& other) {
159  // ignore lastHeightUsed:
160  return (name==other.name &&
161  flags==other.flags &&
162  fixedTextHeight==other.fixedTextHeight &&
163  widthFactor==other.widthFactor &&
164  obliqueAngle==other.obliqueAngle &&
165  textGenerationFlags==other.textGenerationFlags &&
166  primaryFontFile==other.primaryFontFile &&
167  bigFontFile==other.bigFontFile);
168  }
169 
171  std::string name;
173  int flags;
175  double fixedTextHeight;
177  double widthFactor;
179  double obliqueAngle;
181  int textGenerationFlags;
183  double lastHeightUsed;
185  std::string primaryFontFile;
187  std::string bigFontFile;
188 
189  bool bold;
190  bool italic;
191 };
192 
196 struct DXFLIB_EXPORT DL_PointData {
201  DL_PointData(double px=0.0, double py=0.0, double pz=0.0) {
202  x = px;
203  y = py;
204  z = pz;
205  }
206 
208  double x;
210  double y;
212  double z;
213 };
214 
215 
216 
220 struct DXFLIB_EXPORT DL_LineData {
225  DL_LineData(double lx1, double ly1, double lz1,
226  double lx2, double ly2, double lz2) {
227  x1 = lx1;
228  y1 = ly1;
229  z1 = lz1;
230 
231  x2 = lx2;
232  y2 = ly2;
233  z2 = lz2;
234  }
235 
237  double x1;
239  double y1;
241  double z1;
242 
244  double x2;
246  double y2;
248  double z2;
249 };
250 
254 struct DXFLIB_EXPORT DL_XLineData {
259  DL_XLineData(double bx, double by, double bz,
260  double dx, double dy, double dz) :
261  bx(bx), by(by), bz(bz),
262  dx(dx), dy(dy), dz(dz) {
263  }
264 
266  double bx;
268  double by;
270  double bz;
271 
273  double dx;
275  double dy;
277  double dz;
278 };
279 
283 struct DXFLIB_EXPORT DL_RayData {
288  DL_RayData(double bx, double by, double bz,
289  double dx, double dy, double dz) :
290  bx(bx), by(by), bz(bz),
291  dx(dx), dy(dy), dz(dz) {
292  }
293 
295  double bx;
297  double by;
299  double bz;
300 
302  double dx;
304  double dy;
306  double dz;
307 };
308 
309 
310 
314 struct DXFLIB_EXPORT DL_ArcData {
319  DL_ArcData(double acx, double acy, double acz,
320  double aRadius,
321  double aAngle1, double aAngle2) {
322 
323  cx = acx;
324  cy = acy;
325  cz = acz;
326  radius = aRadius;
327  angle1 = aAngle1;
328  angle2 = aAngle2;
329  }
330 
332  double cx;
334  double cy;
336  double cz;
337 
339  double radius;
341  double angle1;
343  double angle2;
344 };
345 
346 
347 
351 struct DXFLIB_EXPORT DL_CircleData {
356  DL_CircleData(double acx, double acy, double acz,
357  double aRadius) {
358 
359  cx = acx;
360  cy = acy;
361  cz = acz;
362  radius = aRadius;
363  }
364 
366  double cx;
368  double cy;
370  double cz;
371 
373  double radius;
374 };
375 
376 
377 
381 struct DXFLIB_EXPORT DL_PolylineData {
386  DL_PolylineData(int pNumber, int pMVerteces, int pNVerteces, int pFlags) {
387  number = pNumber;
388  m = pMVerteces;
389  n = pNVerteces;
390  flags = pFlags;
391  }
392 
394  unsigned int number;
395 
397  unsigned int m;
398 
400  unsigned int n;
401 
403  int flags;
404 };
405 
406 
407 
411 struct DXFLIB_EXPORT DL_VertexData {
416  DL_VertexData(double px=0.0, double py=0.0, double pz=0.0,
417  double pBulge=0.0) {
418  x = px;
419  y = py;
420  z = pz;
421  bulge = pBulge;
422  }
423 
425  double x;
427  double y;
429  double z;
432  double bulge;
433 };
434 
435 
439 struct DXFLIB_EXPORT DL_TraceData {
440  DL_TraceData() {
441  thickness = 0.0;
442  for (int i=0; i<4; i++) {
443  x[i] = 0.0;
444  y[i] = 0.0;
445  z[i] = 0.0;
446  }
447  }
448 
453  DL_TraceData(double sx1, double sy1, double sz1,
454  double sx2, double sy2, double sz2,
455  double sx3, double sy3, double sz3,
456  double sx4, double sy4, double sz4,
457  double sthickness=0.0) {
458 
459  thickness = sthickness;
460 
461  x[0] = sx1;
462  y[0] = sy1;
463  z[0] = sz1;
464 
465  x[1] = sx2;
466  y[1] = sy2;
467  z[1] = sz2;
468 
469  x[2] = sx3;
470  y[2] = sy3;
471  z[2] = sz3;
472 
473  x[3] = sx4;
474  y[3] = sy4;
475  z[3] = sz4;
476  }
477 
479  double thickness;
480 
482  double x[4];
483  double y[4];
484  double z[4];
485 };
486 
487 
488 
489 
490 
494 typedef DL_TraceData DL_SolidData;
495 
496 
501 
502 
506 struct DXFLIB_EXPORT DL_SplineData {
511  DL_SplineData(int degree,
512  int nKnots,
513  int nControl,
514  int nFit,
515  int flags) :
516  degree(degree),
517  nKnots(nKnots),
518  nControl(nControl),
519  nFit(nFit),
520  flags(flags) {
521  }
522 
524  unsigned int degree;
525 
527  unsigned int nKnots;
528 
530  unsigned int nControl;
531 
533  unsigned int nFit;
534 
536  int flags;
537 
538  double tangentStartX;
539  double tangentStartY;
540  double tangentStartZ;
541  double tangentEndX;
542  double tangentEndY;
543  double tangentEndZ;
544 };
545 
546 
547 
551 struct DXFLIB_EXPORT DL_KnotData {
552  DL_KnotData() {}
557  DL_KnotData(double pk) {
558  k = pk;
559  }
560 
562  double k;
563 };
564 
565 
566 
570 struct DXFLIB_EXPORT DL_ControlPointData {
575  DL_ControlPointData(double px, double py, double pz, double weight) {
576  x = px;
577  y = py;
578  z = pz;
579  w = weight;
580  }
581 
583  double x;
585  double y;
587  double z;
589  double w;
590 };
591 
592 
593 
597 struct DXFLIB_EXPORT DL_FitPointData {
602  DL_FitPointData(double x, double y, double z) : x(x), y(y), z(z) {}
603 
605  double x;
607  double y;
609  double z;
610 };
611 
612 
613 
617 struct DXFLIB_EXPORT DL_EllipseData {
622  DL_EllipseData(double cx, double cy, double cz,
623  double mx, double my, double mz,
624  double ratio,
625  double angle1, double angle2)
626  : cx(cx),
627  cy(cy),
628  cz(cz),
629  mx(mx),
630  my(my),
631  mz(mz),
632  ratio(ratio),
633  angle1(angle1),
634  angle2(angle2) {
635  }
636 
638  double cx;
640  double cy;
642  double cz;
643 
645  double mx;
647  double my;
649  double mz;
650 
652  double ratio;
654  double angle1;
656  double angle2;
657 };
658 
659 
660 
664 struct DXFLIB_EXPORT DL_InsertData {
669  DL_InsertData(const std::string& name,
670  double ipx, double ipy, double ipz,
671  double sx, double sy, double sz,
672  double angle,
673  int cols, int rows,
674  double colSp, double rowSp) :
675  name(name),
676  ipx(ipx), ipy(ipy), ipz(ipz),
677  sx(sx), sy(sy), sz(sz),
678  angle(angle),
679  cols(cols), rows(rows),
680  colSp(colSp), rowSp(rowSp) {
681  }
682 
684  std::string name;
686  double ipx;
688  double ipy;
690  double ipz;
692  double sx;
694  double sy;
696  double sz;
698  double angle;
700  int cols;
702  int rows;
704  double colSp;
706  double rowSp;
707 };
708 
709 
710 
714 struct DXFLIB_EXPORT DL_MTextData {
719  DL_MTextData(double ipx, double ipy, double ipz,
720  double dirx, double diry, double dirz,
721  double height, double width,
722  int attachmentPoint,
723  int drawingDirection,
724  int lineSpacingStyle,
725  double lineSpacingFactor,
726  const std::string& text,
727  const std::string& style,
728  double angle) :
729  ipx(ipx), ipy(ipy), ipz(ipz),
730  dirx(dirx), diry(diry), dirz(dirz),
731  height(height), width(width),
732  attachmentPoint(attachmentPoint),
733  drawingDirection(drawingDirection),
734  lineSpacingStyle(lineSpacingStyle),
735  lineSpacingFactor(lineSpacingFactor),
736  text(text),
737  style(style),
738  angle(angle) {
739 
740  }
741 
743  double ipx;
745  double ipy;
747  double ipz;
749  double dirx;
751  double diry;
753  double dirz;
755  double height;
757  double width;
765  int attachmentPoint;
771  int drawingDirection;
777  int lineSpacingStyle;
781  double lineSpacingFactor;
783  std::string text;
785  std::string style;
787  double angle;
788 };
789 
790 
791 
795 struct DXFLIB_EXPORT DL_TextData {
800  DL_TextData(double ipx, double ipy, double ipz,
801  double apx, double apy, double apz,
802  double height, double xScaleFactor,
803  int textGenerationFlags,
804  int hJustification,
805  int vJustification,
806  const std::string& text,
807  const std::string& style,
808  double angle)
809  : ipx(ipx), ipy(ipy), ipz(ipz),
810  apx(apx), apy(apy), apz(apz),
811  height(height), xScaleFactor(xScaleFactor),
812  textGenerationFlags(textGenerationFlags),
813  hJustification(hJustification),
814  vJustification(vJustification),
815  text(text),
816  style(style),
817  angle(angle) {
818  }
819 
821  double ipx;
823  double ipy;
825  double ipz;
826 
828  double apx;
830  double apy;
832  double apz;
833 
835  double height;
837  double xScaleFactor;
839  int textGenerationFlags;
847  int hJustification;
853  int vJustification;
855  std::string text;
857  std::string style;
859  double angle;
860 };
861 
862 
866 struct DXFLIB_EXPORT DL_AttributeData : public DL_TextData {
867  DL_AttributeData(const DL_TextData& tData, const std::string& tag)
868  : DL_TextData(tData), tag(tag) {
869 
870  }
871 
876  DL_AttributeData(double ipx, double ipy, double ipz,
877  double apx, double apy, double apz,
878  double height, double xScaleFactor,
879  int textGenerationFlags,
880  int hJustification,
881  int vJustification,
882  const std::string& tag,
883  const std::string& text,
884  const std::string& style,
885  double angle)
886  : DL_TextData(ipx, ipy, ipz,
887  apx, apy, apz,
888  height, xScaleFactor,
889  textGenerationFlags,
890  hJustification,
891  vJustification,
892  text,
893  style,
894  angle),
895  tag(tag) {
896  }
897 
899  std::string tag;
900 };
901 
902 
906 struct DXFLIB_EXPORT DL_DimensionData {
911  DL_DimensionData(double dpx, double dpy, double dpz,
912  double mpx, double mpy, double mpz,
913  int type,
914  int attachmentPoint,
915  int lineSpacingStyle,
916  double lineSpacingFactor,
917  const std::string& text,
918  const std::string& style,
919  double angle,
920  double linearFactor = 1.0,
921  double dimScale = 1.0) :
922  dpx(dpx), dpy(dpy), dpz(dpz),
923  mpx(mpx), mpy(mpy), mpz(mpz),
924  type(type),
925  attachmentPoint(attachmentPoint),
926  lineSpacingStyle(lineSpacingStyle),
927  lineSpacingFactor(lineSpacingFactor),
928  text(text),
929  style(style),
930  angle(angle),
931  linearFactor(linearFactor),
932  dimScale(dimScale) {
933 
934  }
935 
937  double dpx;
939  double dpy;
941  double dpz;
943  double mpx;
945  double mpy;
947  double mpz;
967  int type;
975  int attachmentPoint;
981  int lineSpacingStyle;
985  double lineSpacingFactor;
993  std::string text;
995  std::string style;
1000  double angle;
1004  double linearFactor;
1008  double dimScale;
1009 };
1010 
1011 
1012 
1016 struct DXFLIB_EXPORT DL_DimAlignedData {
1021  DL_DimAlignedData(double depx1, double depy1, double depz1,
1022  double depx2, double depy2, double depz2) {
1023 
1024  epx1 = depx1;
1025  epy1 = depy1;
1026  epz1 = depz1;
1027 
1028  epx2 = depx2;
1029  epy2 = depy2;
1030  epz2 = depz2;
1031  }
1032 
1034  double epx1;
1036  double epy1;
1038  double epz1;
1039 
1041  double epx2;
1043  double epy2;
1045  double epz2;
1046 };
1047 
1048 
1049 
1053 struct DXFLIB_EXPORT DL_DimLinearData {
1058  DL_DimLinearData(double ddpx1, double ddpy1, double ddpz1,
1059  double ddpx2, double ddpy2, double ddpz2,
1060  double dAngle, double dOblique) {
1061 
1062  dpx1 = ddpx1;
1063  dpy1 = ddpy1;
1064  dpz1 = ddpz1;
1065 
1066  dpx2 = ddpx2;
1067  dpy2 = ddpy2;
1068  dpz2 = ddpz2;
1069 
1070  angle = dAngle;
1071  oblique = dOblique;
1072  }
1073 
1075  double dpx1;
1077  double dpy1;
1079  double dpz1;
1080 
1082  double dpx2;
1084  double dpy2;
1086  double dpz2;
1087 
1089  double angle;
1091  double oblique;
1092 };
1093 
1094 
1095 
1099 struct DXFLIB_EXPORT DL_DimRadialData {
1104  DL_DimRadialData(double ddpx, double ddpy, double ddpz, double dleader) {
1105  dpx = ddpx;
1106  dpy = ddpy;
1107  dpz = ddpz;
1108 
1109  leader = dleader;
1110  }
1111 
1113  double dpx;
1115  double dpy;
1117  double dpz;
1118 
1120  double leader;
1121 };
1122 
1123 
1124 
1128 struct DXFLIB_EXPORT DL_DimDiametricData {
1133  DL_DimDiametricData(double ddpx, double ddpy, double ddpz, double dleader) {
1134  dpx = ddpx;
1135  dpy = ddpy;
1136  dpz = ddpz;
1137 
1138  leader = dleader;
1139  }
1140 
1142  double dpx;
1144  double dpy;
1146  double dpz;
1147 
1149  double leader;
1150 };
1151 
1152 
1153 
1157 struct DXFLIB_EXPORT DL_DimAngularData {
1162  DL_DimAngularData(double ddpx1, double ddpy1, double ddpz1,
1163  double ddpx2, double ddpy2, double ddpz2,
1164  double ddpx3, double ddpy3, double ddpz3,
1165  double ddpx4, double ddpy4, double ddpz4) {
1166 
1167  dpx1 = ddpx1;
1168  dpy1 = ddpy1;
1169  dpz1 = ddpz1;
1170 
1171  dpx2 = ddpx2;
1172  dpy2 = ddpy2;
1173  dpz2 = ddpz2;
1174 
1175  dpx3 = ddpx3;
1176  dpy3 = ddpy3;
1177  dpz3 = ddpz3;
1178 
1179  dpx4 = ddpx4;
1180  dpy4 = ddpy4;
1181  dpz4 = ddpz4;
1182  }
1183 
1185  double dpx1;
1187  double dpy1;
1189  double dpz1;
1190 
1192  double dpx2;
1194  double dpy2;
1196  double dpz2;
1197 
1199  double dpx3;
1201  double dpy3;
1203  double dpz3;
1204 
1206  double dpx4;
1208  double dpy4;
1210  double dpz4;
1211 };
1212 
1213 
1217 struct DXFLIB_EXPORT DL_DimAngular3PData {
1222  DL_DimAngular3PData(double ddpx1, double ddpy1, double ddpz1,
1223  double ddpx2, double ddpy2, double ddpz2,
1224  double ddpx3, double ddpy3, double ddpz3) {
1225 
1226  dpx1 = ddpx1;
1227  dpy1 = ddpy1;
1228  dpz1 = ddpz1;
1229 
1230  dpx2 = ddpx2;
1231  dpy2 = ddpy2;
1232  dpz2 = ddpz2;
1233 
1234  dpx3 = ddpx3;
1235  dpy3 = ddpy3;
1236  dpz3 = ddpz3;
1237  }
1238 
1240  double dpx1;
1242  double dpy1;
1244  double dpz1;
1245 
1247  double dpx2;
1249  double dpy2;
1251  double dpz2;
1252 
1254  double dpx3;
1256  double dpy3;
1258  double dpz3;
1259 };
1260 
1261 
1262 
1266 struct DXFLIB_EXPORT DL_DimOrdinateData {
1271  DL_DimOrdinateData(double ddpx1, double ddpy1, double ddpz1,
1272  double ddpx2, double ddpy2, double ddpz2,
1273  bool dxtype) {
1274 
1275  dpx1 = ddpx1;
1276  dpy1 = ddpy1;
1277  dpz1 = ddpz1;
1278 
1279  dpx2 = ddpx2;
1280  dpy2 = ddpy2;
1281  dpz2 = ddpz2;
1282 
1283  xtype = dxtype;
1284  }
1285 
1287  double dpx1;
1289  double dpy1;
1291  double dpz1;
1292 
1294  double dpx2;
1296  double dpy2;
1298  double dpz2;
1299 
1301  bool xtype;
1302 };
1303 
1304 
1305 
1309 struct DXFLIB_EXPORT DL_LeaderData {
1314  DL_LeaderData(int lArrowHeadFlag,
1315  int lLeaderPathType,
1316  int lLeaderCreationFlag,
1317  int lHooklineDirectionFlag,
1318  int lHooklineFlag,
1319  double lTextAnnotationHeight,
1320  double lTextAnnotationWidth,
1321  int lNumber) {
1322 
1323  arrowHeadFlag = lArrowHeadFlag;
1324  leaderPathType = lLeaderPathType;
1325  leaderCreationFlag = lLeaderCreationFlag;
1326  hooklineDirectionFlag = lHooklineDirectionFlag;
1327  hooklineFlag = lHooklineFlag;
1328  textAnnotationHeight = lTextAnnotationHeight;
1329  textAnnotationWidth = lTextAnnotationWidth;
1330  number = lNumber;
1331  }
1332 
1334  int arrowHeadFlag;
1336  int leaderPathType;
1338  int leaderCreationFlag;
1340  int hooklineDirectionFlag;
1342  int hooklineFlag;
1344  double textAnnotationHeight;
1346  double textAnnotationWidth;
1348  int number;
1349 };
1350 
1351 
1352 
1356 struct DXFLIB_EXPORT DL_LeaderVertexData {
1361  DL_LeaderVertexData(double px=0.0, double py=0.0, double pz=0.0) {
1362  x = px;
1363  y = py;
1364  z = pz;
1365  }
1366 
1368  double x;
1370  double y;
1372  double z;
1373 };
1374 
1375 
1376 
1380 struct DXFLIB_EXPORT DL_HatchData {
1384  DL_HatchData() {}
1385 
1390  DL_HatchData(int numLoops,
1391  bool solid,
1392  double scale,
1393  double angle,
1394  const std::string& pattern,
1395  double originX = 0.0,
1396  double originY = 0.0) :
1397  numLoops(numLoops),
1398  solid(solid),
1399  scale(scale),
1400  angle(angle),
1401  pattern(pattern),
1402  originX(originX),
1403  originY(originY) {
1404 
1405  }
1406 
1408  int numLoops;
1410  bool solid;
1412  double scale;
1414  double angle;
1416  std::string pattern;
1418  double originX;
1419  double originY;
1420 };
1421 
1422 
1423 
1427 struct DXFLIB_EXPORT DL_HatchLoopData {
1431  DL_HatchLoopData() {}
1436  DL_HatchLoopData(int hNumEdges) {
1437  numEdges = hNumEdges;
1438  }
1439 
1441  int numEdges;
1442 };
1443 
1444 
1445 
1449 struct DXFLIB_EXPORT DL_HatchEdgeData {
1453  DL_HatchEdgeData() : defined(false), x1(0.0), y1(0.0), x2(0.0), y2(0.0) {
1454  }
1455 
1460  DL_HatchEdgeData(double x1, double y1,
1461  double x2, double y2) :
1462  defined(true),
1463  type(1),
1464  x1(x1),
1465  y1(y1),
1466  x2(x2),
1467  y2(y2) {
1468  }
1469 
1474  DL_HatchEdgeData(double cx, double cy,
1475  double radius,
1476  double angle1, double angle2,
1477  bool ccw) :
1478  defined(true),
1479  type(2),
1480  cx(cx),
1481  cy(cy),
1482  radius(radius),
1483  angle1(angle1),
1484  angle2(angle2),
1485  ccw(ccw) {
1486  }
1487 
1492  DL_HatchEdgeData(double cx, double cy,
1493  double mx, double my,
1494  double ratio,
1495  double angle1, double angle2,
1496  bool ccw) :
1497  defined(true),
1498  type(3),
1499  cx(cx),
1500  cy(cy),
1501  angle1(angle1),
1502  angle2(angle2),
1503  ccw(ccw),
1504  mx(mx),
1505  my(my),
1506  ratio(ratio) {
1507  }
1508 
1513  DL_HatchEdgeData(unsigned int degree,
1514  bool rational,
1515  bool periodic,
1516  unsigned int nKnots,
1517  unsigned int nControl,
1518  unsigned int nFit,
1519  const std::vector<double>& knots,
1520  const std::vector<std::vector<double> >& controlPoints,
1521  const std::vector<std::vector<double> >& fitPoints,
1522  const std::vector<double>& weights,
1523  double startTangentX,
1524  double startTangentY,
1525  double endTangentX,
1526  double endTangentY) :
1527  defined(true),
1528  type(4),
1529  degree(degree),
1530  rational(rational),
1531  periodic(periodic),
1532  nKnots(nKnots),
1533  nControl(nControl),
1534  nFit(nFit),
1535  controlPoints(controlPoints),
1536  knots(knots),
1537  weights(weights),
1538  fitPoints(fitPoints),
1539  startTangentX(startTangentX),
1540  startTangentY(startTangentY),
1541  endTangentX(endTangentX),
1542  endTangentY(endTangentY) {
1543  }
1544 
1548  bool defined;
1549 
1553  int type = 1;
1554 
1555  // line edges:
1556 
1558  double x1;
1560  double y1;
1562  double x2;
1564  double y2;
1565 
1567  double cx = 0;
1569  double cy = 0;
1571  double radius = 0;
1573  double angle1 = 0;
1575  double angle2 = 0;
1577  bool ccw = 0;
1578 
1580  double mx = 0;
1582  double my = 0;
1584  double ratio = 0;
1585 
1586 
1588  unsigned int degree = 0;
1589  bool rational = 0;
1590  bool periodic = 0;
1592  unsigned int nKnots = 0;
1594  unsigned int nControl = 0;
1596  unsigned int nFit = 0;
1597 
1598  std::vector<std::vector<double> > controlPoints;
1599  std::vector<double> knots;
1600  std::vector<double> weights;
1601  std::vector<std::vector<double> > fitPoints;
1602 
1603  double startTangentX = 0;
1604  double startTangentY = 0;
1605 
1606  double endTangentX = 0;
1607  double endTangentY = 0;
1608 
1610  std::vector<std::vector<double> > vertices;
1611  //bool closed;
1612 };
1613 
1614 
1615 
1619 struct DXFLIB_EXPORT DL_ImageData {
1624  DL_ImageData(const std::string& iref,
1625  double iipx, double iipy, double iipz,
1626  double iux, double iuy, double iuz,
1627  double ivx, double ivy, double ivz,
1628  int iwidth, int iheight,
1629  int ibrightness, int icontrast, int ifade) {
1630  ref = iref;
1631  ipx = iipx;
1632  ipy = iipy;
1633  ipz = iipz;
1634  ux = iux;
1635  uy = iuy;
1636  uz = iuz;
1637  vx = ivx;
1638  vy = ivy;
1639  vz = ivz;
1640  width = iwidth;
1641  height = iheight;
1642  brightness = ibrightness;
1643  contrast = icontrast;
1644  fade = ifade;
1645  }
1646 
1649  std::string ref;
1651  double ipx;
1653  double ipy;
1655  double ipz;
1657  double ux;
1659  double uy;
1661  double uz;
1663  double vx;
1665  double vy;
1667  double vz;
1669  int width;
1671  int height;
1673  int brightness;
1675  int contrast;
1677  int fade;
1678 };
1679 
1680 
1681 
1685 struct DXFLIB_EXPORT DL_ImageDefData {
1690  DL_ImageDefData(const std::string& iref,
1691  const std::string& ifile) {
1692  ref = iref;
1693  file = ifile;
1694  }
1695 
1698  std::string ref;
1699 
1701  std::string file;
1702 };
1703 
1704 
1705 
1709 struct DXFLIB_EXPORT DL_DictionaryData {
1710  DL_DictionaryData(const std::string& handle) : handle(handle) {}
1711  std::string handle;
1712 };
1713 
1714 
1715 
1719 struct DXFLIB_EXPORT DL_DictionaryEntryData {
1720  DL_DictionaryEntryData(const std::string& name, const std::string& handle) :
1721  name(name), handle(handle) {}
1722 
1723  std::string name;
1724  std::string handle;
1725 };
1726 
1727 #endif
1728 
1729 // EOF
DL_DictionaryData
Dictionary data.
Definition: dl_entities.h:1708
DL_FitPointData
Spline fit point data.
Definition: dl_entities.h:596
DL_StyleData::flags
int flags
Style flags.
Definition: dl_entities.h:172
DL_LineData
Line Data.
Definition: dl_entities.h:219
DL_HatchData
Hatch data.
Definition: dl_entities.h:1379
DL_VertexData
Vertex Data.
Definition: dl_entities.h:410
DL_PolylineData
Polyline Data.
Definition: dl_entities.h:380
DL_DimRadialData
Radial Dimension Data.
Definition: dl_entities.h:1098
DL_CircleData
Circle Data.
Definition: dl_entities.h:350
DL_EllipseData
Ellipse Data.
Definition: dl_entities.h:616
DL_ImageDefData
Image Definition Data.
Definition: dl_entities.h:1684
DL_StyleData::bigFontFile
std::string bigFontFile
Big font file name.
Definition: dl_entities.h:186
DL_LeaderData
Leader (arrow).
Definition: dl_entities.h:1308
DL_StyleData::fixedTextHeight
double fixedTextHeight
Fixed text height or 0 for not fixed.
Definition: dl_entities.h:174
DL_StyleData
Text style data.
Definition: dl_entities.h:128
DL_HatchLoopData
Hatch boundary path (loop) data.
Definition: dl_entities.h:1426
DL_LeaderVertexData
Leader Vertex Data.
Definition: dl_entities.h:1355
DL_SplineData
Spline Data.
Definition: dl_entities.h:505
DL_DictionaryEntryData
Dictionary entry data.
Definition: dl_entities.h:1718
DL_DimAngular3PData
Angular Dimension Data (3 points version).
Definition: dl_entities.h:1216
DL_MTextData
MText Data.
Definition: dl_entities.h:713
DL_LinetypeData
Line Type Data.
Definition: dl_entities.h:88
DL_ArcData
Arc Data.
Definition: dl_entities.h:313
DL_DimLinearData
Linear (rotated) Dimension Data.
Definition: dl_entities.h:1052
DL_TextData
Text Data.
Definition: dl_entities.h:794
DL_StyleData::name
std::string name
Style name.
Definition: dl_entities.h:170
DL_ImageData
Image Data.
Definition: dl_entities.h:1618
DL_StyleData::widthFactor
double widthFactor
Width factor.
Definition: dl_entities.h:176
DL_BlockData
Block Data.
Definition: dl_entities.h:57
DL_StyleData::textGenerationFlags
int textGenerationFlags
Text generation flags.
Definition: dl_entities.h:180
DL_DimensionData
Generic Dimension Data.
Definition: dl_entities.h:905
DL_KnotData
Spline knot data.
Definition: dl_entities.h:550
DL_PointData
Point Data.
Definition: dl_entities.h:195
DL_DimOrdinateData
Ordinate Dimension Data.
Definition: dl_entities.h:1265
DL_AttributeData
Block attribute data.
Definition: dl_entities.h:865
DL_StyleData::obliqueAngle
double obliqueAngle
Oblique angle.
Definition: dl_entities.h:178
DL_ControlPointData
Spline control point data.
Definition: dl_entities.h:569
DL_StyleData::primaryFontFile
std::string primaryFontFile
Primary font file name.
Definition: dl_entities.h:184
DL_HatchEdgeData
Hatch edge data.
Definition: dl_entities.h:1448
DL_DimAngularData
Angular Dimension Data.
Definition: dl_entities.h:1156
DL_DimAlignedData
Aligned Dimension Data.
Definition: dl_entities.h:1015
DL_LayerData
Layer Data.
Definition: dl_entities.h:35
DL_RayData
Ray Data.
Definition: dl_entities.h:282
DL_InsertData
Insert Data.
Definition: dl_entities.h:663
DL_XLineData
XLine Data.
Definition: dl_entities.h:253
DL_TraceData
Trace Data / solid data / 3d face data.
Definition: dl_entities.h:438
DL_DimDiametricData
Diametric Dimension Data.
Definition: dl_entities.h:1127