1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
|
#include <IGESAppli_SpecificModule.ixx>
#include <Interface_Macros.hxx>
#include <IGESAppli_DrilledHole.hxx>
#include <IGESAppli_ElementResults.hxx>
#include <IGESAppli_FiniteElement.hxx>
#include <IGESAppli_Flow.hxx>
#include <IGESAppli_FlowLineSpec.hxx>
#include <IGESAppli_LevelFunction.hxx>
#include <IGESAppli_LevelToPWBLayerMap.hxx>
#include <IGESAppli_LineWidening.hxx>
#include <IGESAppli_NodalConstraint.hxx>
#include <IGESAppli_NodalDisplAndRot.hxx>
#include <IGESAppli_NodalResults.hxx>
#include <IGESAppli_Node.hxx>
#include <IGESAppli_PWBArtworkStackup.hxx>
#include <IGESAppli_PWBDrilledHole.hxx>
#include <IGESAppli_PartNumber.hxx>
#include <IGESAppli_PinNumber.hxx>
#include <IGESAppli_PipingFlow.hxx>
#include <IGESAppli_ReferenceDesignator.hxx>
#include <IGESAppli_RegionRestriction.hxx>
#include <IGESAppli_ToolDrilledHole.hxx>
#include <IGESAppli_ToolElementResults.hxx>
#include <IGESAppli_ToolFiniteElement.hxx>
#include <IGESAppli_ToolFlow.hxx>
#include <IGESAppli_ToolFlowLineSpec.hxx>
#include <IGESAppli_ToolLevelFunction.hxx>
#include <IGESAppli_ToolLevelToPWBLayerMap.hxx>
#include <IGESAppli_ToolLineWidening.hxx>
#include <IGESAppli_ToolNodalConstraint.hxx>
#include <IGESAppli_ToolNodalDisplAndRot.hxx>
#include <IGESAppli_ToolNodalResults.hxx>
#include <IGESAppli_ToolNode.hxx>
#include <IGESAppli_ToolPWBArtworkStackup.hxx>
#include <IGESAppli_ToolPWBDrilledHole.hxx>
#include <IGESAppli_ToolPartNumber.hxx>
#include <IGESAppli_ToolPinNumber.hxx>
#include <IGESAppli_ToolPipingFlow.hxx>
#include <IGESAppli_ToolReferenceDesignator.hxx>
#include <IGESAppli_ToolRegionRestriction.hxx>
// Each Module is attached to a Protocol : it must interprete Case Numbers
// (arguments <CN> of various methods) in accordance to values returned by
// the method TypeNumber from this Protocol
IGESAppli_SpecificModule::IGESAppli_SpecificModule() { }
void IGESAppli_SpecificModule::OwnDump
(const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent,
const IGESData_IGESDumper& dumper, const Handle(Message_Messenger)& S,
const Standard_Integer own) const
{
switch (CN) {
case 1 : {
DeclareAndCast(IGESAppli_DrilledHole,anent,ent);
if (anent.IsNull()) return;
IGESAppli_ToolDrilledHole tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
case 2 : {
DeclareAndCast(IGESAppli_ElementResults,anent,ent);
if (anent.IsNull()) return;
IGESAppli_ToolElementResults tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
case 3 : {
DeclareAndCast(IGESAppli_FiniteElement,anent,ent);
if (anent.IsNull()) return;
IGESAppli_ToolFiniteElement tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
case 4 : {
DeclareAndCast(IGESAppli_Flow,anent,ent);
if (anent.IsNull()) return;
IGESAppli_ToolFlow tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
case 5 : {
DeclareAndCast(IGESAppli_FlowLineSpec,anent,ent);
if (anent.IsNull()) return;
IGESAppli_ToolFlowLineSpec tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
case 6 : {
DeclareAndCast(IGESAppli_LevelFunction,anent,ent);
if (anent.IsNull()) return;
IGESAppli_ToolLevelFunction tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
case 7 : {
DeclareAndCast(IGESAppli_LevelToPWBLayerMap,anent,ent);
if (anent.IsNull()) return;
IGESAppli_ToolLevelToPWBLayerMap tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
case 8 : {
DeclareAndCast(IGESAppli_LineWidening,anent,ent);
if (anent.IsNull()) return;
IGESAppli_ToolLineWidening tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
case 9 : {
DeclareAndCast(IGESAppli_NodalConstraint,anent,ent) ;
if (anent.IsNull()) return;
IGESAppli_ToolNodalConstraint tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
case 10 : {
DeclareAndCast(IGESAppli_NodalDisplAndRot,anent,ent);
if (anent.IsNull()) return;
IGESAppli_ToolNodalDisplAndRot tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
case 11 : {
DeclareAndCast(IGESAppli_NodalResults,anent,ent);
if (anent.IsNull()) return;
IGESAppli_ToolNodalResults tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
case 12 : {
DeclareAndCast(IGESAppli_Node,anent,ent);
if (anent.IsNull()) return;
IGESAppli_ToolNode tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
case 13 : {
DeclareAndCast(IGESAppli_PWBArtworkStackup,anent,ent);
if (anent.IsNull()) return;
IGESAppli_ToolPWBArtworkStackup tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
case 14 : {
DeclareAndCast(IGESAppli_PWBDrilledHole,anent,ent);
if (anent.IsNull()) return;
IGESAppli_ToolPWBDrilledHole tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
case 15 : {
DeclareAndCast(IGESAppli_PartNumber,anent,ent);
if (anent.IsNull()) return;
IGESAppli_ToolPartNumber tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
case 16 : {
DeclareAndCast(IGESAppli_PinNumber,anent,ent);
if (anent.IsNull()) return;
IGESAppli_ToolPinNumber tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
case 17 : {
DeclareAndCast(IGESAppli_PipingFlow,anent,ent);
if (anent.IsNull()) return;
IGESAppli_ToolPipingFlow tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
case 18 : {
DeclareAndCast(IGESAppli_ReferenceDesignator,anent,ent);
if (anent.IsNull()) return;
IGESAppli_ToolReferenceDesignator tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
case 19 : {
DeclareAndCast(IGESAppli_RegionRestriction,anent,ent);
if (anent.IsNull()) return;
IGESAppli_ToolRegionRestriction tool;
tool.OwnDump(anent,dumper,S,own);
}
break;
default : break;
}
}
Standard_Boolean IGESAppli_SpecificModule::OwnCorrect
(const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const
{
// Applies only on some types
switch (CN) {
case 1 : {
DeclareAndCast(IGESAppli_DrilledHole,anent,ent);
if (anent.IsNull()) break;
IGESAppli_ToolDrilledHole tool;
return tool.OwnCorrect(anent);
}
case 4 : {
DeclareAndCast(IGESAppli_Flow,anent,ent);
if (anent.IsNull()) break;
IGESAppli_ToolFlow tool;
return tool.OwnCorrect(anent);
}
case 6 : {
DeclareAndCast(IGESAppli_LevelFunction,anent,ent);
if (anent.IsNull()) break;
IGESAppli_ToolLevelFunction tool;
return tool.OwnCorrect(anent);
}
case 8 : {
DeclareAndCast(IGESAppli_LineWidening,anent,ent);
if (anent.IsNull()) break;
IGESAppli_ToolLineWidening tool;
return tool.OwnCorrect(anent);
}
case 14 : {
DeclareAndCast(IGESAppli_PWBDrilledHole,anent,ent);
if (anent.IsNull()) break;
IGESAppli_ToolPWBDrilledHole tool;
return tool.OwnCorrect(anent);
}
case 15 : {
DeclareAndCast(IGESAppli_PartNumber,anent,ent);
if (anent.IsNull()) break;
IGESAppli_ToolPartNumber tool;
return tool.OwnCorrect(anent);
}
case 16 : {
DeclareAndCast(IGESAppli_PinNumber,anent,ent);
if (anent.IsNull()) break;
IGESAppli_ToolPinNumber tool;
return tool.OwnCorrect(anent);
}
case 17 : {
DeclareAndCast(IGESAppli_PipingFlow,anent,ent);
if (anent.IsNull()) break;
IGESAppli_ToolPipingFlow tool;
return tool.OwnCorrect(anent);
}
case 18 : {
DeclareAndCast(IGESAppli_ReferenceDesignator,anent,ent);
if (anent.IsNull()) break;
IGESAppli_ToolReferenceDesignator tool;
return tool.OwnCorrect(anent);
}
case 19 : {
DeclareAndCast(IGESAppli_RegionRestriction,anent,ent);
if (anent.IsNull()) break;
IGESAppli_ToolRegionRestriction tool;
return tool.OwnCorrect(anent);
}
default : break;
}
return Standard_False;
}
|