QCAD
Open Source 2D CAD
dl_entities.h
Go to the documentation of this file.
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 
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 
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 
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;
121  double* pattern;
122 };
123 
124 
125 
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;
177  double widthFactor;
179  double obliqueAngle;
185  std::string primaryFontFile;
187  std::string bigFontFile;
188 
189  bool bold;
190  bool italic;
191 };
192 
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 
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 
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 
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 
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 
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 
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 
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 
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 
495 
496 
501 
502 
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 
541  double tangentEndX;
542  double tangentEndY;
543  double tangentEndZ;
544 };
545 
546 
547 
557  DL_KnotData(double pk) {
558  k = pk;
559  }
560 
562  double k;
563 };
564 
565 
566 
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 
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 
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 
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 
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;
783  std::string text;
785  std::string style;
787  double angle;
788 };
789 
790 
791 
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;
855  std::string text;
857  std::string style;
859  double angle;
860 };
861 
862 
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 
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;
993  std::string text;
995  std::string style;
1000  double angle;
1008  double dimScale;
1009 };
1010 
1011 
1012 
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 
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 
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 
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 
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 
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 
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 
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 
1348  int number;
1349 };
1350 
1351 
1352 
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 
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 
1410  bool solid;
1412  double scale;
1414  double angle;
1416  std::string pattern;
1418  double originX;
1419  double originY;
1420 };
1421 
1422 
1423 
1436  DL_HatchLoopData(int hNumEdges) {
1437  numEdges = hNumEdges;
1438  }
1439 
1442 };
1443 
1444 
1445 
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;
1554 
1555  // line edges:
1556 
1558  double x1;
1560  double y1;
1562  double x2;
1564  double y2;
1565 
1567  double cx;
1569  double cy;
1571  double radius;
1573  double angle1;
1575  double angle2;
1577  bool ccw;
1578 
1580  double mx;
1582  double my;
1584  double ratio;
1585 
1586 
1588  unsigned int degree;
1589  bool rational;
1590  bool periodic;
1592  unsigned int nKnots;
1594  unsigned int nControl;
1596  unsigned int nFit;
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 
1605 
1606  double endTangentX;
1607  double endTangentY;
1608 
1610  std::vector<std::vector<double> > vertices;
1611  //bool closed;
1612 };
1613 
1614 
1615 
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;
1677  int fade;
1678 };
1679 
1680 
1681 
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 
1710  DL_DictionaryData(const std::string& handle) : handle(handle) {}
1711  std::string handle;
1712 };
1713 
1714 
1715 
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
int contrast
Definition: dl_entities.h:1675
double apz
Definition: dl_entities.h:832
double cx
Definition: dl_entities.h:638
double mpx
Definition: dl_entities.h:943
DL_DimAlignedData(double depx1, double depy1, double depz1, double depx2, double depy2, double depz2)
Constructor.
Definition: dl_entities.h:1021
double lastHeightUsed
Last height used.
Definition: dl_entities.h:183
DL_VertexData(double px=0.0, double py=0.0, double pz=0.0, double pBulge=0.0)
Constructor.
Definition: dl_entities.h:416
double height
Definition: dl_entities.h:755
double x2
Definition: dl_entities.h:244
double sz
Definition: dl_entities.h:696
Dictionary entry data.
Definition: dl_entities.h:1719
DL_DictionaryEntryData(const std::string &name, const std::string &handle)
Definition: dl_entities.h:1720
DL_HatchEdgeData()
Default constructor.
Definition: dl_entities.h:1453
Radial Dimension Data.
Definition: dl_entities.h:1099
Hatch data.
Definition: dl_entities.h:1380
double epz1
Definition: dl_entities.h:1038
double cy
Definition: dl_entities.h:368
Generic Dimension Data.
Definition: dl_entities.h:906
double textAnnotationHeight
Definition: dl_entities.h:1344
double ipy
Definition: dl_entities.h:823
double ipx
Definition: dl_entities.h:743
double dpy2
Definition: dl_entities.h:1194
double epy2
Definition: dl_entities.h:1043
std::string name
Definition: dl_entities.h:1723
Ordinate Dimension Data.
Definition: dl_entities.h:1266
double y2
Definition: dl_entities.h:1564
double dpx
Definition: dl_entities.h:937
double leader
Definition: dl_entities.h:1120
double ratio
Definition: dl_entities.h:652
double x
Definition: dl_entities.h:208
std::vector< std::vector< double > > controlPoints
Definition: dl_entities.h:1598
double ratio
Definition: dl_entities.h:1584
std::string text
Definition: dl_entities.h:855
double dpy3
Definition: dl_entities.h:1256
double dpx3
Definition: dl_entities.h:1199
DL_DimAngularData(double ddpx1, double ddpy1, double ddpz1, double ddpx2, double ddpy2, double ddpz2, double ddpx3, double ddpy3, double ddpz3, double ddpx4, double ddpy4, double ddpz4)
Constructor.
Definition: dl_entities.h:1162
double dpx1
Definition: dl_entities.h:1240
int brightness
Definition: dl_entities.h:1673
Aligned Dimension Data.
Definition: dl_entities.h:1016
double endTangentY
Definition: dl_entities.h:1607
double tangentStartX
Definition: dl_entities.h:538
double dpy3
Definition: dl_entities.h:1201
double cx
Definition: dl_entities.h:1567
double ipz
Definition: dl_entities.h:825
double epx2
Definition: dl_entities.h:1041
double dpz
Definition: dl_entities.h:941
DL_TextData(double ipx, double ipy, double ipz, double apx, double apy, double apz, double height, double xScaleFactor, int textGenerationFlags, int hJustification, int vJustification, const std::string &text, const std::string &style, double angle)
Constructor.
Definition: dl_entities.h:800
int leaderPathType
Definition: dl_entities.h:1336
double thickness
Definition: dl_entities.h:479
int width
Definition: dl_entities.h:1669
double angle1
Definition: dl_entities.h:654
DL_BlockData(const std::string &bName, int bFlags, double bbpx, double bbpy, double bbpz)
Constructor.
Definition: dl_entities.h:63
DL_TraceData DL_SolidData
Solid Data.
Definition: dl_entities.h:494
double y
Definition: dl_entities.h:1370
Circle Data.
Definition: dl_entities.h:351
double mx
Definition: dl_entities.h:1580
double dpz3
Definition: dl_entities.h:1258
double apy
Definition: dl_entities.h:830
double dx
Definition: dl_entities.h:273
DL_HatchEdgeData(double cx, double cy, double radius, double angle1, double angle2, bool ccw)
Constructor for an arc edge.
Definition: dl_entities.h:1474
double patternLength
Pattern length.
Definition: dl_entities.h:119
double z
Definition: dl_entities.h:587
DL_RayData(double bx, double by, double bz, double dx, double dy, double dz)
Constructor.
Definition: dl_entities.h:288
double z
Definition: dl_entities.h:212
Text Data.
Definition: dl_entities.h:795
DL_LineData(double lx1, double ly1, double lz1, double lx2, double ly2, double lz2)
Constructor.
Definition: dl_entities.h:225
double uy
Definition: dl_entities.h:1659
double ipy
Definition: dl_entities.h:1653
double angle
Definition: dl_entities.h:1089
Line Data.
Definition: dl_entities.h:220
double dpz1
Definition: dl_entities.h:1079
double oblique
Definition: dl_entities.h:1091
std::string file
Definition: dl_entities.h:1701
double dirz
Definition: dl_entities.h:753
double y1
Definition: dl_entities.h:1560
unsigned int m
Definition: dl_entities.h:397
double y
Definition: dl_entities.h:427
double dy
Definition: dl_entities.h:304
double z2
Definition: dl_entities.h:248
double bx
Definition: dl_entities.h:266
double dpx4
Definition: dl_entities.h:1206
Text style data.
Definition: dl_entities.h:129
Linear (rotated) Dimension Data.
Definition: dl_entities.h:1053
double xScaleFactor
Definition: dl_entities.h:837
double x1
Definition: dl_entities.h:1558
double x
Definition: dl_entities.h:605
DL_HatchData(int numLoops, bool solid, double scale, double angle, const std::string &pattern, double originX=0.0, double originY=0.0)
Constructor.
Definition: dl_entities.h:1390
std::string style
Definition: dl_entities.h:857
DL_HatchEdgeData(double x1, double y1, double x2, double y2)
Constructor for a line edge.
Definition: dl_entities.h:1460
double cy
Definition: dl_entities.h:1569
double dz
Definition: dl_entities.h:306
DL_HatchEdgeData(double cx, double cy, double mx, double my, double ratio, double angle1, double angle2, bool ccw)
Constructor for an ellipse arc edge.
Definition: dl_entities.h:1492
bool solid
Definition: dl_entities.h:1410
bool operator==(const DL_StyleData &other)
Definition: dl_entities.h:158
bool rational
Definition: dl_entities.h:1589
std::string name
Layer name.
Definition: dl_entities.h:48
Spline knot data.
Definition: dl_entities.h:551
double angle
Definition: dl_entities.h:859
std::string pattern
Definition: dl_entities.h:1416
double dpz2
Definition: dl_entities.h:1298
std::vector< std::vector< double > > fitPoints
Definition: dl_entities.h:1601
#define DXFLIB_EXPORT
Definition: dl_global.h:12
double cz
Definition: dl_entities.h:370
double angle2
Definition: dl_entities.h:1575
double bpz
Z Coordinate of base point.
Definition: dl_entities.h:82
double x
Definition: dl_entities.h:583
double epy1
Definition: dl_entities.h:1036
double bulge
Definition: dl_entities.h:432
double startTangentX
Definition: dl_entities.h:1603
std::string description
Linetype description.
Definition: dl_entities.h:113
double colSp
Definition: dl_entities.h:704
unsigned int nFit
Definition: dl_entities.h:1596
std::string name
Linetype name.
Definition: dl_entities.h:111
double ipx
Definition: dl_entities.h:821
double fixedTextHeight
Fixed text height or 0 for not fixed.
Definition: dl_entities.h:175
double bpy
Y Coordinate of base point.
Definition: dl_entities.h:80
double uz
Definition: dl_entities.h:1661
int textGenerationFlags
Definition: dl_entities.h:839
double y
Definition: dl_entities.h:607
double k
Definition: dl_entities.h:562
int numEdges
Definition: dl_entities.h:1441
double ipz
Definition: dl_entities.h:747
std::string ref
Definition: dl_entities.h:1649
double dpz1
Definition: dl_entities.h:1291
double z1
Definition: dl_entities.h:241
bool defined
Set to true if this edge is fully defined.
Definition: dl_entities.h:1548
double radius
Definition: dl_entities.h:373
double cx
Definition: dl_entities.h:332
double dpz2
Definition: dl_entities.h:1251
double dpx1
Definition: dl_entities.h:1075
int flags
Block flags.
Definition: dl_entities.h:76
DL_EllipseData(double cx, double cy, double cz, double mx, double my, double mz, double ratio, double angle1, double angle2)
Constructor.
Definition: dl_entities.h:622
DL_DimensionData(double dpx, double dpy, double dpz, double mpx, double mpy, double mpz, int type, int attachmentPoint, int lineSpacingStyle, double lineSpacingFactor, const std::string &text, const std::string &style, double angle, double linearFactor=1.0, double dimScale=1.0)
Constructor.
Definition: dl_entities.h:911
double dpz2
Definition: dl_entities.h:1086
double angle2
Definition: dl_entities.h:656
unsigned int nKnots
Definition: dl_entities.h:1592
double angle
Rotation angle of dimension text away from default orientation.
Definition: dl_entities.h:1000
int flags
Layer flags.
Definition: dl_entities.h:50
unsigned int nControl
Definition: dl_entities.h:1594
double originY
Definition: dl_entities.h:1419
DL_InsertData(const std::string &name, double ipx, double ipy, double ipz, double sx, double sy, double sz, double angle, int cols, int rows, double colSp, double rowSp)
Constructor.
Definition: dl_entities.h:669
double angle
Definition: dl_entities.h:787
double dimScale
Dimension scale (dimscale) style override.
Definition: dl_entities.h:1008
DL_TraceData DL_3dFaceData
3dface Data.
Definition: dl_entities.h:500
int lineSpacingStyle
Line spacing style.
Definition: dl_entities.h:981
std::vector< double > knots
Definition: dl_entities.h:1599
bool ccw
Definition: dl_entities.h:1577
double lineSpacingFactor
Line spacing factor.
Definition: dl_entities.h:781
unsigned int n
Definition: dl_entities.h:400
DL_PolylineData(int pNumber, int pMVerteces, int pNVerteces, int pFlags)
Constructor.
Definition: dl_entities.h:386
DL_DimAngular3PData(double ddpx1, double ddpy1, double ddpz1, double ddpx2, double ddpy2, double ddpz2, double ddpx3, double ddpy3, double ddpz3)
Constructor.
Definition: dl_entities.h:1222
double ipz
Definition: dl_entities.h:690
Hatch edge data.
Definition: dl_entities.h:1449
DL_AttributeData(double ipx, double ipy, double ipz, double apx, double apy, double apz, double height, double xScaleFactor, int textGenerationFlags, int hJustification, int vJustification, const std::string &tag, const std::string &text, const std::string &style, double angle)
Constructor.
Definition: dl_entities.h:876
std::string name
Definition: dl_entities.h:684
double vx
Definition: dl_entities.h:1663
double dpy
Definition: dl_entities.h:1144
Spline fit point data.
Definition: dl_entities.h:597
Polyline Data.
Definition: dl_entities.h:381
DL_CircleData(double acx, double acy, double acz, double aRadius)
Constructor.
Definition: dl_entities.h:356
bool bold
Definition: dl_entities.h:189
Point Data.
Definition: dl_entities.h:196
double y
Definition: dl_entities.h:585
DL_ImageDefData(const std::string &iref, const std::string &ifile)
Constructor.
Definition: dl_entities.h:1690
double x
Definition: dl_entities.h:425
double bx
Definition: dl_entities.h:295
double dpx2
Definition: dl_entities.h:1247
double dpy1
Definition: dl_entities.h:1242
double dpx
Definition: dl_entities.h:1113
int flags
Linetype flags.
Definition: dl_entities.h:115
double tangentStartY
Definition: dl_entities.h:539
double x
Definition: dl_entities.h:1368
std::string handle
Definition: dl_entities.h:1711
double dpy1
Definition: dl_entities.h:1077
double mx
Definition: dl_entities.h:645
Line Type Data.
Definition: dl_entities.h:89
double dpy2
Definition: dl_entities.h:1249
double dpz1
Definition: dl_entities.h:1244
DL_LinetypeData(const std::string &name, const std::string &description, int flags, int numberOfDashes, double patternLength, double *pattern=NULL)
Constructor.
Definition: dl_entities.h:94
double cx
Definition: dl_entities.h:366
DL_LeaderData(int lArrowHeadFlag, int lLeaderPathType, int lLeaderCreationFlag, int lHooklineDirectionFlag, int lHooklineFlag, double lTextAnnotationHeight, double lTextAnnotationWidth, int lNumber)
Constructor.
Definition: dl_entities.h:1314
std::string name
Block name.
Definition: dl_entities.h:74
double ipy
Definition: dl_entities.h:745
Block Data.
Definition: dl_entities.h:58
double ipx
Definition: dl_entities.h:686
double epx1
Definition: dl_entities.h:1034
MText Data.
Definition: dl_entities.h:714
double dpz3
Definition: dl_entities.h:1203
double w
Definition: dl_entities.h:589
double angle
Definition: dl_entities.h:698
double vz
Definition: dl_entities.h:1667
double dpz4
Definition: dl_entities.h:1210
double dpz2
Definition: dl_entities.h:1196
DL_XLineData(double bx, double by, double bz, double dx, double dy, double dz)
Constructor.
Definition: dl_entities.h:259
double obliqueAngle
Oblique angle.
Definition: dl_entities.h:179
std::vector< std::vector< double > > vertices
Polyline boundary vertices (x y [bulge])
Definition: dl_entities.h:1610
double textAnnotationWidth
Definition: dl_entities.h:1346
int attachmentPoint
Attachment point.
Definition: dl_entities.h:975
double mz
Definition: dl_entities.h:649
double rowSp
Definition: dl_entities.h:706
double sx
Definition: dl_entities.h:692
DL_DictionaryData(const std::string &handle)
Definition: dl_entities.h:1710
double tangentEndX
Definition: dl_entities.h:541
DL_HatchLoopData(int hNumEdges)
Constructor.
Definition: dl_entities.h:1436
std::string bigFontFile
Big font file name.
Definition: dl_entities.h:187
double sy
Definition: dl_entities.h:694
double dpy1
Definition: dl_entities.h:1289
double ipy
Definition: dl_entities.h:688
std::string text
Text string.
Definition: dl_entities.h:993
double my
Definition: dl_entities.h:1582
int drawingDirection
Drawing direction.
Definition: dl_entities.h:771
double mpy
Definition: dl_entities.h:945
DL_ImageData(const std::string &iref, double iipx, double iipy, double iipz, double iux, double iuy, double iuz, double ivx, double ivy, double ivz, int iwidth, int iheight, int ibrightness, int icontrast, int ifade)
Constructor.
Definition: dl_entities.h:1624
double z
Definition: dl_entities.h:1372
std::string handle
Definition: dl_entities.h:1724
Arc Data.
Definition: dl_entities.h:314
double dpy
Definition: dl_entities.h:939
double by
Definition: dl_entities.h:268
double dpy2
Definition: dl_entities.h:1084
double tangentStartZ
Definition: dl_entities.h:540
bool xtype
Definition: dl_entities.h:1301
double width
Definition: dl_entities.h:757
std::string primaryFontFile
Primary font file name.
Definition: dl_entities.h:185
XLine Data.
Definition: dl_entities.h:254
void ccw(void x1, void y1, void x2, void y2, void x3, void y3)
Definition: intersect.js:3
Trace Data / solid data / 3d face data.
Definition: dl_entities.h:439
unsigned int nKnots
Definition: dl_entities.h:527
double linearFactor
Linear factor style override.
Definition: dl_entities.h:1004
double radius
Definition: dl_entities.h:339
int lineSpacingStyle
Line spacing style.
Definition: dl_entities.h:777
std::string text
Definition: dl_entities.h:783
std::string name
Style name.
Definition: dl_entities.h:171
unsigned int number
Definition: dl_entities.h:394
double dpy4
Definition: dl_entities.h:1208
Image Data.
Definition: dl_entities.h:1619
int leaderCreationFlag
Definition: dl_entities.h:1338
double dpx2
Definition: dl_entities.h:1192
double y1
Definition: dl_entities.h:239
double * pattern
Pattern.
Definition: dl_entities.h:121
DL_KnotData()
Definition: dl_entities.h:552
DL_ArcData(double acx, double acy, double acz, double aRadius, double aAngle1, double aAngle2)
Constructor.
Definition: dl_entities.h:319
double dpy2
Definition: dl_entities.h:1296
double my
Definition: dl_entities.h:647
Angular Dimension Data (3 points version).
Definition: dl_entities.h:1217
int numberOfDashes
Number of dashes.
Definition: dl_entities.h:117
int flags
Definition: dl_entities.h:403
bool periodic
Definition: dl_entities.h:1590
DL_LeaderVertexData(double px=0.0, double py=0.0, double pz=0.0)
Constructor.
Definition: dl_entities.h:1361
DL_HatchLoopData()
Default constructor.
Definition: dl_entities.h:1431
double scale
Definition: dl_entities.h:1412
DL_LayerData(const std::string &lName, int lFlags)
Constructor.
Definition: dl_entities.h:41
DL_AttributeData(const DL_TextData &tData, const std::string &tag)
Definition: dl_entities.h:867
unsigned int degree
Definition: dl_entities.h:1588
Ray Data.
Definition: dl_entities.h:283
double bz
Definition: dl_entities.h:270
DL_TraceData()
Definition: dl_entities.h:440
double radius
Definition: dl_entities.h:1571
DL_TraceData(double sx1, double sy1, double sz1, double sx2, double sy2, double sz2, double sx3, double sy3, double sz3, double sx4, double sy4, double sz4, double sthickness=0.0)
Constructor.
Definition: dl_entities.h:453
Insert Data.
Definition: dl_entities.h:664
DL_DimDiametricData(double ddpx, double ddpy, double ddpz, double dleader)
Constructor.
Definition: dl_entities.h:1133
double epz2
Definition: dl_entities.h:1045
DL_HatchData()
Default constructor.
Definition: dl_entities.h:1384
DL_DimLinearData(double ddpx1, double ddpy1, double ddpz1, double ddpx2, double ddpy2, double ddpz2, double dAngle, double dOblique)
Constructor.
Definition: dl_entities.h:1058
double bz
Definition: dl_entities.h:299
double apx
Definition: dl_entities.h:828
double dy
Definition: dl_entities.h:275
Spline control point data.
Definition: dl_entities.h:570
double dpx3
Definition: dl_entities.h:1254
unsigned int nControl
Definition: dl_entities.h:530
std::string style
Definition: dl_entities.h:785
DL_SplineData(int degree, int nKnots, int nControl, int nFit, int flags)
Constructor.
Definition: dl_entities.h:511
int rows
Definition: dl_entities.h:702
int hooklineDirectionFlag
Definition: dl_entities.h:1340
double dpx
Definition: dl_entities.h:1142
double leader
Definition: dl_entities.h:1149
double dpx2
Definition: dl_entities.h:1082
int arrowHeadFlag
Definition: dl_entities.h:1334
double by
Definition: dl_entities.h:297
double startTangentY
Definition: dl_entities.h:1604
double vy
Definition: dl_entities.h:1665
double ux
Definition: dl_entities.h:1657
double x1
Definition: dl_entities.h:237
int flags
Definition: dl_entities.h:536
double x2
Definition: dl_entities.h:1562
double angle2
Definition: dl_entities.h:343
double dpy
Definition: dl_entities.h:1115
Leader (arrow).
Definition: dl_entities.h:1309
Layer Data.
Definition: dl_entities.h:36
int vJustification
Vertical justification.
Definition: dl_entities.h:853
DL_ControlPointData(double px, double py, double pz, double weight)
Constructor.
Definition: dl_entities.h:575
Angular Dimension Data.
Definition: dl_entities.h:1157
DL_DimRadialData(double ddpx, double ddpy, double ddpz, double dleader)
Constructor.
Definition: dl_entities.h:1104
Diametric Dimension Data.
Definition: dl_entities.h:1128
double z
Definition: dl_entities.h:429
DL_HatchEdgeData(unsigned int degree, bool rational, bool periodic, unsigned int nKnots, unsigned int nControl, unsigned int nFit, const std::vector< double > &knots, const std::vector< std::vector< double > > &controlPoints, const std::vector< std::vector< double > > &fitPoints, const std::vector< double > &weights, double startTangentX, double startTangentY, double endTangentX, double endTangentY)
Constructor for a spline edge.
Definition: dl_entities.h:1513
double cz
Definition: dl_entities.h:642
int fade
Definition: dl_entities.h:1677
double height
Definition: dl_entities.h:835
Vertex Data.
Definition: dl_entities.h:411
int height
Definition: dl_entities.h:1671
double dx
Definition: dl_entities.h:302
double originX
Definition: dl_entities.h:1418
Ellipse Data.
Definition: dl_entities.h:617
double y
Definition: dl_entities.h:210
int textGenerationFlags
Text generation flags.
Definition: dl_entities.h:181
DL_PointData(double px=0.0, double py=0.0, double pz=0.0)
Constructor.
Definition: dl_entities.h:201
double widthFactor
Width factor.
Definition: dl_entities.h:177
double angle
Definition: dl_entities.h:1414
unsigned int nFit
Definition: dl_entities.h:533
std::string tag
Definition: dl_entities.h:899
std::string style
Definition: dl_entities.h:995
unsigned int degree
Definition: dl_entities.h:524
double angle1
Definition: dl_entities.h:341
Block attribute data.
Definition: dl_entities.h:866
Dictionary data.
Definition: dl_entities.h:1709
int hooklineFlag
Definition: dl_entities.h:1342
double dirx
Definition: dl_entities.h:749
double cz
Definition: dl_entities.h:336
double endTangentX
Definition: dl_entities.h:1606
Image Definition Data.
Definition: dl_entities.h:1685
double lineSpacingFactor
Line spacing factor.
Definition: dl_entities.h:985
double mpz
Definition: dl_entities.h:947
double z
Definition: dl_entities.h:609
DL_MTextData(double ipx, double ipy, double ipz, double dirx, double diry, double dirz, double height, double width, int attachmentPoint, int drawingDirection, int lineSpacingStyle, double lineSpacingFactor, const std::string &text, const std::string &style, double angle)
Constructor.
Definition: dl_entities.h:719
std::string ref
Definition: dl_entities.h:1698
double cy
Definition: dl_entities.h:334
double tangentEndZ
Definition: dl_entities.h:543
double dpx2
Definition: dl_entities.h:1294
Hatch boundary path (loop) data.
Definition: dl_entities.h:1427
double ipz
Definition: dl_entities.h:1655
int type
Dimension type.
Definition: dl_entities.h:967
double dz
Definition: dl_entities.h:277
double dpy1
Definition: dl_entities.h:1187
Spline Data.
Definition: dl_entities.h:506
DL_KnotData(double pk)
Constructor.
Definition: dl_entities.h:557
int hJustification
Horizontal justification.
Definition: dl_entities.h:847
DL_StyleData(const std::string &name, int flags, double fixedTextHeight, double widthFactor, double obliqueAngle, int textGenerationFlags, double lastHeightUsed, const std::string &primaryFontFile, const std::string &bigFontFile)
Constructor Parameters: see member variables.
Definition: dl_entities.h:134
DL_DimOrdinateData(double ddpx1, double ddpy1, double ddpz1, double ddpx2, double ddpy2, double ddpz2, bool dxtype)
Constructor.
Definition: dl_entities.h:1271
double cy
Definition: dl_entities.h:640
double angle1
Definition: dl_entities.h:1573
double y2
Definition: dl_entities.h:246
double dpz
Definition: dl_entities.h:1146
int attachmentPoint
Attachment point.
Definition: dl_entities.h:765
double dpx1
Definition: dl_entities.h:1287
int cols
Definition: dl_entities.h:700
int number
Definition: dl_entities.h:1348
int flags
Style flags.
Definition: dl_entities.h:173
std::vector< double > weights
Definition: dl_entities.h:1600
double bpx
X Coordinate of base point.
Definition: dl_entities.h:78
double tangentEndY
Definition: dl_entities.h:542
double dpx1
Definition: dl_entities.h:1185
int type
Edge type.
Definition: dl_entities.h:1553
bool italic
Definition: dl_entities.h:190
double diry
Definition: dl_entities.h:751
double dpz1
Definition: dl_entities.h:1189
double ipx
Definition: dl_entities.h:1651
DL_FitPointData(double x, double y, double z)
Constructor.
Definition: dl_entities.h:602
int numLoops
Definition: dl_entities.h:1408
double dpz
Definition: dl_entities.h:1117
Leader Vertex Data.
Definition: dl_entities.h:1356