1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
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
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.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
15 #include <IGESData_DirChecker.hxx>
16 #include <IGESData_IGESEntity.hxx>
17 #include <IGESGeom_Boundary.hxx>
18 #include <IGESGeom_BoundedSurface.hxx>
19 #include <IGESGeom_BSplineCurve.hxx>
20 #include <IGESGeom_BSplineSurface.hxx>
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>
28 #include <IGESGeom_GeneralModule.hxx>
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>
39 #include <IGESGeom_ToolBoundary.hxx>
40 #include <IGESGeom_ToolBoundedSurface.hxx>
41 #include <IGESGeom_ToolBSplineCurve.hxx>
42 #include <IGESGeom_ToolBSplineSurface.hxx>
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>
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>
73 IMPLEMENT_STANDARD_RTTIEXT(IGESGeom_GeneralModule,IGESData_GeneralModule)
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
78 IGESGeom_GeneralModule::IGESGeom_GeneralModule () { }
81 void IGESGeom_GeneralModule::OwnSharedCase
82 (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent,
83 Interface_EntityIterator& iter) const
87 DeclareAndCast(IGESGeom_BSplineCurve,anent,ent);
88 if (anent.IsNull()) return;
89 IGESGeom_ToolBSplineCurve tool;
90 tool.OwnShared(anent,iter);
94 DeclareAndCast(IGESGeom_BSplineSurface,anent,ent);
95 if (anent.IsNull()) return;
96 IGESGeom_ToolBSplineSurface tool;
97 tool.OwnShared(anent,iter);
101 DeclareAndCast(IGESGeom_Boundary,anent,ent);
102 if (anent.IsNull()) return;
103 IGESGeom_ToolBoundary tool;
104 tool.OwnShared(anent,iter);
108 DeclareAndCast(IGESGeom_BoundedSurface,anent,ent);
109 if (anent.IsNull()) return;
110 IGESGeom_ToolBoundedSurface tool;
111 tool.OwnShared(anent,iter);
115 DeclareAndCast(IGESGeom_CircularArc,anent,ent);
116 if (anent.IsNull()) return;
117 IGESGeom_ToolCircularArc tool;
118 tool.OwnShared(anent,iter);
122 DeclareAndCast(IGESGeom_CompositeCurve,anent,ent);
123 if (anent.IsNull()) return;
124 IGESGeom_ToolCompositeCurve tool;
125 tool.OwnShared(anent,iter);
129 DeclareAndCast(IGESGeom_ConicArc,anent,ent);
130 if (anent.IsNull()) return;
131 IGESGeom_ToolConicArc tool;
132 tool.OwnShared(anent,iter);
136 DeclareAndCast(IGESGeom_CopiousData,anent,ent);
137 if (anent.IsNull()) return;
138 IGESGeom_ToolCopiousData tool;
139 tool.OwnShared(anent,iter);
143 DeclareAndCast(IGESGeom_CurveOnSurface,anent,ent);
144 if (anent.IsNull()) return;
145 IGESGeom_ToolCurveOnSurface tool;
146 tool.OwnShared(anent,iter);
150 DeclareAndCast(IGESGeom_Direction,anent,ent);
151 if (anent.IsNull()) return;
152 IGESGeom_ToolDirection tool;
153 tool.OwnShared(anent,iter);
157 DeclareAndCast(IGESGeom_Flash,anent,ent);
158 if (anent.IsNull()) return;
159 IGESGeom_ToolFlash tool;
160 tool.OwnShared(anent,iter);
164 DeclareAndCast(IGESGeom_Line,anent,ent);
165 if (anent.IsNull()) return;
166 IGESGeom_ToolLine tool;
167 tool.OwnShared(anent,iter);
171 DeclareAndCast(IGESGeom_OffsetCurve,anent,ent);
172 if (anent.IsNull()) return;
173 IGESGeom_ToolOffsetCurve tool;
174 tool.OwnShared(anent,iter);
178 DeclareAndCast(IGESGeom_OffsetSurface,anent,ent);
179 if (anent.IsNull()) return;
180 IGESGeom_ToolOffsetSurface tool;
181 tool.OwnShared(anent,iter);
185 DeclareAndCast(IGESGeom_Plane,anent,ent);
186 if (anent.IsNull()) return;
187 IGESGeom_ToolPlane tool;
188 tool.OwnShared(anent,iter);
192 DeclareAndCast(IGESGeom_Point,anent,ent);
193 if (anent.IsNull()) return;
194 IGESGeom_ToolPoint tool;
195 tool.OwnShared(anent,iter);
199 DeclareAndCast(IGESGeom_RuledSurface,anent,ent);
200 if (anent.IsNull()) return;
201 IGESGeom_ToolRuledSurface tool;
202 tool.OwnShared(anent,iter);
206 DeclareAndCast(IGESGeom_SplineCurve,anent,ent);
207 if (anent.IsNull()) return;
208 IGESGeom_ToolSplineCurve tool;
209 tool.OwnShared(anent,iter);
213 DeclareAndCast(IGESGeom_SplineSurface,anent,ent);
214 if (anent.IsNull()) return;
215 IGESGeom_ToolSplineSurface tool;
216 tool.OwnShared(anent,iter);
220 DeclareAndCast(IGESGeom_SurfaceOfRevolution,anent,ent);
221 if (anent.IsNull()) return;
222 IGESGeom_ToolSurfaceOfRevolution tool;
223 tool.OwnShared(anent,iter);
227 DeclareAndCast(IGESGeom_TabulatedCylinder,anent,ent);
228 if (anent.IsNull()) return;
229 IGESGeom_ToolTabulatedCylinder tool;
230 tool.OwnShared(anent,iter);
234 DeclareAndCast(IGESGeom_TransformationMatrix,anent,ent);
235 if (anent.IsNull()) return;
236 IGESGeom_ToolTransformationMatrix tool;
237 tool.OwnShared(anent,iter);
241 DeclareAndCast(IGESGeom_TrimmedSurface,anent,ent);
242 if (anent.IsNull()) return;
243 IGESGeom_ToolTrimmedSurface tool;
244 tool.OwnShared(anent,iter);
252 IGESData_DirChecker IGESGeom_GeneralModule::DirChecker
253 (const Standard_Integer CN, const Handle(IGESData_IGESEntity)& ent) const
257 DeclareAndCast(IGESGeom_BSplineCurve,anent,ent);
258 if (anent.IsNull()) break;
259 IGESGeom_ToolBSplineCurve tool;
260 return tool.DirChecker(anent);
263 DeclareAndCast(IGESGeom_BSplineSurface,anent,ent);
264 if (anent.IsNull()) break;
265 IGESGeom_ToolBSplineSurface tool;
266 return tool.DirChecker(anent);
269 DeclareAndCast(IGESGeom_Boundary,anent,ent);
270 if (anent.IsNull()) break;
271 IGESGeom_ToolBoundary tool;
272 return tool.DirChecker(anent);
275 DeclareAndCast(IGESGeom_BoundedSurface,anent,ent);
276 if (anent.IsNull()) break;
277 IGESGeom_ToolBoundedSurface tool;
278 return tool.DirChecker(anent);
281 DeclareAndCast(IGESGeom_CircularArc,anent,ent);
282 if (anent.IsNull()) break;
283 IGESGeom_ToolCircularArc tool;
284 return tool.DirChecker(anent);
287 DeclareAndCast(IGESGeom_CompositeCurve,anent,ent);
288 if (anent.IsNull()) break;
289 IGESGeom_ToolCompositeCurve tool;
290 return tool.DirChecker(anent);
293 DeclareAndCast(IGESGeom_ConicArc,anent,ent);
294 if (anent.IsNull()) break;
295 IGESGeom_ToolConicArc tool;
296 return tool.DirChecker(anent);
299 DeclareAndCast(IGESGeom_CopiousData,anent,ent);
300 if (anent.IsNull()) break;
301 IGESGeom_ToolCopiousData tool;
302 return tool.DirChecker(anent);
305 DeclareAndCast(IGESGeom_CurveOnSurface,anent,ent);
306 if (anent.IsNull()) break;
307 IGESGeom_ToolCurveOnSurface tool;
308 return tool.DirChecker(anent);
311 DeclareAndCast(IGESGeom_Direction,anent,ent);
312 if (anent.IsNull()) break;
313 IGESGeom_ToolDirection tool;
314 return tool.DirChecker(anent);
317 DeclareAndCast(IGESGeom_Flash,anent,ent);
318 if (anent.IsNull()) break;
319 IGESGeom_ToolFlash tool;
320 return tool.DirChecker(anent);
323 DeclareAndCast(IGESGeom_Line,anent,ent);
324 if (anent.IsNull()) break;
325 IGESGeom_ToolLine tool;
326 return tool.DirChecker(anent);
329 DeclareAndCast(IGESGeom_OffsetCurve,anent,ent);
330 if (anent.IsNull()) break;
331 IGESGeom_ToolOffsetCurve tool;
332 return tool.DirChecker(anent);
335 DeclareAndCast(IGESGeom_OffsetSurface,anent,ent);
336 if (anent.IsNull()) break;
337 IGESGeom_ToolOffsetSurface tool;
338 return tool.DirChecker(anent);
341 DeclareAndCast(IGESGeom_Plane,anent,ent);
342 if (anent.IsNull()) break;
343 IGESGeom_ToolPlane tool;
344 return tool.DirChecker(anent);
347 DeclareAndCast(IGESGeom_Point,anent,ent);
348 if (anent.IsNull()) break;
349 IGESGeom_ToolPoint tool;
350 return tool.DirChecker(anent);
353 DeclareAndCast(IGESGeom_RuledSurface,anent,ent);
354 if (anent.IsNull()) break;
355 IGESGeom_ToolRuledSurface tool;
356 return tool.DirChecker(anent);
359 DeclareAndCast(IGESGeom_SplineCurve,anent,ent);
360 if (anent.IsNull()) break;
361 IGESGeom_ToolSplineCurve tool;
362 return tool.DirChecker(anent);
365 DeclareAndCast(IGESGeom_SplineSurface,anent,ent);
366 if (anent.IsNull()) break;
367 IGESGeom_ToolSplineSurface tool;
368 return tool.DirChecker(anent);
371 DeclareAndCast(IGESGeom_SurfaceOfRevolution,anent,ent);
372 if (anent.IsNull()) break;
373 IGESGeom_ToolSurfaceOfRevolution tool;
374 return tool.DirChecker(anent);
377 DeclareAndCast(IGESGeom_TabulatedCylinder,anent,ent);
378 if (anent.IsNull()) break;
379 IGESGeom_ToolTabulatedCylinder tool;
380 return tool.DirChecker(anent);
383 DeclareAndCast(IGESGeom_TransformationMatrix,anent,ent);
384 if (anent.IsNull()) break;
385 IGESGeom_ToolTransformationMatrix tool;
386 return tool.DirChecker(anent);
389 DeclareAndCast(IGESGeom_TrimmedSurface,anent,ent);
390 if (anent.IsNull()) break;
391 IGESGeom_ToolTrimmedSurface tool;
392 return tool.DirChecker(anent);
396 return IGESData_DirChecker(); // by default, no specific criterium
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
406 DeclareAndCast(IGESGeom_BSplineCurve,anent,ent);
407 if (anent.IsNull()) return;
408 IGESGeom_ToolBSplineCurve tool;
409 tool.OwnCheck(anent,shares,ach);
413 DeclareAndCast(IGESGeom_BSplineSurface,anent,ent);
414 if (anent.IsNull()) return;
415 IGESGeom_ToolBSplineSurface tool;
416 tool.OwnCheck(anent,shares,ach);
420 DeclareAndCast(IGESGeom_Boundary,anent,ent);
421 if (anent.IsNull()) return;
422 IGESGeom_ToolBoundary tool;
423 tool.OwnCheck(anent,shares,ach);
427 DeclareAndCast(IGESGeom_BoundedSurface,anent,ent);
428 if (anent.IsNull()) return;
429 IGESGeom_ToolBoundedSurface tool;
430 tool.OwnCheck(anent,shares,ach);
434 DeclareAndCast(IGESGeom_CircularArc,anent,ent);
435 if (anent.IsNull()) return;
436 IGESGeom_ToolCircularArc tool;
437 tool.OwnCheck(anent,shares,ach);
441 DeclareAndCast(IGESGeom_CompositeCurve,anent,ent);
442 if (anent.IsNull()) return;
443 IGESGeom_ToolCompositeCurve tool;
444 tool.OwnCheck(anent,shares,ach);
448 DeclareAndCast(IGESGeom_ConicArc,anent,ent);
449 if (anent.IsNull()) return;
450 IGESGeom_ToolConicArc tool;
451 tool.OwnCheck(anent,shares,ach);
455 DeclareAndCast(IGESGeom_CopiousData,anent,ent);
456 if (anent.IsNull()) return;
457 IGESGeom_ToolCopiousData tool;
458 tool.OwnCheck(anent,shares,ach);
462 DeclareAndCast(IGESGeom_CurveOnSurface,anent,ent);
463 if (anent.IsNull()) return;
464 IGESGeom_ToolCurveOnSurface tool;
465 tool.OwnCheck(anent,shares,ach);
469 DeclareAndCast(IGESGeom_Direction,anent,ent);
470 if (anent.IsNull()) return;
471 IGESGeom_ToolDirection tool;
472 tool.OwnCheck(anent,shares,ach);
476 DeclareAndCast(IGESGeom_Flash,anent,ent);
477 if (anent.IsNull()) return;
478 IGESGeom_ToolFlash tool;
479 tool.OwnCheck(anent,shares,ach);
483 DeclareAndCast(IGESGeom_Line,anent,ent);
484 if (anent.IsNull()) return;
485 IGESGeom_ToolLine tool;
486 tool.OwnCheck(anent,shares,ach);
490 DeclareAndCast(IGESGeom_OffsetCurve,anent,ent);
491 if (anent.IsNull()) return;
492 IGESGeom_ToolOffsetCurve tool;
493 tool.OwnCheck(anent,shares,ach);
497 DeclareAndCast(IGESGeom_OffsetSurface,anent,ent);
498 if (anent.IsNull()) return;
499 IGESGeom_ToolOffsetSurface tool;
500 tool.OwnCheck(anent,shares,ach);
504 DeclareAndCast(IGESGeom_Plane,anent,ent);
505 if (anent.IsNull()) return;
506 IGESGeom_ToolPlane tool;
507 tool.OwnCheck(anent,shares,ach);
511 DeclareAndCast(IGESGeom_Point,anent,ent);
512 if (anent.IsNull()) return;
513 IGESGeom_ToolPoint tool;
514 tool.OwnCheck(anent,shares,ach);
518 DeclareAndCast(IGESGeom_RuledSurface,anent,ent);
519 if (anent.IsNull()) return;
520 IGESGeom_ToolRuledSurface tool;
521 tool.OwnCheck(anent,shares,ach);
525 DeclareAndCast(IGESGeom_SplineCurve,anent,ent);
526 if (anent.IsNull()) return;
527 IGESGeom_ToolSplineCurve tool;
528 tool.OwnCheck(anent,shares,ach);
532 DeclareAndCast(IGESGeom_SplineSurface,anent,ent);
533 if (anent.IsNull()) return;
534 IGESGeom_ToolSplineSurface tool;
535 tool.OwnCheck(anent,shares,ach);
539 DeclareAndCast(IGESGeom_SurfaceOfRevolution,anent,ent);
540 if (anent.IsNull()) return;
541 IGESGeom_ToolSurfaceOfRevolution tool;
542 tool.OwnCheck(anent,shares,ach);
546 DeclareAndCast(IGESGeom_TabulatedCylinder,anent,ent);
547 if (anent.IsNull()) return;
548 IGESGeom_ToolTabulatedCylinder tool;
549 tool.OwnCheck(anent,shares,ach);
553 DeclareAndCast(IGESGeom_TransformationMatrix,anent,ent);
554 if (anent.IsNull()) return;
555 IGESGeom_ToolTransformationMatrix tool;
556 tool.OwnCheck(anent,shares,ach);
560 DeclareAndCast(IGESGeom_TrimmedSurface,anent,ent);
561 if (anent.IsNull()) return;
562 IGESGeom_ToolTrimmedSurface tool;
563 tool.OwnCheck(anent,shares,ach);
571 Standard_Boolean IGESGeom_GeneralModule::NewVoid
572 (const Standard_Integer CN, Handle(Standard_Transient)& ent) const
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
600 return Standard_True;
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
612 DeclareAndCast(IGESGeom_BSplineCurve,enfr,entfrom);
613 DeclareAndCast(IGESGeom_BSplineCurve,ento,entto);
614 IGESGeom_ToolBSplineCurve tool;
615 tool.OwnCopy(enfr,ento,TC);
619 DeclareAndCast(IGESGeom_BSplineSurface,enfr,entfrom);
620 DeclareAndCast(IGESGeom_BSplineSurface,ento,entto);
621 IGESGeom_ToolBSplineSurface tool;
622 tool.OwnCopy(enfr,ento,TC);
626 DeclareAndCast(IGESGeom_Boundary,enfr,entfrom);
627 DeclareAndCast(IGESGeom_Boundary,ento,entto);
628 IGESGeom_ToolBoundary tool;
629 tool.OwnCopy(enfr,ento,TC);
633 DeclareAndCast(IGESGeom_BoundedSurface,enfr,entfrom);
634 DeclareAndCast(IGESGeom_BoundedSurface,ento,entto);
635 IGESGeom_ToolBoundedSurface tool;
636 tool.OwnCopy(enfr,ento,TC);
640 DeclareAndCast(IGESGeom_CircularArc,enfr,entfrom);
641 DeclareAndCast(IGESGeom_CircularArc,ento,entto);
642 IGESGeom_ToolCircularArc tool;
643 tool.OwnCopy(enfr,ento,TC);
647 DeclareAndCast(IGESGeom_CompositeCurve,enfr,entfrom);
648 DeclareAndCast(IGESGeom_CompositeCurve,ento,entto);
649 IGESGeom_ToolCompositeCurve tool;
650 tool.OwnCopy(enfr,ento,TC);
654 DeclareAndCast(IGESGeom_ConicArc,enfr,entfrom);
655 DeclareAndCast(IGESGeom_ConicArc,ento,entto);
656 IGESGeom_ToolConicArc tool;
657 tool.OwnCopy(enfr,ento,TC);
661 DeclareAndCast(IGESGeom_CopiousData,enfr,entfrom);
662 DeclareAndCast(IGESGeom_CopiousData,ento,entto);
663 IGESGeom_ToolCopiousData tool;
664 tool.OwnCopy(enfr,ento,TC);
668 DeclareAndCast(IGESGeom_CurveOnSurface,enfr,entfrom);
669 DeclareAndCast(IGESGeom_CurveOnSurface,ento,entto);
670 IGESGeom_ToolCurveOnSurface tool;
671 tool.OwnCopy(enfr,ento,TC);
675 DeclareAndCast(IGESGeom_Direction,enfr,entfrom);
676 DeclareAndCast(IGESGeom_Direction,ento,entto);
677 IGESGeom_ToolDirection tool;
678 tool.OwnCopy(enfr,ento,TC);
682 DeclareAndCast(IGESGeom_Flash,enfr,entfrom);
683 DeclareAndCast(IGESGeom_Flash,ento,entto);
684 IGESGeom_ToolFlash tool;
685 tool.OwnCopy(enfr,ento,TC);
689 DeclareAndCast(IGESGeom_Line,enfr,entfrom);
690 DeclareAndCast(IGESGeom_Line,ento,entto);
691 IGESGeom_ToolLine tool;
692 tool.OwnCopy(enfr,ento,TC);
696 DeclareAndCast(IGESGeom_OffsetCurve,enfr,entfrom);
697 DeclareAndCast(IGESGeom_OffsetCurve,ento,entto);
698 IGESGeom_ToolOffsetCurve tool;
699 tool.OwnCopy(enfr,ento,TC);
703 DeclareAndCast(IGESGeom_OffsetSurface,enfr,entfrom);
704 DeclareAndCast(IGESGeom_OffsetSurface,ento,entto);
705 IGESGeom_ToolOffsetSurface tool;
706 tool.OwnCopy(enfr,ento,TC);
710 DeclareAndCast(IGESGeom_Plane,enfr,entfrom);
711 DeclareAndCast(IGESGeom_Plane,ento,entto);
712 IGESGeom_ToolPlane tool;
713 tool.OwnCopy(enfr,ento,TC);
717 DeclareAndCast(IGESGeom_Point,enfr,entfrom);
718 DeclareAndCast(IGESGeom_Point,ento,entto);
719 IGESGeom_ToolPoint tool;
720 tool.OwnCopy(enfr,ento,TC);
724 DeclareAndCast(IGESGeom_RuledSurface,enfr,entfrom);
725 DeclareAndCast(IGESGeom_RuledSurface,ento,entto);
726 IGESGeom_ToolRuledSurface tool;
727 tool.OwnCopy(enfr,ento,TC);
731 DeclareAndCast(IGESGeom_SplineCurve,enfr,entfrom);
732 DeclareAndCast(IGESGeom_SplineCurve,ento,entto);
733 IGESGeom_ToolSplineCurve tool;
734 tool.OwnCopy(enfr,ento,TC);
738 DeclareAndCast(IGESGeom_SplineSurface,enfr,entfrom);
739 DeclareAndCast(IGESGeom_SplineSurface,ento,entto);
740 IGESGeom_ToolSplineSurface tool;
741 tool.OwnCopy(enfr,ento,TC);
745 DeclareAndCast(IGESGeom_SurfaceOfRevolution,enfr,entfrom);
746 DeclareAndCast(IGESGeom_SurfaceOfRevolution,ento,entto);
747 IGESGeom_ToolSurfaceOfRevolution tool;
748 tool.OwnCopy(enfr,ento,TC);
752 DeclareAndCast(IGESGeom_TabulatedCylinder,enfr,entfrom);
753 DeclareAndCast(IGESGeom_TabulatedCylinder,ento,entto);
754 IGESGeom_ToolTabulatedCylinder tool;
755 tool.OwnCopy(enfr,ento,TC);
759 DeclareAndCast(IGESGeom_TransformationMatrix,enfr,entfrom);
760 DeclareAndCast(IGESGeom_TransformationMatrix,ento,entto);
761 IGESGeom_ToolTransformationMatrix tool;
762 tool.OwnCopy(enfr,ento,TC);
766 DeclareAndCast(IGESGeom_TrimmedSurface,enfr,entfrom);
767 DeclareAndCast(IGESGeom_TrimmedSurface,ento,entto);
768 IGESGeom_ToolTrimmedSurface tool;
769 tool.OwnCopy(enfr,ento,TC);
777 Standard_Integer IGESGeom_GeneralModule::CategoryNumber
778 (const Standard_Integer CN, const Handle(Standard_Transient)& ent,
779 const Interface_ShareTool& ) const
781 if (CN == 11) return Interface_Category::Number("Drawing");
783 DeclareAndCast(IGESGeom_Plane,anent,ent);
784 if (anent->HasSymbolAttach()) return Interface_Category::Number("Drawing");
787 DeclareAndCast(IGESGeom_Point,anent,ent);
788 if (anent->HasDisplaySymbol()) return Interface_Category::Number("Drawing");
790 if (CN == 22) return Interface_Category::Number("Auxiliary");
791 return Interface_Category::Number("Shape");