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
95Until "0 ENDSEC"
96"0 EOF"
97*/
98
104#include "base/src/base.h"
105
106namespace itasca
107{
109
114 {
115 public:
117 virtual void setLayer(const QString &layername)=0;
120 virtual void setClosed()=0;
121
123 virtual void addPoint(const DVect3& p)=0;
125 virtual void addLine(const DVect3& p1, const DVect3& p2)=0;
126
128 virtual void startPolyline()=0;
130 virtual void addPolylineVertex(const DVect3 &p)=0;
132 virtual void endPolyline()=0;
133
135 virtual void add3DFace(const DVect3 &p1, const DVect3 &p2, const DVect3 &p3)=0;
138 virtual void add3DFace(const DVect3 &p1, const DVect3 &p2, const DVect3 &p3, const DVect3 &p4)=0;
139
144 virtual void startPolyFaceMesh()=0;
148 virtual void addPolyFace(int32_t n1, int32_t n2, int32_t n3, int32_t n4)=0;
149
154 virtual void startPolygonMesh()=0;
156 virtual void setMeshClosedN()=0;
158 virtual void setMeshClosedM()=0;
160 virtual void setMeshN(int n)=0;
162 virtual void setMeshM(int m)=0;
163
165 virtual void startLWPolyline()=0;
167 virtual void setLWPolylineZ(const double &z)=0;
169 virtual void addLWPolylineVertex(const double &x,const double &y)=0;
171 virtual void endLWPolyline()=0;
172
176 virtual void writeParseWarning(int line,const QString &x)=0;
177
181 virtual bool progress(int pos,int max=0)=0;
182 };
183} // namespace itasca
184// EoF
One stop include for all objects defined as part of base interface.
Handle geometric data generated by a IDXFReader.
Definition idxfdata.h:114
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 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 startPolyFaceMesh()=0
virtual bool progress(int pos, int max=0)=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