File indexing completed on 2025-01-18 10:03:14
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _BRepMesh_FaceChecker_HeaderFile
0017 #define _BRepMesh_FaceChecker_HeaderFile
0018
0019 #include <IMeshTools_Parameters.hxx>
0020 #include <Standard_Transient.hxx>
0021 #include <IMeshData_Face.hxx>
0022 #include <Standard_Type.hxx>
0023 #include <NCollection_Shared.hxx>
0024
0025
0026
0027
0028
0029 class BRepMesh_FaceChecker : public Standard_Transient
0030 {
0031 public:
0032
0033
0034 struct Segment
0035 {
0036 IMeshData::IEdgePtr EdgePtr;
0037 gp_Pnt2d* Point1;
0038 gp_Pnt2d* Point2;
0039
0040 Segment()
0041 : EdgePtr(NULL),
0042 Point1(NULL),
0043 Point2(NULL)
0044 {
0045 }
0046
0047 Segment(const IMeshData::IEdgePtr& theEdgePtr,
0048 gp_Pnt2d* thePoint1,
0049 gp_Pnt2d* thePoint2)
0050 : EdgePtr(theEdgePtr)
0051 , Point1(thePoint1)
0052 , Point2(thePoint2)
0053 {
0054 }
0055 };
0056
0057 typedef NCollection_Shared<NCollection_Vector<Segment> > Segments;
0058 typedef NCollection_Shared<NCollection_Array1<Handle(Segments)> > ArrayOfSegments;
0059 typedef NCollection_Shared<NCollection_Array1<Handle(IMeshData::BndBox2dTree)> > ArrayOfBndBoxTree;
0060 typedef NCollection_Shared<NCollection_Array1<Handle(IMeshData::MapOfIEdgePtr)> > ArrayOfMapOfIEdgePtr;
0061
0062
0063
0064 Standard_EXPORT BRepMesh_FaceChecker(const IMeshData::IFaceHandle& theFace,
0065 const IMeshTools_Parameters& theParameters);
0066
0067
0068 Standard_EXPORT virtual ~BRepMesh_FaceChecker();
0069
0070
0071
0072 Standard_EXPORT Standard_Boolean Perform();
0073
0074
0075 const Handle(IMeshData::MapOfIEdgePtr)& GetIntersectingEdges() const
0076 {
0077 return myIntersectingEdges;
0078 }
0079
0080
0081 void operator()(const Standard_Integer theWireIndex) const
0082 {
0083 perform(theWireIndex);
0084 }
0085
0086 DEFINE_STANDARD_RTTIEXT(BRepMesh_FaceChecker, Standard_Transient)
0087
0088 private:
0089
0090
0091 Standard_Boolean isParallel() const
0092 {
0093 return (myParameters.InParallel && myDFace->WiresNb() > 1);
0094 }
0095
0096
0097 void collectSegments();
0098
0099
0100 void collectResult();
0101
0102
0103 void perform(const Standard_Integer theWireIndex) const;
0104
0105 private:
0106
0107 BRepMesh_FaceChecker (const BRepMesh_FaceChecker& theOther);
0108
0109 void operator=(const BRepMesh_FaceChecker& theOther);
0110
0111 private:
0112
0113 IMeshData::IFaceHandle myDFace;
0114 const IMeshTools_Parameters& myParameters;
0115
0116 Handle(ArrayOfSegments) myWiresSegments;
0117 Handle(ArrayOfBndBoxTree) myWiresBndBoxTree;
0118 Handle(ArrayOfMapOfIEdgePtr) myWiresIntersectingEdges;
0119 Handle(IMeshData::MapOfIEdgePtr) myIntersectingEdges;
0120
0121 };
0122
0123 #endif