Warnings on vc14 were eliminated
[occt.git] / src / IGESGeom / IGESGeom_GeneralModule.cxx
CommitLineData
973c2be1 1// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2//
973c2be1 3// This file is part of Open CASCADE Technology software library.
b311480e 4//
d5f74e42 5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 7// by the Free Software Foundation, with special exception defined in the file
8// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9// distribution for complete text of the license and disclaimer of any warranty.
b311480e 10//
973c2be1 11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
b311480e 13
7fd59977 14
42cf5bc1 15#include <IGESData_DirChecker.hxx>
16#include <IGESData_IGESEntity.hxx>
7fd59977 17#include <IGESGeom_Boundary.hxx>
18#include <IGESGeom_BoundedSurface.hxx>
42cf5bc1 19#include <IGESGeom_BSplineCurve.hxx>
20#include <IGESGeom_BSplineSurface.hxx>
7fd59977 21#include <IGESGeom_CircularArc.hxx>
22#include <IGESGeom_CompositeCurve.hxx>
23#include <IGESGeom_ConicArc.hxx>
24#include <IGESGeom_CopiousData.hxx>
25#include <IGESGeom_CurveOnSurface.hxx>
26#include <IGESGeom_Direction.hxx>
27#include <IGESGeom_Flash.hxx>
42cf5bc1 28#include <IGESGeom_GeneralModule.hxx>
7fd59977 29#include <IGESGeom_Line.hxx>
30#include <IGESGeom_OffsetCurve.hxx>
31#include <IGESGeom_OffsetSurface.hxx>
32#include <IGESGeom_Plane.hxx>
33#include <IGESGeom_Point.hxx>
34#include <IGESGeom_RuledSurface.hxx>
35#include <IGESGeom_SplineCurve.hxx>
36#include <IGESGeom_SplineSurface.hxx>
37#include <IGESGeom_SurfaceOfRevolution.hxx>
38#include <IGESGeom_TabulatedCylinder.hxx>
7fd59977 39#include <IGESGeom_ToolBoundary.hxx>
40#include <IGESGeom_ToolBoundedSurface.hxx>
42cf5bc1 41#include <IGESGeom_ToolBSplineCurve.hxx>
42#include <IGESGeom_ToolBSplineSurface.hxx>
7fd59977 43#include <IGESGeom_ToolCircularArc.hxx>
44#include <IGESGeom_ToolCompositeCurve.hxx>
45#include <IGESGeom_ToolConicArc.hxx>
46#include <IGESGeom_ToolCopiousData.hxx>
47#include <IGESGeom_ToolCurveOnSurface.hxx>
48#include <IGESGeom_ToolDirection.hxx>
49#include <IGESGeom_ToolFlash.hxx>
50#include <IGESGeom_ToolLine.hxx>
51#include <IGESGeom_ToolOffsetCurve.hxx>
52#include <IGESGeom_ToolOffsetSurface.hxx>
53#include <IGESGeom_ToolPlane.hxx>
54#include <IGESGeom_ToolPoint.hxx>
55#include <IGESGeom_ToolRuledSurface.hxx>
56#include <IGESGeom_ToolSplineCurve.hxx>
57#include <IGESGeom_ToolSplineSurface.hxx>
58#include <IGESGeom_ToolSurfaceOfRevolution.hxx>
59#include <IGESGeom_ToolTabulatedCylinder.hxx>
60#include <IGESGeom_ToolTransformationMatrix.hxx>
61#include <IGESGeom_ToolTrimmedSurface.hxx>
42cf5bc1 62#include <IGESGeom_TransformationMatrix.hxx>
63#include <IGESGeom_TrimmedSurface.hxx>
64#include <Interface_Category.hxx>
65#include <Interface_Check.hxx>
66#include <Interface_CopyTool.hxx>
67#include <Interface_EntityIterator.hxx>
68#include <Interface_Macros.hxx>
69#include <Interface_ShareTool.hxx>
70#include <Standard_Transient.hxx>
71#include <Standard_Type.hxx>
7fd59977 72
92efcf78 73IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_GeneralModule,IGESData_GeneralModule)
74
7fd59977 75// Each Module is attached to a Protocol : it must interprete Case Numbers
76// (arguments <CN> of various methods) in accordance to values returned by
77// the method TypeNumber from this Protocol
b311480e 78IGESGeom_GeneralModule::IGESGeom_GeneralModule () { }
7fd59977 79
80
81 void IGESGeom_GeneralModule::OwnSharedCase
82 (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent,
83 Interface_EntityIterator& iter) const
84{
85 switch (CN) {
86 case 1 : {
87 DeclareAndCast(IGESGeom_BSplineCurve,anent,ent);
88 if (anent.IsNull()) return;
89 IGESGeom_ToolBSplineCurve tool;
90 tool.OwnShared(anent,iter);
91 }
92 break;
93 case 2 : {
94 DeclareAndCast(IGESGeom_BSplineSurface,anent,ent);
95 if (anent.IsNull()) return;
96 IGESGeom_ToolBSplineSurface tool;
97 tool.OwnShared(anent,iter);
98 }
99 break;
100 case 3 : {
101 DeclareAndCast(IGESGeom_Boundary,anent,ent);
102 if (anent.IsNull()) return;
103 IGESGeom_ToolBoundary tool;
104 tool.OwnShared(anent,iter);
105 }
106 break;
107 case 4 : {
108 DeclareAndCast(IGESGeom_BoundedSurface,anent,ent);
109 if (anent.IsNull()) return;
110 IGESGeom_ToolBoundedSurface tool;
111 tool.OwnShared(anent,iter);
112 }
113 break;
114 case 5 : {
115 DeclareAndCast(IGESGeom_CircularArc,anent,ent);
116 if (anent.IsNull()) return;
117 IGESGeom_ToolCircularArc tool;
118 tool.OwnShared(anent,iter);
119 }
120 break;
121 case 6 : {
122 DeclareAndCast(IGESGeom_CompositeCurve,anent,ent);
123 if (anent.IsNull()) return;
124 IGESGeom_ToolCompositeCurve tool;
125 tool.OwnShared(anent,iter);
126 }
127 break;
128 case 7 : {
129 DeclareAndCast(IGESGeom_ConicArc,anent,ent);
130 if (anent.IsNull()) return;
131 IGESGeom_ToolConicArc tool;
132 tool.OwnShared(anent,iter);
133 }
134 break;
135 case 8 : {
136 DeclareAndCast(IGESGeom_CopiousData,anent,ent);
137 if (anent.IsNull()) return;
138 IGESGeom_ToolCopiousData tool;
139 tool.OwnShared(anent,iter);
140 }
141 break;
142 case 9 : {
143 DeclareAndCast(IGESGeom_CurveOnSurface,anent,ent);
144 if (anent.IsNull()) return;
145 IGESGeom_ToolCurveOnSurface tool;
146 tool.OwnShared(anent,iter);
147 }
148 break;
149 case 10 : {
150 DeclareAndCast(IGESGeom_Direction,anent,ent);
151 if (anent.IsNull()) return;
152 IGESGeom_ToolDirection tool;
153 tool.OwnShared(anent,iter);
154 }
155 break;
156 case 11 : {
157 DeclareAndCast(IGESGeom_Flash,anent,ent);
158 if (anent.IsNull()) return;
159 IGESGeom_ToolFlash tool;
160 tool.OwnShared(anent,iter);
161 }
162 break;
163 case 12 : {
164 DeclareAndCast(IGESGeom_Line,anent,ent);
165 if (anent.IsNull()) return;
166 IGESGeom_ToolLine tool;
167 tool.OwnShared(anent,iter);
168 }
169 break;
170 case 13 : {
171 DeclareAndCast(IGESGeom_OffsetCurve,anent,ent);
172 if (anent.IsNull()) return;
173 IGESGeom_ToolOffsetCurve tool;
174 tool.OwnShared(anent,iter);
175 }
176 break;
177 case 14 : {
178 DeclareAndCast(IGESGeom_OffsetSurface,anent,ent);
179 if (anent.IsNull()) return;
180 IGESGeom_ToolOffsetSurface tool;
181 tool.OwnShared(anent,iter);
182 }
183 break;
184 case 15 : {
185 DeclareAndCast(IGESGeom_Plane,anent,ent);
186 if (anent.IsNull()) return;
187 IGESGeom_ToolPlane tool;
188 tool.OwnShared(anent,iter);
189 }
190 break;
191 case 16 : {
192 DeclareAndCast(IGESGeom_Point,anent,ent);
193 if (anent.IsNull()) return;
194 IGESGeom_ToolPoint tool;
195 tool.OwnShared(anent,iter);
196 }
197 break;
198 case 17 : {
199 DeclareAndCast(IGESGeom_RuledSurface,anent,ent);
200 if (anent.IsNull()) return;
201 IGESGeom_ToolRuledSurface tool;
202 tool.OwnShared(anent,iter);
203 }
204 break;
205 case 18 : {
206 DeclareAndCast(IGESGeom_SplineCurve,anent,ent);
207 if (anent.IsNull()) return;
208 IGESGeom_ToolSplineCurve tool;
209 tool.OwnShared(anent,iter);
210 }
211 break;
212 case 19 : {
213 DeclareAndCast(IGESGeom_SplineSurface,anent,ent);
214 if (anent.IsNull()) return;
215 IGESGeom_ToolSplineSurface tool;
216 tool.OwnShared(anent,iter);
217 }
218 break;
219 case 20 : {
220 DeclareAndCast(IGESGeom_SurfaceOfRevolution,anent,ent);
221 if (anent.IsNull()) return;
222 IGESGeom_ToolSurfaceOfRevolution tool;
223 tool.OwnShared(anent,iter);
224 }
225 break;
226 case 21 : {
227 DeclareAndCast(IGESGeom_TabulatedCylinder,anent,ent);
228 if (anent.IsNull()) return;
229 IGESGeom_ToolTabulatedCylinder tool;
230 tool.OwnShared(anent,iter);
231 }
232 break;
233 case 22 : {
234 DeclareAndCast(IGESGeom_TransformationMatrix,anent,ent);
235 if (anent.IsNull()) return;
236 IGESGeom_ToolTransformationMatrix tool;
237 tool.OwnShared(anent,iter);
238 }
239 break;
240 case 23 : {
241 DeclareAndCast(IGESGeom_TrimmedSurface,anent,ent);
242 if (anent.IsNull()) return;
243 IGESGeom_ToolTrimmedSurface tool;
244 tool.OwnShared(anent,iter);
245 }
246 break;
247 default : break;
248 }
249}
250
251
252 IGESData_DirChecker IGESGeom_GeneralModule::DirChecker
253 (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const
254{
255 switch (CN) {
256 case 1 : {
257 DeclareAndCast(IGESGeom_BSplineCurve,anent,ent);
258 if (anent.IsNull()) break;
259 IGESGeom_ToolBSplineCurve tool;
260 return tool.DirChecker(anent);
261 }
262 case 2 : {
263 DeclareAndCast(IGESGeom_BSplineSurface,anent,ent);
264 if (anent.IsNull()) break;
265 IGESGeom_ToolBSplineSurface tool;
266 return tool.DirChecker(anent);
267 }
268 case 3 : {
269 DeclareAndCast(IGESGeom_Boundary,anent,ent);
270 if (anent.IsNull()) break;
271 IGESGeom_ToolBoundary tool;
272 return tool.DirChecker(anent);
273 }
274 case 4 : {
275 DeclareAndCast(IGESGeom_BoundedSurface,anent,ent);
276 if (anent.IsNull()) break;
277 IGESGeom_ToolBoundedSurface tool;
278 return tool.DirChecker(anent);
279 }
280 case 5 : {
281 DeclareAndCast(IGESGeom_CircularArc,anent,ent);
282 if (anent.IsNull()) break;
283 IGESGeom_ToolCircularArc tool;
284 return tool.DirChecker(anent);
285 }
286 case 6 : {
287 DeclareAndCast(IGESGeom_CompositeCurve,anent,ent);
288 if (anent.IsNull()) break;
289 IGESGeom_ToolCompositeCurve tool;
290 return tool.DirChecker(anent);
291 }
292 case 7 : {
293 DeclareAndCast(IGESGeom_ConicArc,anent,ent);
294 if (anent.IsNull()) break;
295 IGESGeom_ToolConicArc tool;
296 return tool.DirChecker(anent);
297 }
298 case 8 : {
299 DeclareAndCast(IGESGeom_CopiousData,anent,ent);
300 if (anent.IsNull()) break;
301 IGESGeom_ToolCopiousData tool;
302 return tool.DirChecker(anent);
303 }
304 case 9 : {
305 DeclareAndCast(IGESGeom_CurveOnSurface,anent,ent);
306 if (anent.IsNull()) break;
307 IGESGeom_ToolCurveOnSurface tool;
308 return tool.DirChecker(anent);
309 }
310 case 10 : {
311 DeclareAndCast(IGESGeom_Direction,anent,ent);
312 if (anent.IsNull()) break;
313 IGESGeom_ToolDirection tool;
314 return tool.DirChecker(anent);
315 }
316 case 11 : {
317 DeclareAndCast(IGESGeom_Flash,anent,ent);
318 if (anent.IsNull()) break;
319 IGESGeom_ToolFlash tool;
320 return tool.DirChecker(anent);
321 }
322 case 12 : {
323 DeclareAndCast(IGESGeom_Line,anent,ent);
324 if (anent.IsNull()) break;
325 IGESGeom_ToolLine tool;
326 return tool.DirChecker(anent);
327 }
328 case 13 : {
329 DeclareAndCast(IGESGeom_OffsetCurve,anent,ent);
330 if (anent.IsNull()) break;
331 IGESGeom_ToolOffsetCurve tool;
332 return tool.DirChecker(anent);
333 }
334 case 14 : {
335 DeclareAndCast(IGESGeom_OffsetSurface,anent,ent);
336 if (anent.IsNull()) break;
337 IGESGeom_ToolOffsetSurface tool;
338 return tool.DirChecker(anent);
339 }
340 case 15 : {
341 DeclareAndCast(IGESGeom_Plane,anent,ent);
342 if (anent.IsNull()) break;
343 IGESGeom_ToolPlane tool;
344 return tool.DirChecker(anent);
345 }
346 case 16 : {
347 DeclareAndCast(IGESGeom_Point,anent,ent);
348 if (anent.IsNull()) break;
349 IGESGeom_ToolPoint tool;
350 return tool.DirChecker(anent);
351 }
352 case 17 : {
353 DeclareAndCast(IGESGeom_RuledSurface,anent,ent);
354 if (anent.IsNull()) break;
355 IGESGeom_ToolRuledSurface tool;
356 return tool.DirChecker(anent);
357 }
358 case 18 : {
359 DeclareAndCast(IGESGeom_SplineCurve,anent,ent);
360 if (anent.IsNull()) break;
361 IGESGeom_ToolSplineCurve tool;
362 return tool.DirChecker(anent);
363 }
364 case 19 : {
365 DeclareAndCast(IGESGeom_SplineSurface,anent,ent);
366 if (anent.IsNull()) break;
367 IGESGeom_ToolSplineSurface tool;
368 return tool.DirChecker(anent);
369 }
370 case 20 : {
371 DeclareAndCast(IGESGeom_SurfaceOfRevolution,anent,ent);
372 if (anent.IsNull()) break;
373 IGESGeom_ToolSurfaceOfRevolution tool;
374 return tool.DirChecker(anent);
375 }
376 case 21 : {
377 DeclareAndCast(IGESGeom_TabulatedCylinder,anent,ent);
378 if (anent.IsNull()) break;
379 IGESGeom_ToolTabulatedCylinder tool;
380 return tool.DirChecker(anent);
381 }
382 case 22 : {
383 DeclareAndCast(IGESGeom_TransformationMatrix,anent,ent);
384 if (anent.IsNull()) break;
385 IGESGeom_ToolTransformationMatrix tool;
386 return tool.DirChecker(anent);
387 }
388 case 23 : {
389 DeclareAndCast(IGESGeom_TrimmedSurface,anent,ent);
390 if (anent.IsNull()) break;
391 IGESGeom_ToolTrimmedSurface tool;
392 return tool.DirChecker(anent);
393 }
394 default : break;
395 }
396 return IGESData_DirChecker(); // by default, no specific criterium
397}
398
399
400 void IGESGeom_GeneralModule::OwnCheckCase
401 (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent,
402 const Interface_ShareTool& shares, Handle(Interface_Check)& ach) const
403{
404 switch (CN) {
405 case 1 : {
406 DeclareAndCast(IGESGeom_BSplineCurve,anent,ent);
407 if (anent.IsNull()) return;
408 IGESGeom_ToolBSplineCurve tool;
409 tool.OwnCheck(anent,shares,ach);
410 }
411 break;
412 case 2 : {
413 DeclareAndCast(IGESGeom_BSplineSurface,anent,ent);
414 if (anent.IsNull()) return;
415 IGESGeom_ToolBSplineSurface tool;
416 tool.OwnCheck(anent,shares,ach);
417 }
418 break;
419 case 3 : {
420 DeclareAndCast(IGESGeom_Boundary,anent,ent);
421 if (anent.IsNull()) return;
422 IGESGeom_ToolBoundary tool;
423 tool.OwnCheck(anent,shares,ach);
424 }
425 break;
426 case 4 : {
427 DeclareAndCast(IGESGeom_BoundedSurface,anent,ent);
428 if (anent.IsNull()) return;
429 IGESGeom_ToolBoundedSurface tool;
430 tool.OwnCheck(anent,shares,ach);
431 }
432 break;
433 case 5 : {
434 DeclareAndCast(IGESGeom_CircularArc,anent,ent);
435 if (anent.IsNull()) return;
436 IGESGeom_ToolCircularArc tool;
437 tool.OwnCheck(anent,shares,ach);
438 }
439 break;
440 case 6 : {
441 DeclareAndCast(IGESGeom_CompositeCurve,anent,ent);
442 if (anent.IsNull()) return;
443 IGESGeom_ToolCompositeCurve tool;
444 tool.OwnCheck(anent,shares,ach);
445 }
446 break;
447 case 7 : {
448 DeclareAndCast(IGESGeom_ConicArc,anent,ent);
449 if (anent.IsNull()) return;
450 IGESGeom_ToolConicArc tool;
451 tool.OwnCheck(anent,shares,ach);
452 }
453 break;
454 case 8 : {
455 DeclareAndCast(IGESGeom_CopiousData,anent,ent);
456 if (anent.IsNull()) return;
457 IGESGeom_ToolCopiousData tool;
458 tool.OwnCheck(anent,shares,ach);
459 }
460 break;
461 case 9 : {
462 DeclareAndCast(IGESGeom_CurveOnSurface,anent,ent);
463 if (anent.IsNull()) return;
464 IGESGeom_ToolCurveOnSurface tool;
465 tool.OwnCheck(anent,shares,ach);
466 }
467 break;
468 case 10 : {
469 DeclareAndCast(IGESGeom_Direction,anent,ent);
470 if (anent.IsNull()) return;
471 IGESGeom_ToolDirection tool;
472 tool.OwnCheck(anent,shares,ach);
473 }
474 break;
475 case 11 : {
476 DeclareAndCast(IGESGeom_Flash,anent,ent);
477 if (anent.IsNull()) return;
478 IGESGeom_ToolFlash tool;
479 tool.OwnCheck(anent,shares,ach);
480 }
481 break;
482 case 12 : {
483 DeclareAndCast(IGESGeom_Line,anent,ent);
484 if (anent.IsNull()) return;
485 IGESGeom_ToolLine tool;
486 tool.OwnCheck(anent,shares,ach);
487 }
488 break;
489 case 13 : {
490 DeclareAndCast(IGESGeom_OffsetCurve,anent,ent);
491 if (anent.IsNull()) return;
492 IGESGeom_ToolOffsetCurve tool;
493 tool.OwnCheck(anent,shares,ach);
494 }
495 break;
496 case 14 : {
497 DeclareAndCast(IGESGeom_OffsetSurface,anent,ent);
498 if (anent.IsNull()) return;
499 IGESGeom_ToolOffsetSurface tool;
500 tool.OwnCheck(anent,shares,ach);
501 }
502 break;
503 case 15 : {
504 DeclareAndCast(IGESGeom_Plane,anent,ent);
505 if (anent.IsNull()) return;
506 IGESGeom_ToolPlane tool;
507 tool.OwnCheck(anent,shares,ach);
508 }
509 break;
510 case 16 : {
511 DeclareAndCast(IGESGeom_Point,anent,ent);
512 if (anent.IsNull()) return;
513 IGESGeom_ToolPoint tool;
514 tool.OwnCheck(anent,shares,ach);
515 }
516 break;
517 case 17 : {
518 DeclareAndCast(IGESGeom_RuledSurface,anent,ent);
519 if (anent.IsNull()) return;
520 IGESGeom_ToolRuledSurface tool;
521 tool.OwnCheck(anent,shares,ach);
522 }
523 break;
524 case 18 : {
525 DeclareAndCast(IGESGeom_SplineCurve,anent,ent);
526 if (anent.IsNull()) return;
527 IGESGeom_ToolSplineCurve tool;
528 tool.OwnCheck(anent,shares,ach);
529 }
530 break;
531 case 19 : {
532 DeclareAndCast(IGESGeom_SplineSurface,anent,ent);
533 if (anent.IsNull()) return;
534 IGESGeom_ToolSplineSurface tool;
535 tool.OwnCheck(anent,shares,ach);
536 }
537 break;
538 case 20 : {
539 DeclareAndCast(IGESGeom_SurfaceOfRevolution,anent,ent);
540 if (anent.IsNull()) return;
541 IGESGeom_ToolSurfaceOfRevolution tool;
542 tool.OwnCheck(anent,shares,ach);
543 }
544 break;
545 case 21 : {
546 DeclareAndCast(IGESGeom_TabulatedCylinder,anent,ent);
547 if (anent.IsNull()) return;
548 IGESGeom_ToolTabulatedCylinder tool;
549 tool.OwnCheck(anent,shares,ach);
550 }
551 break;
552 case 22 : {
553 DeclareAndCast(IGESGeom_TransformationMatrix,anent,ent);
554 if (anent.IsNull()) return;
555 IGESGeom_ToolTransformationMatrix tool;
556 tool.OwnCheck(anent,shares,ach);
557 }
558 break;
559 case 23 : {
560 DeclareAndCast(IGESGeom_TrimmedSurface,anent,ent);
561 if (anent.IsNull()) return;
562 IGESGeom_ToolTrimmedSurface tool;
563 tool.OwnCheck(anent,shares,ach);
564 }
565 break;
566 default : break;
567 }
568}
569
570
571 Standard_Boolean IGESGeom_GeneralModule::NewVoid
572 (const Standard_Integer CN, Handle(Standard_Transient)& ent) const
573{
574 switch (CN) {
575 case 1 : ent = new IGESGeom_BSplineCurve; break;
576 case 2 : ent = new IGESGeom_BSplineSurface; break;
577 case 3 : ent = new IGESGeom_Boundary; break;
578 case 4 : ent = new IGESGeom_BoundedSurface; break;
579 case 5 : ent = new IGESGeom_CircularArc; break;
580 case 6 : ent = new IGESGeom_CompositeCurve; break;
581 case 7 : ent = new IGESGeom_ConicArc; break;
582 case 8 : ent = new IGESGeom_CopiousData; break;
583 case 9 : ent = new IGESGeom_CurveOnSurface; break;
584 case 10 : ent = new IGESGeom_Direction; break;
585 case 11 : ent = new IGESGeom_Flash; break;
586 case 12 : ent = new IGESGeom_Line; break;
587 case 13 : ent = new IGESGeom_OffsetCurve; break;
588 case 14 : ent = new IGESGeom_OffsetSurface; break;
589 case 15 : ent = new IGESGeom_Plane; break;
590 case 16 : ent = new IGESGeom_Point; break;
591 case 17 : ent = new IGESGeom_RuledSurface; break;
592 case 18 : ent = new IGESGeom_SplineCurve; break;
593 case 19 : ent = new IGESGeom_SplineSurface; break;
594 case 20 : ent = new IGESGeom_SurfaceOfRevolution; break;
595 case 21 : ent = new IGESGeom_TabulatedCylinder; break;
596 case 22 : ent = new IGESGeom_TransformationMatrix; break;
597 case 23 : ent = new IGESGeom_TrimmedSurface; break;
598 default : return Standard_False; // by default, Failure on Recognize
599 }
600 return Standard_True;
601}
602
603
604 void IGESGeom_GeneralModule::OwnCopyCase
605 (const Standard_Integer CN,
606 const Handle(IGESData_IGESEntity)& entfrom,
607 const Handle(IGESData_IGESEntity)& entto,
608 Interface_CopyTool& TC) const
609{
610 switch (CN) {
611 case 1 : {
612 DeclareAndCast(IGESGeom_BSplineCurve,enfr,entfrom);
613 DeclareAndCast(IGESGeom_BSplineCurve,ento,entto);
614 IGESGeom_ToolBSplineCurve tool;
615 tool.OwnCopy(enfr,ento,TC);
616 }
617 break;
618 case 2 : {
619 DeclareAndCast(IGESGeom_BSplineSurface,enfr,entfrom);
620 DeclareAndCast(IGESGeom_BSplineSurface,ento,entto);
621 IGESGeom_ToolBSplineSurface tool;
622 tool.OwnCopy(enfr,ento,TC);
623 }
624 break;
625 case 3 : {
626 DeclareAndCast(IGESGeom_Boundary,enfr,entfrom);
627 DeclareAndCast(IGESGeom_Boundary,ento,entto);
628 IGESGeom_ToolBoundary tool;
629 tool.OwnCopy(enfr,ento,TC);
630 }
631 break;
632 case 4 : {
633 DeclareAndCast(IGESGeom_BoundedSurface,enfr,entfrom);
634 DeclareAndCast(IGESGeom_BoundedSurface,ento,entto);
635 IGESGeom_ToolBoundedSurface tool;
636 tool.OwnCopy(enfr,ento,TC);
637 }
638 break;
639 case 5 : {
640 DeclareAndCast(IGESGeom_CircularArc,enfr,entfrom);
641 DeclareAndCast(IGESGeom_CircularArc,ento,entto);
642 IGESGeom_ToolCircularArc tool;
643 tool.OwnCopy(enfr,ento,TC);
644 }
645 break;
646 case 6 : {
647 DeclareAndCast(IGESGeom_CompositeCurve,enfr,entfrom);
648 DeclareAndCast(IGESGeom_CompositeCurve,ento,entto);
649 IGESGeom_ToolCompositeCurve tool;
650 tool.OwnCopy(enfr,ento,TC);
651 }
652 break;
653 case 7 : {
654 DeclareAndCast(IGESGeom_ConicArc,enfr,entfrom);
655 DeclareAndCast(IGESGeom_ConicArc,ento,entto);
656 IGESGeom_ToolConicArc tool;
657 tool.OwnCopy(enfr,ento,TC);
658 }
659 break;
660 case 8 : {
661 DeclareAndCast(IGESGeom_CopiousData,enfr,entfrom);
662 DeclareAndCast(IGESGeom_CopiousData,ento,entto);
663 IGESGeom_ToolCopiousData tool;
664 tool.OwnCopy(enfr,ento,TC);
665 }
666 break;
667 case 9 : {
668 DeclareAndCast(IGESGeom_CurveOnSurface,enfr,entfrom);
669 DeclareAndCast(IGESGeom_CurveOnSurface,ento,entto);
670 IGESGeom_ToolCurveOnSurface tool;
671 tool.OwnCopy(enfr,ento,TC);
672 }
673 break;
674 case 10 : {
675 DeclareAndCast(IGESGeom_Direction,enfr,entfrom);
676 DeclareAndCast(IGESGeom_Direction,ento,entto);
677 IGESGeom_ToolDirection tool;
678 tool.OwnCopy(enfr,ento,TC);
679 }
680 break;
681 case 11 : {
682 DeclareAndCast(IGESGeom_Flash,enfr,entfrom);
683 DeclareAndCast(IGESGeom_Flash,ento,entto);
684 IGESGeom_ToolFlash tool;
685 tool.OwnCopy(enfr,ento,TC);
686 }
687 break;
688 case 12 : {
689 DeclareAndCast(IGESGeom_Line,enfr,entfrom);
690 DeclareAndCast(IGESGeom_Line,ento,entto);
691 IGESGeom_ToolLine tool;
692 tool.OwnCopy(enfr,ento,TC);
693 }
694 break;
695 case 13 : {
696 DeclareAndCast(IGESGeom_OffsetCurve,enfr,entfrom);
697 DeclareAndCast(IGESGeom_OffsetCurve,ento,entto);
698 IGESGeom_ToolOffsetCurve tool;
699 tool.OwnCopy(enfr,ento,TC);
700 }
701 break;
702 case 14 : {
703 DeclareAndCast(IGESGeom_OffsetSurface,enfr,entfrom);
704 DeclareAndCast(IGESGeom_OffsetSurface,ento,entto);
705 IGESGeom_ToolOffsetSurface tool;
706 tool.OwnCopy(enfr,ento,TC);
707 }
708 break;
709 case 15 : {
710 DeclareAndCast(IGESGeom_Plane,enfr,entfrom);
711 DeclareAndCast(IGESGeom_Plane,ento,entto);
712 IGESGeom_ToolPlane tool;
713 tool.OwnCopy(enfr,ento,TC);
714 }
715 break;
716 case 16 : {
717 DeclareAndCast(IGESGeom_Point,enfr,entfrom);
718 DeclareAndCast(IGESGeom_Point,ento,entto);
719 IGESGeom_ToolPoint tool;
720 tool.OwnCopy(enfr,ento,TC);
721 }
722 break;
723 case 17 : {
724 DeclareAndCast(IGESGeom_RuledSurface,enfr,entfrom);
725 DeclareAndCast(IGESGeom_RuledSurface,ento,entto);
726 IGESGeom_ToolRuledSurface tool;
727 tool.OwnCopy(enfr,ento,TC);
728 }
729 break;
730 case 18 : {
731 DeclareAndCast(IGESGeom_SplineCurve,enfr,entfrom);
732 DeclareAndCast(IGESGeom_SplineCurve,ento,entto);
733 IGESGeom_ToolSplineCurve tool;
734 tool.OwnCopy(enfr,ento,TC);
735 }
736 break;
737 case 19 : {
738 DeclareAndCast(IGESGeom_SplineSurface,enfr,entfrom);
739 DeclareAndCast(IGESGeom_SplineSurface,ento,entto);
740 IGESGeom_ToolSplineSurface tool;
741 tool.OwnCopy(enfr,ento,TC);
742 }
743 break;
744 case 20 : {
745 DeclareAndCast(IGESGeom_SurfaceOfRevolution,enfr,entfrom);
746 DeclareAndCast(IGESGeom_SurfaceOfRevolution,ento,entto);
747 IGESGeom_ToolSurfaceOfRevolution tool;
748 tool.OwnCopy(enfr,ento,TC);
749 }
750 break;
751 case 21 : {
752 DeclareAndCast(IGESGeom_TabulatedCylinder,enfr,entfrom);
753 DeclareAndCast(IGESGeom_TabulatedCylinder,ento,entto);
754 IGESGeom_ToolTabulatedCylinder tool;
755 tool.OwnCopy(enfr,ento,TC);
756 }
757 break;
758 case 22 : {
759 DeclareAndCast(IGESGeom_TransformationMatrix,enfr,entfrom);
760 DeclareAndCast(IGESGeom_TransformationMatrix,ento,entto);
761 IGESGeom_ToolTransformationMatrix tool;
762 tool.OwnCopy(enfr,ento,TC);
763 }
764 break;
765 case 23 : {
766 DeclareAndCast(IGESGeom_TrimmedSurface,enfr,entfrom);
767 DeclareAndCast(IGESGeom_TrimmedSurface,ento,entto);
768 IGESGeom_ToolTrimmedSurface tool;
769 tool.OwnCopy(enfr,ento,TC);
770 }
771 break;
772 default : break;
773 }
774}
775
776
777 Standard_Integer IGESGeom_GeneralModule::CategoryNumber
778 (const Standard_Integer CN, const Handle(Standard_Transient)& ent,
779 const Interface_ShareTool& ) const
780{
781 if (CN == 11) return Interface_Category::Number("Drawing");
782 if (CN == 15) {
783 DeclareAndCast(IGESGeom_Plane,anent,ent);
784 if (anent->HasSymbolAttach()) return Interface_Category::Number("Drawing");
785 }
786 if (CN == 16) {
787 DeclareAndCast(IGESGeom_Point,anent,ent);
788 if (anent->HasDisplaySymbol()) return Interface_Category::Number("Drawing");
789 }
790 if (CN == 22) return Interface_Category::Number("Auxiliary");
791 return Interface_Category::Number("Shape");
792}