Itasca C++ Interface
Loading...
Searching...
No Matches
idxfdata.h
Go to the documentation of this file.
1#pragma once
2//dxfreader.h
3
4// DXF Reader class
5// Pass in IDXFData class to process data
6
7/*********************************************************************
8DXF Format:
9Find "0 SECTION"
10"2 ENTITIES"
11
12Find "0 POINT"
13"8 <layer name>"
14"10 < x > "
15"20 < y > "
16"30 < z > "
17
18Find "0 3DFACE"
19"8 < layer name > "
20"10 < x1 > "
21"20 < y1 > "
22"30 < z1 > "
23"11 < x2 > "
24"21 < y2 > "
25"31 < z2 > "
26"12 < x3 > "
27"22 < y3 > "
28"32 < z3 > "
29"13 < x4 > "
30"23 < y4 > "
31"33 < z4 > "
32
33Find "0 POLYLINE"
34"70 64 " [Polyface Mesh]
35"8 <layer name>"
36"0 VERTEX"
37"70 192"
38"10 < x > "
39"20 < y > "
40"30 < z > "
41"0 VERTEX" [INDEXED FACE]
42"70 128"
43"71 <vi1>"
44"72 <vi2>"
45"73 <vi3>"
46["74 <vi4>"]
47"0 SEQEND"
48
49Find "0 POLYLINE"
50"8 <layer name>"
51"70 16 " [3D polygon mesh]
52"70 1 " [Polygon mesh closed in the M direction.]
53"70 64 " [Polygon mesh closed in the N direction.]
54"71 <M>" [Polygon mesh M vertex count (optional; default = 0)]
55"72 <N>" [Polygon mesh N vertex count (optional; default = 0)]
56"0 VERTEX"
57"70 64"
58"10 < x > "
59"20 < y > "
60"30 < z > "
61"0 SEQEND"
62
63Find "0 POLYLINE"
64"70 < g.n > " [ g.n%2=1 implies closed polyline.]
65"8 <layer name>"
66"210 < extrude_x > "
67"220 < extrude_y > "
68"230 < extrude_z > "
69"0 VERTEX"
70"10 < x > "
71"20 < y > "
72"30 < z > "
73"0 SEQEND"
74
75Or "0 LWPOLYLINE"
76"8 <layer name>"
77"38 < z > "
78"70 < g.n > " [ g.n%2=1 implies closed polyline.]
79"90 < n > " [# of vertices]
80"10 < x > "
81"20 < y > "
82
83Or "0 LINE"
84"8 <layer name>"
85"10 < x1 > "
86"11 < x2 > "
87"20 < y1 > "
88"21 < y2 > "
89"30 < z1 > "
90"31 < z2 > "
91"210 < extrude_x > "
92"220 < extrude_y > "
93"230 < extrude_z > "
94
95Or "0 ARC"
96"8 <layer name>"
97"10 < x1 > "
98"20 < y1 > "
99"30 < z1 > "
100"40 < radius > "
101"50 < angle1(degrees) > "
102"51 < angle2(degrees) > "
103
104Until "0 ENDSEC"
105"0 EOF"
106*/
107
114
115namespace itasca
116{
118
122 class IDXFData
123 {
124 public:
126 virtual void setLayer(const QString &layername)=0;
129 virtual void setClosed()=0;
130
132 virtual void addPoint(const DVect3& p)=0;
134 virtual void addLine(const DVect3& p1, const DVect3& p2)=0;
136 virtual void addArc(const DVect3& cent, double r, double a1, double a2)=0;
138 virtual void startPolyline()=0;
140 virtual void addPolylineVertex(const DVect3 &p)=0;
142 virtual void endPolyline()=0;
143
145 virtual void add3DFace(const DVect3 &p1, const DVect3 &p2, const DVect3 &p3)=0;
148 virtual void add3DFace(const DVect3 &p1, const DVect3 &p2, const DVect3 &p3, const DVect3 &p4)=0;
149
154 virtual void startPolyFaceMesh()=0;
158 virtual void addPolyFace(int32_t n1, int32_t n2, int32_t n3, int32_t n4)=0;
159
164 virtual void startPolygonMesh()=0;
166 virtual void setMeshClosedN()=0;
168 virtual void setMeshClosedM()=0;
170 virtual void setMeshN(int n)=0;
172 virtual void setMeshM(int m)=0;
173
175 virtual void startLWPolyline()=0;
177 virtual void setLWPolylineZ(const double &z)=0;
179 virtual void addLWPolylineVertex(const double &x,const double &y)=0;
181 virtual void endLWPolyline()=0;
182
186 virtual void writeParseWarning(int line,const QString &x)=0;
187
191 virtual bool updateProgress(quint64 pos,quint64 max=0)=0;
192 };
193} // namespace itasca
194// EoF
All default base headers if Qt is being used.
virtual void addLine(const DVect3 &p1, const DVect3 &p2)=0
Adds a line object, from p1 to p2.
virtual void setMeshClosedN()=0
Specifies that the mesh in the N-direction (first index) is closed.
virtual void setLWPolylineZ(const double &z)=0
TOM - I have no idea what a LW Polyline is...
virtual bool updateProgress(quint64 pos, quint64 max=0)=0
virtual void add3DFace(const DVect3 &p1, const DVect3 &p2, const DVect3 &p3, const DVect3 &p4)=0
virtual void setMeshM(int m)=0
Specifies the number of indices in the M (first) direction.
virtual void writeParseWarning(int line, const QString &x)=0
virtual void setMeshClosedM()=0
Specifies that the mesh in the M-direction (second index) is closed.
virtual void startPolygonMesh()=0
virtual void addPolyFace(int32_t n1, int32_t n2, int32_t n3, int32_t n4)=0
virtual void addPoint(const DVect3 &p)=0
Adds a point object, at p.
virtual void endLWPolyline()=0
TOM - I have no idea what a LW Polyline is...
virtual void startLWPolyline()=0
TOM - I have no idea what a LW Polyline is...
virtual void add3DFace(const DVect3 &p1, const DVect3 &p2, const DVect3 &p3)=0
Adds a triangular face element. The arguments are the vertices of the polygon.
virtual void setMeshN(int n)=0
Specifies the number of indices in the N (first) direction.
virtual void setLayer(const QString &layername)=0
Sets the layer name for all subsequent objects created.
virtual void addPolylineVertex(const DVect3 &p)=0
add a vertex to a polyline, polyface, or polygon mesh.
virtual void addLWPolylineVertex(const double &x, const double &y)=0
TOM - I have no idea what a LW Polyline is...
virtual void setClosed()=0
virtual void addArc(const DVect3 &cent, double r, double a1, double a2)=0
Add an arc, by center, radius, start and end angles.
virtual void startPolyFaceMesh()=0
virtual void startPolyline()=0
starts a polyline or a polyface mesh, clear vertex list
virtual void endPolyline()=0
Indicates the polyline, polyface, or polymesh is finished.
namespace Itasca
Definition basememory.cpp:14