Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:54

0001 // Created on: 1999-02-25
0002 // Created by: Pavel DURANDIN
0003 // Copyright (c) 1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _ShapeAnalysis_ShapeContents_HeaderFile
0018 #define _ShapeAnalysis_ShapeContents_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Integer.hxx>
0025 #include <TopTools_HSequenceOfShape.hxx>
0026 class TopoDS_Shape;
0027 
0028 
0029 //! Dumps shape contents
0030 class ShapeAnalysis_ShapeContents 
0031 {
0032 public:
0033 
0034   DEFINE_STANDARD_ALLOC
0035 
0036   
0037   //! Initialize fields and call ClearFlags()
0038   Standard_EXPORT ShapeAnalysis_ShapeContents();
0039   
0040   //! Clears all accumulated statistics
0041   Standard_EXPORT void Clear();
0042   
0043   //! Clears all flags
0044   Standard_EXPORT void ClearFlags();
0045   
0046   //! Counts quantities of sun-shapes in shape and
0047   //! stores sub-shapes according to flags
0048   Standard_EXPORT void Perform (const TopoDS_Shape& shape);
0049 
0050   //! Returns (modifiable) the flag which defines whether to store faces
0051   //! with edges if its 3D curves has more than 8192 poles.
0052   Standard_Boolean& ModifyBigSplineMode() { return myBigSplineMode; }
0053 
0054   //! Returns (modifiable) the flag which defines whether to store faces on indirect surfaces.
0055   Standard_Boolean& ModifyIndirectMode() { return myIndirectMode; }
0056 
0057   //! Returns (modifiable) the flag which defines whether to store faces on offset surfaces.
0058   Standard_Boolean& ModifyOffsetSurfaceMode() { return myOffsetSurfaceMode; }
0059 
0060   //! Returns (modifiable) the flag which defines whether to store faces
0061   //! with edges if its 3D curves are trimmed curves
0062   Standard_Boolean& ModifyTrimmed3dMode() { return myTrimmed3dMode; }
0063 
0064   //! Returns (modifiable) the flag which defines whether to store faces
0065   //! with edges if its 3D curves and pcurves are offset curves
0066   Standard_Boolean& ModifyOffsetCurveMode() { return myOffsetCurveMode; }
0067 
0068   //! Returns (modifiable) the flag which defines whether to store faces
0069   //! with edges if its  pcurves are trimmed curves
0070   Standard_Boolean& ModifyTrimmed2dMode() { return myTrimmed2dMode; }
0071 
0072   Standard_Integer NbSolids() const { return myNbSolids; }
0073 
0074   Standard_Integer NbShells() const { return myNbShells; }
0075 
0076   Standard_Integer NbFaces() const { return myNbFaces; }
0077 
0078   Standard_Integer NbWires() const { return myNbWires; }
0079 
0080   Standard_Integer NbEdges() const { return myNbEdges; }
0081 
0082   Standard_Integer NbVertices() const { return myNbVertices; }
0083 
0084   Standard_Integer NbSolidsWithVoids() const { return myNbSolidsWithVoids; }
0085 
0086   Standard_Integer NbBigSplines() const { return myNbBigSplines; }
0087 
0088   Standard_Integer NbC0Surfaces() const { return myNbC0Surfaces; }
0089 
0090   Standard_Integer NbC0Curves() const { return myNbC0Curves; }
0091 
0092   Standard_Integer NbOffsetSurf() const { return myNbOffsetSurf; }
0093 
0094   Standard_Integer NbIndirectSurf() const { return myNbIndirectSurf; }
0095 
0096   Standard_Integer NbOffsetCurves() const { return myNbOffsetCurves; }
0097 
0098   Standard_Integer NbTrimmedCurve2d() const { return myNbTrimmedCurve2d; }
0099 
0100   Standard_Integer NbTrimmedCurve3d() const { return myNbTrimmedCurve3d; }
0101 
0102   Standard_Integer NbBSplibeSurf() const { return myNbBSplibeSurf; }
0103 
0104   Standard_Integer NbBezierSurf() const { return myNbBezierSurf; }
0105 
0106   Standard_Integer NbTrimSurf() const { return myNbTrimSurf; }
0107 
0108   Standard_Integer NbWireWitnSeam() const { return myNbWireWitnSeam; }
0109 
0110   Standard_Integer NbWireWithSevSeams() const { return myNbWireWithSevSeams; }
0111 
0112   Standard_Integer NbFaceWithSevWires() const { return myNbFaceWithSevWires; }
0113 
0114   Standard_Integer NbNoPCurve() const { return myNbNoPCurve; }
0115 
0116   Standard_Integer NbFreeFaces() const { return myNbFreeFaces; }
0117 
0118   Standard_Integer NbFreeWires() const { return myNbFreeWires; }
0119 
0120   Standard_Integer NbFreeEdges() const { return myNbFreeEdges; }
0121 
0122   Standard_Integer NbSharedSolids() const { return myNbSharedSolids; }
0123 
0124   Standard_Integer NbSharedShells() const { return myNbSharedShells; }
0125 
0126   Standard_Integer NbSharedFaces() const { return myNbSharedFaces; }
0127 
0128   Standard_Integer NbSharedWires() const { return myNbSharedWires; }
0129 
0130   Standard_Integer NbSharedFreeWires() const { return myNbSharedFreeWires; }
0131 
0132   Standard_Integer NbSharedFreeEdges() const { return myNbSharedFreeEdges; }
0133 
0134   Standard_Integer NbSharedEdges() const { return myNbSharedEdges; }
0135 
0136   Standard_Integer NbSharedVertices() const { return myNbSharedVertices; }
0137 
0138   const Handle(TopTools_HSequenceOfShape)& BigSplineSec() const { return myBigSplineSec; }
0139 
0140   const Handle(TopTools_HSequenceOfShape)& IndirectSec() const { return myIndirectSec; }
0141 
0142   const Handle(TopTools_HSequenceOfShape)& OffsetSurfaceSec() const { return myOffsetSurfaceSec; }
0143 
0144   const Handle(TopTools_HSequenceOfShape)& Trimmed3dSec() const { return myTrimmed3dSec; }
0145 
0146   const Handle(TopTools_HSequenceOfShape)& OffsetCurveSec() const { return myOffsetCurveSec; }
0147 
0148   const Handle(TopTools_HSequenceOfShape)& Trimmed2dSec() const { return myTrimmed2dSec; }
0149   
0150 public:
0151 
0152   Standard_DEPRECATED("ModifyOffsetSurfaceMode() should be used instead")
0153   Standard_Boolean& ModifyOffestSurfaceMode() { return myOffsetSurfaceMode; }
0154 
0155 private:
0156 
0157   Standard_Integer myNbSolids;
0158   Standard_Integer myNbShells;
0159   Standard_Integer myNbFaces;
0160   Standard_Integer myNbWires;
0161   Standard_Integer myNbEdges;
0162   Standard_Integer myNbVertices;
0163   Standard_Integer myNbSolidsWithVoids;
0164   Standard_Integer myNbBigSplines;
0165   Standard_Integer myNbC0Surfaces;
0166   Standard_Integer myNbC0Curves;
0167   Standard_Integer myNbOffsetSurf;
0168   Standard_Integer myNbIndirectSurf;
0169   Standard_Integer myNbOffsetCurves;
0170   Standard_Integer myNbTrimmedCurve2d;
0171   Standard_Integer myNbTrimmedCurve3d;
0172   Standard_Integer myNbBSplibeSurf;
0173   Standard_Integer myNbBezierSurf;
0174   Standard_Integer myNbTrimSurf;
0175   Standard_Integer myNbWireWitnSeam;
0176   Standard_Integer myNbWireWithSevSeams;
0177   Standard_Integer myNbFaceWithSevWires;
0178   Standard_Integer myNbNoPCurve;
0179   Standard_Integer myNbFreeFaces;
0180   Standard_Integer myNbFreeWires;
0181   Standard_Integer myNbFreeEdges;
0182   Standard_Integer myNbSharedSolids;
0183   Standard_Integer myNbSharedShells;
0184   Standard_Integer myNbSharedFaces;
0185   Standard_Integer myNbSharedWires;
0186   Standard_Integer myNbSharedFreeWires;
0187   Standard_Integer myNbSharedFreeEdges;
0188   Standard_Integer myNbSharedEdges;
0189   Standard_Integer myNbSharedVertices;
0190   Standard_Boolean myBigSplineMode;
0191   Standard_Boolean myIndirectMode;
0192   Standard_Boolean myOffsetSurfaceMode;
0193   Standard_Boolean myTrimmed3dMode;
0194   Standard_Boolean myOffsetCurveMode;
0195   Standard_Boolean myTrimmed2dMode;
0196   Handle(TopTools_HSequenceOfShape) myBigSplineSec;
0197   Handle(TopTools_HSequenceOfShape) myIndirectSec;
0198   Handle(TopTools_HSequenceOfShape) myOffsetSurfaceSec;
0199   Handle(TopTools_HSequenceOfShape) myTrimmed3dSec;
0200   Handle(TopTools_HSequenceOfShape) myOffsetCurveSec;
0201   Handle(TopTools_HSequenceOfShape) myTrimmed2dSec;
0202 
0203 };
0204 
0205 #endif // _ShapeAnalysis_ShapeContents_HeaderFile