Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
IgesReader.h
Go to the documentation of this file.
1
#ifndef IGES_READER_H
2
#define IGES_READER_H
3
4
#include "
Mapping.h
"
5
6
#include <time.h>
7
#include <ctype.h>
8
#include <unistd.h>
9
#include <stdio.h>
10
#include <stdlib.h>
11
#include <string.h>
12
13
#define RECBUF 81
/* Buffer size for IGS record */
14
#define KEYPOS 72
/* Key word for extracting IGS file */
15
16
class
IgesReader
17
{
18
public
:
19
20
enum
IgesEntries
21
{
22
nullEntry
=0,
23
circularArc
=100,
24
compositeCurve
=102,
25
conicArc
=104,
26
copiusData
=106,
27
plane
=108,
28
line
=110,
29
parametricSplineCurve
=112,
30
parametricSplineSurface
=114,
31
point
=116,
32
ruledSurface
=118,
33
surfaceOfRevolution
=120,
34
tabulatedCylinder
=122,
35
direction
=123,
36
transformationMatrix
=124,
37
flash
=125,
38
rationalBSplineCurve
=126,
39
rationalBSplineSurface
=128,
40
offsetCurve
=130,
41
connectPoint
=132,
42
node
=134,
43
finiteElement
=136,
44
nodalDisplacementAndRotation
=138,
45
offsetSurface
=140,
46
boundary
=141,
47
curveOnAParametricSurface
=142,
48
boundedSurface
=143,
49
trimmedSurface
=144,
50
nodalResults
=146,
51
elementResults
=148,
52
block
=150,
53
rightAngularWedge
=152,
54
rightCircularCylinder
=154,
55
rightCircularConeFrustrum
=156,
56
sphere
=158,
57
torus
=160,
58
solidOfRevolution
=162,
59
solidOfLinearExtrusion
=164,
60
ellipsoid
=168,
61
booleanTree
=180,
62
selectedComponent
=182,
63
solidAssembly
=184,
64
manifoldSolidB_RepObject
=186,
65
planeSurface
=190,
66
rightCircularCylindricalSurface
=192,
67
rightCircularConicalSurface
=194,
68
sphericalSurface
=196,
69
toroidalSurface
=198,
70
angularDimension
=202,
71
curveDimension
=204,
72
diameterDimension
=206,
73
flagNote
=208,
74
generalLabel
=210,
75
generalNote
=212,
76
newGeneralNote
=213,
77
leader
=214,
//(arrow)
78
linearDimension
=216,
79
ordinateDimension
=218,
80
pointDimension
=220,
81
radiusDimension
=222,
82
generalSymbol
=228,
83
sectionedArea
=230,
84
associativityDefinition
=302,
85
lineFontDefinition
=304,
86
subfigureDefinition
=308,
87
textFontDefinition
=310,
88
textDisplayTemplate
=312,
89
colorDefinition
=314,
90
unitsData
=316,
91
networkSubfigureDefinition
=320,
92
attributeTableDefinition
=322,
93
associativeInstance
=402,
94
drawing
=404,
95
property
=406,
96
singularSubfigureInstance
=408,
97
view
=410,
98
rectangularArraySubfigureInstance
=412,
99
circularArraySubfigureInstance
=414,
100
externalReference
=416,
101
nodalLoad_Constraint
=418,
102
networkSubfigureInstance
=420,
103
attributeTableInstance
=422,
104
solidInstance
=430,
105
vertex
=502,
106
edge
=504,
107
loop
=508,
108
face
=510,
109
shellEntity
=514,
110
discreteData
=5001,
111
parametricSurface
=7366
112
};
113
114
double
getTolerance
()
const
{
return
tolerance
;}
//
115
double
getScale
()
const
{
return
scale
;}
//
116
117
double
scale
,
tolerance
;
118
int
units
;
119
FILE *
fp
;
120
121
enum
PositionEnum
122
{
123
entityPosition
=0,
124
sequenceNumberPosition
=1,
125
parameterDataPosition
=2,
126
matrixPosition
=3,
127
formPosition
=3,
128
visiblePosition
=4,
129
dependentPosition
=4
130
};
131
132
inline
int
entity
(
int
item )
const
{
return
entityInfo(
entityPosition
,item); }
133
inline
int
sequenceNumber
(
int
item )
const
{
return
entityInfo(
sequenceNumberPosition
,item); }
134
inline
int
parameterData
(
int
item )
const
{
return
entityInfo(
parameterDataPosition
,item); }
135
inline
int
matrix
(
int
item )
const
{
return
entityInfo(
matrixPosition
,item); }
136
inline
int
isVisible
(
int
item )
const
{
return
(entityInfo(
visiblePosition
,item) % 2) ; }
137
inline
int
isIndependent
(
int
item )
const
{
return
(entityInfo(
dependentPosition
,item)/2) % 2 ; }
138
inline
int
formData
(
int
item )
const
{
return
entityInfo(
formPosition
,item); }
139
140
long
parameterPosition
;
// position in file where parameter data starts
141
142
IgesReader
();
143
~IgesReader
();
144
145
int
readIgesFile
(
const
char
*fileName );
146
147
// read parameter data for a given item number
148
int
readData
(
const
int
& i,
RealArray
& data,
const
int
& numberToRead);
149
#ifdef USE_PPP
150
int
readData
(
const
int
& i,
realArray
& data,
const
int
& numberToRead);
151
#endif
152
153
// read parameter data given a pointer to the location
154
int
readParameterData
(
const
int
& parameterDataPointer,
RealArray
& data,
const
int
& numberToRead);
155
#ifdef USE_PPP
156
int
readParameterData
(
const
int
& parameterDataPointer,
realArray
& data,
const
int
& numberToRead);
157
#endif
158
159
int
numberOfEntities
();
160
161
int
processFile
();
162
163
int
getData
(
RealArray
& data,
int
max_data);
164
165
aString
entityName
(
const
int
&
entity
);
166
167
int
sequenceToItem
(
const
int
& sequence );
// return the entry in the entityInfo array for a given sequence number
168
169
170
protected
:
171
172
long
fieldNumber
(
const
char
*buff,
int
field);
173
174
int
getSequenceNumber
(
const
char
*buff);
// return seq number from Parameter line
175
176
177
private
:
178
enum
179
{
180
recordBufferSize=81,
// Buffer size for Iges record
181
keyWordPosition=72
// Iges key word position
182
};
183
184
185
IntegerArray
entityInfo;
// holds info about objects in file (info found in the directory)
186
187
int
entityCount;
188
189
double
bound;
190
char
fieldDelimiter, recordDelimiter;
191
int
process;
/* default process specified */
192
long
savep,entype,form,trans_mtr,Color,parameter,seqnum,
193
formMatrix,status,visible,subordinate,
194
entityUse,hierarchy,level;
195
int
infoLevel;
196
197
};
198
199
#endif
Generated on Fri Jan 4 2013 10:17:53 for Overture by
1.8.3