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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _ShapeAnalysis_ShapeContents_HeaderFile
18 #define _ShapeAnalysis_ShapeContents_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Integer.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <TopTools_HSequenceOfShape.hxx>
30 //! Dumps shape contents
31 class ShapeAnalysis_ShapeContents
38 //! Initialize fields and call ClearFlags()
39 Standard_EXPORT ShapeAnalysis_ShapeContents();
41 //! Clears all accumulated statictics
42 Standard_EXPORT void Clear();
45 Standard_EXPORT void ClearFlags();
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);
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();
55 //! Returns (modifiable) the flag which defines whether to store faces
56 //! on indirect surfaces
57 Standard_Boolean& ModifyIndirectMode();
59 //! Returns (modifiable) the flag which defines whether to store faces
60 //! on offset surfaces.
61 Standard_Boolean& ModifyOffestSurfaceMode();
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();
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();
71 //! Returns (modifiable) the flag which defines whether to store faces
72 //! with edges if its pcurves are trimmed curves
73 Standard_Boolean& ModifyTrimmed2dMode();
75 Standard_Integer NbSolids() const;
77 Standard_Integer NbShells() const;
79 Standard_Integer NbFaces() const;
81 Standard_Integer NbWires() const;
83 Standard_Integer NbEdges() const;
85 Standard_Integer NbVertices() const;
87 Standard_Integer NbSolidsWithVoids() const;
89 Standard_Integer NbBigSplines() const;
91 Standard_Integer NbC0Surfaces() const;
93 Standard_Integer NbC0Curves() const;
95 Standard_Integer NbOffsetSurf() const;
97 Standard_Integer NbIndirectSurf() const;
99 Standard_Integer NbOffsetCurves() const;
101 Standard_Integer NbTrimmedCurve2d() const;
103 Standard_Integer NbTrimmedCurve3d() const;
105 Standard_Integer NbBSplibeSurf() const;
107 Standard_Integer NbBezierSurf() const;
109 Standard_Integer NbTrimSurf() const;
111 Standard_Integer NbWireWitnSeam() const;
113 Standard_Integer NbWireWithSevSeams() const;
115 Standard_Integer NbFaceWithSevWires() const;
117 Standard_Integer NbNoPCurve() const;
119 Standard_Integer NbFreeFaces() const;
121 Standard_Integer NbFreeWires() const;
123 Standard_Integer NbFreeEdges() const;
125 Standard_Integer NbSharedSolids() const;
127 Standard_Integer NbSharedShells() const;
129 Standard_Integer NbSharedFaces() const;
131 Standard_Integer NbSharedWires() const;
133 Standard_Integer NbSharedFreeWires() const;
135 Standard_Integer NbSharedFreeEdges() const;
137 Standard_Integer NbSharedEdges() const;
139 Standard_Integer NbSharedVertices() const;
141 Handle(TopTools_HSequenceOfShape) BigSplineSec() const;
143 Handle(TopTools_HSequenceOfShape) IndirectSec() const;
145 Handle(TopTools_HSequenceOfShape) OffsetSurfaceSec() const;
147 Handle(TopTools_HSequenceOfShape) Trimmed3dSec() const;
149 Handle(TopTools_HSequenceOfShape) OffsetCurveSec() const;
151 Handle(TopTools_HSequenceOfShape) Trimmed2dSec() const;
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;
216 #include <ShapeAnalysis_ShapeContents.lxx>
222 #endif // _ShapeAnalysis_ShapeContents_HeaderFile