42cf5bc1 |
1 | // Created on: 1999-02-25 |
2 | // Created by: Pavel DURANDIN |
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 _ShapeAnalysis_ShapeContents_HeaderFile |
18 | #define _ShapeAnalysis_ShapeContents_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Integer.hxx> |
25 | #include <Standard_Boolean.hxx> |
26 | #include <TopTools_HSequenceOfShape.hxx> |
27 | class TopoDS_Shape; |
28 | |
29 | |
30 | //! Dumps shape contents |
31 | class ShapeAnalysis_ShapeContents |
32 | { |
33 | public: |
34 | |
35 | DEFINE_STANDARD_ALLOC |
36 | |
37 | |
38 | //! Initialize fields and call ClearFlags() |
39 | Standard_EXPORT ShapeAnalysis_ShapeContents(); |
40 | |
41 | //! Clears all accumulated statictics |
42 | Standard_EXPORT void Clear(); |
43 | |
44 | //! Clears all flags |
45 | Standard_EXPORT void ClearFlags(); |
46 | |
47 | //! Counts quantities of sun-shapes in shape and |
48 | //! stores sub-shapes according to flags |
49 | Standard_EXPORT void Perform (const TopoDS_Shape& shape); |
50 | |
51 | //! Returns (modifiable) the flag which defines whether to store faces |
52 | //! with edges if its 3D curves has more than 8192 poles. |
53 | Standard_Boolean& ModifyBigSplineMode(); |
54 | |
55 | //! Returns (modifiable) the flag which defines whether to store faces |
56 | //! on indirect surfaces |
57 | Standard_Boolean& ModifyIndirectMode(); |
58 | |
59 | //! Returns (modifiable) the flag which defines whether to store faces |
60 | //! on offset surfaces. |
61 | Standard_Boolean& ModifyOffestSurfaceMode(); |
62 | |
63 | //! Returns (modifiable) the flag which defines whether to store faces |
64 | //! with edges if ist 3D curves are trimmed curves |
65 | Standard_Boolean& ModifyTrimmed3dMode(); |
66 | |
67 | //! Returns (modifiable) the flag which defines whether to store faces |
68 | //! with edges if its 3D curves and pcurves are offest curves |
69 | Standard_Boolean& ModifyOffsetCurveMode(); |
70 | |
71 | //! Returns (modifiable) the flag which defines whether to store faces |
72 | //! with edges if its pcurves are trimmed curves |
73 | Standard_Boolean& ModifyTrimmed2dMode(); |
74 | |
75 | Standard_Integer NbSolids() const; |
76 | |
77 | Standard_Integer NbShells() const; |
78 | |
79 | Standard_Integer NbFaces() const; |
80 | |
81 | Standard_Integer NbWires() const; |
82 | |
83 | Standard_Integer NbEdges() const; |
84 | |
85 | Standard_Integer NbVertices() const; |
86 | |
87 | Standard_Integer NbSolidsWithVoids() const; |
88 | |
89 | Standard_Integer NbBigSplines() const; |
90 | |
91 | Standard_Integer NbC0Surfaces() const; |
92 | |
93 | Standard_Integer NbC0Curves() const; |
94 | |
95 | Standard_Integer NbOffsetSurf() const; |
96 | |
97 | Standard_Integer NbIndirectSurf() const; |
98 | |
99 | Standard_Integer NbOffsetCurves() const; |
100 | |
101 | Standard_Integer NbTrimmedCurve2d() const; |
102 | |
103 | Standard_Integer NbTrimmedCurve3d() const; |
104 | |
105 | Standard_Integer NbBSplibeSurf() const; |
106 | |
107 | Standard_Integer NbBezierSurf() const; |
108 | |
109 | Standard_Integer NbTrimSurf() const; |
110 | |
111 | Standard_Integer NbWireWitnSeam() const; |
112 | |
113 | Standard_Integer NbWireWithSevSeams() const; |
114 | |
115 | Standard_Integer NbFaceWithSevWires() const; |
116 | |
117 | Standard_Integer NbNoPCurve() const; |
118 | |
119 | Standard_Integer NbFreeFaces() const; |
120 | |
121 | Standard_Integer NbFreeWires() const; |
122 | |
123 | Standard_Integer NbFreeEdges() const; |
124 | |
125 | Standard_Integer NbSharedSolids() const; |
126 | |
127 | Standard_Integer NbSharedShells() const; |
128 | |
129 | Standard_Integer NbSharedFaces() const; |
130 | |
131 | Standard_Integer NbSharedWires() const; |
132 | |
133 | Standard_Integer NbSharedFreeWires() const; |
134 | |
135 | Standard_Integer NbSharedFreeEdges() const; |
136 | |
137 | Standard_Integer NbSharedEdges() const; |
138 | |
139 | Standard_Integer NbSharedVertices() const; |
140 | |
141 | Handle(TopTools_HSequenceOfShape) BigSplineSec() const; |
142 | |
143 | Handle(TopTools_HSequenceOfShape) IndirectSec() const; |
144 | |
145 | Handle(TopTools_HSequenceOfShape) OffsetSurfaceSec() const; |
146 | |
147 | Handle(TopTools_HSequenceOfShape) Trimmed3dSec() const; |
148 | |
149 | Handle(TopTools_HSequenceOfShape) OffsetCurveSec() const; |
150 | |
151 | Handle(TopTools_HSequenceOfShape) Trimmed2dSec() const; |
152 | |
153 | |
154 | |
155 | |
156 | protected: |
157 | |
158 | |
159 | |
160 | |
161 | |
162 | private: |
163 | |
164 | |
165 | |
166 | Standard_Integer myNbSolids; |
167 | Standard_Integer myNbShells; |
168 | Standard_Integer myNbFaces; |
169 | Standard_Integer myNbWires; |
170 | Standard_Integer myNbEdges; |
171 | Standard_Integer myNbVertices; |
172 | Standard_Integer myNbSolidsWithVoids; |
173 | Standard_Integer myNbBigSplines; |
174 | Standard_Integer myNbC0Surfaces; |
175 | Standard_Integer myNbC0Curves; |
176 | Standard_Integer myNbOffsetSurf; |
177 | Standard_Integer myNbIndirectSurf; |
178 | Standard_Integer myNbOffsetCurves; |
179 | Standard_Integer myNbTrimmedCurve2d; |
180 | Standard_Integer myNbTrimmedCurve3d; |
181 | Standard_Integer myNbBSplibeSurf; |
182 | Standard_Integer myNbBezierSurf; |
183 | Standard_Integer myNbTrimSurf; |
184 | Standard_Integer myNbWireWitnSeam; |
185 | Standard_Integer myNbWireWithSevSeams; |
186 | Standard_Integer myNbFaceWithSevWires; |
187 | Standard_Integer myNbNoPCurve; |
188 | Standard_Integer myNbFreeFaces; |
189 | Standard_Integer myNbFreeWires; |
190 | Standard_Integer myNbFreeEdges; |
191 | Standard_Integer myNbSharedSolids; |
192 | Standard_Integer myNbSharedShells; |
193 | Standard_Integer myNbSharedFaces; |
194 | Standard_Integer myNbSharedWires; |
195 | Standard_Integer myNbSharedFreeWires; |
196 | Standard_Integer myNbSharedFreeEdges; |
197 | Standard_Integer myNbSharedEdges; |
198 | Standard_Integer myNbSharedVertices; |
199 | Standard_Boolean myBigSplineMode; |
200 | Standard_Boolean myIndirectMode; |
201 | Standard_Boolean myOffestSurfaceMode; |
202 | Standard_Boolean myTrimmed3dMode; |
203 | Standard_Boolean myOffsetCurveMode; |
204 | Standard_Boolean myTrimmed2dMode; |
205 | Handle(TopTools_HSequenceOfShape) myBigSplineSec; |
206 | Handle(TopTools_HSequenceOfShape) myIndirectSec; |
207 | Handle(TopTools_HSequenceOfShape) myOffsetSurfaceSec; |
208 | Handle(TopTools_HSequenceOfShape) myTrimmed3dSec; |
209 | Handle(TopTools_HSequenceOfShape) myOffsetCurveSec; |
210 | Handle(TopTools_HSequenceOfShape) myTrimmed2dSec; |
211 | |
212 | |
213 | }; |
214 | |
215 | |
216 | #include <ShapeAnalysis_ShapeContents.lxx> |
217 | |
218 | |
219 | |
220 | |
221 | |
222 | #endif // _ShapeAnalysis_ShapeContents_HeaderFile |