42cf5bc1 |
1 | // Created on: 1999-10-25 |
2 | // Created by: Sergey ZARITCHNY <szy@philipox.nnov.matra-dtv.fr> |
3 | // Copyright (c) 1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _QANewBRepNaming_Loader_HeaderFile |
18 | #define _QANewBRepNaming_Loader_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <TopAbs_ShapeEnum.hxx> |
25 | #include <Standard_Boolean.hxx> |
26 | #include <TopTools_DataMapOfShapeShape.hxx> |
27 | #include <TopTools_MapOfShape.hxx> |
28 | class BRepBuilderAPI_MakeShape; |
29 | class TopoDS_Shape; |
30 | class TNaming_Builder; |
31 | class TDF_Label; |
32 | |
33 | |
34 | |
35 | class QANewBRepNaming_Loader |
36 | { |
37 | public: |
38 | |
39 | DEFINE_STANDARD_ALLOC |
40 | |
41 | |
42 | //! Load in the naming data-structure the shape |
43 | //! generated from FACE, EDGE, VERTEX,..., after the |
44 | //! MakeShape operation. <ShapeIn> is the initial |
45 | //! shape. <GeneratedFrom> defines the kind of |
46 | //! shape generation to record in the naming |
47 | //! data-structure. The <builder> is used to store the |
48 | //! set of evolutions in the data-framework of TDF. |
49 | Standard_EXPORT static void LoadGeneratedShapes (BRepBuilderAPI_MakeShape& MakeShape, const TopoDS_Shape& ShapeIn, const TopAbs_ShapeEnum GeneratedFrom, TNaming_Builder& Buider); |
50 | |
51 | //! Load in the naming data-structure the shape |
52 | //! modified from FACE, EDGE, VERTEX,..., |
53 | //! after the MakeShape operation. |
54 | //! <ShapeIn> is the initial shape. |
55 | //! <ModifiedFrom> defines the kind of shape modification |
56 | //! to record in the naming data-structure. |
57 | //! The <builder> is used to store the set of evolutions |
58 | //! in the data-framework of TDF. |
59 | Standard_EXPORT static void LoadModifiedShapes (BRepBuilderAPI_MakeShape& MakeShape, const TopoDS_Shape& ShapeIn, const TopAbs_ShapeEnum ModifiedFrom, TNaming_Builder& Buider, const Standard_Boolean theBool = Standard_False); |
60 | |
61 | //! Load in the naming data-structure the shape |
62 | //! deleted after the MakeShape operation. |
63 | //! <ShapeIn> is the initial shape. |
64 | //! <KindOfDeletedShape> defines the kind of |
65 | //! deletion to record in the naming data-structure. |
66 | //! The <builder> is used to store the set of evolutions |
67 | //! in the data-framework of TDF. |
68 | Standard_EXPORT static void LoadDeletedShapes (BRepBuilderAPI_MakeShape& MakeShape, const TopoDS_Shape& ShapeIn, const TopAbs_ShapeEnum KindOfDeletedShape, TNaming_Builder& Buider); |
69 | |
70 | //! The same as LoadGeneratedShapes plus performs orientation of |
71 | //! loaded shapes according orientation of SubShapes |
72 | Standard_EXPORT static void LoadAndOrientGeneratedShapes (BRepBuilderAPI_MakeShape& MakeShape, const TopoDS_Shape& ShapeIn, const TopAbs_ShapeEnum GeneratedFrom, TNaming_Builder& Buider, const TopTools_DataMapOfShapeShape& SubShapesOfResult); |
73 | |
74 | //! The same as LoadModifiedShapes plus performs orientation of |
75 | //! loaded shapes according orientation of SubShapes |
76 | Standard_EXPORT static void LoadAndOrientModifiedShapes (BRepBuilderAPI_MakeShape& MakeShape, const TopoDS_Shape& ShapeIn, const TopAbs_ShapeEnum ModifiedFrom, TNaming_Builder& Buider, const TopTools_DataMapOfShapeShape& SubShapesOfResult); |
77 | |
78 | Standard_EXPORT static void ModifyPart (const TopoDS_Shape& PartShape, const TopoDS_Shape& Primitive, const TDF_Label& Label); |
79 | |
80 | Standard_EXPORT static Standard_Boolean HasDangleShapes (const TopoDS_Shape& ShapeIn); |
81 | |
82 | Standard_EXPORT static void LoadGeneratedDangleShapes (const TopoDS_Shape& ShapeIn, const TopAbs_ShapeEnum GeneratedFrom, TNaming_Builder& GenBuider); |
83 | |
84 | Standard_EXPORT static void LoadGeneratedDangleShapes (const TopoDS_Shape& ShapeIn, const TopAbs_ShapeEnum GeneratedFrom, const TopTools_MapOfShape& OnlyThese, TNaming_Builder& GenBuider); |
85 | |
86 | Standard_EXPORT static void LoadModifiedDangleShapes (BRepBuilderAPI_MakeShape& MakeShape, const TopoDS_Shape& ShapeIn, const TopAbs_ShapeEnum GeneratedFrom, TNaming_Builder& GenBuider); |
87 | |
88 | Standard_EXPORT static void LoadDeletedDangleShapes (BRepBuilderAPI_MakeShape& MakeShape, const TopoDS_Shape& ShapeIn, const TopAbs_ShapeEnum ShapeType, TNaming_Builder& DelBuider); |
89 | |
90 | Standard_EXPORT static void LoadDangleShapes (const TopoDS_Shape& theShape, const TDF_Label& theLabelGenerator); |
91 | |
92 | Standard_EXPORT static void LoadDangleShapes (const TopoDS_Shape& theShape, const TopoDS_Shape& ignoredShape, const TDF_Label& theLabelGenerator); |
93 | |
94 | //! Returns dangle sub shapes Generator - Dangle. |
95 | Standard_EXPORT static Standard_Boolean GetDangleShapes (const TopoDS_Shape& ShapeIn, const TopAbs_ShapeEnum GeneratedFrom, TopTools_DataMapOfShapeShape& Dangles); |
96 | |
97 | //! Returns dangle sub shapes. |
98 | Standard_EXPORT static Standard_Boolean GetDangleShapes (const TopoDS_Shape& ShapeIn, const TopAbs_ShapeEnum GeneratedFrom, TopTools_MapOfShape& Dangles); |
99 | |
100 | Standard_EXPORT static Standard_Boolean IsDangle (const TopoDS_Shape& theDangle, const TopoDS_Shape& theShape); |
101 | |
102 | |
103 | |
104 | |
105 | protected: |
106 | |
107 | |
108 | |
109 | |
110 | |
111 | private: |
112 | |
113 | |
114 | |
115 | |
116 | |
117 | }; |
118 | |
119 | |
120 | |
121 | |
122 | |
123 | |
124 | |
125 | #endif // _QANewBRepNaming_Loader_HeaderFile |