File indexing completed on 2026-09-17 09:19:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _BRepClass3d_SolidExplorer_HeaderFile
0018 #define _BRepClass3d_SolidExplorer_HeaderFile
0019
0020 #include <BRepAdaptor_Surface.hxx>
0021 #include <BRepClass3d_BndBoxTree.hxx>
0022 #include <TopoDS_Shape.hxx>
0023 #include <TopTools_ShapeMapHasher.hxx>
0024 #include <NCollection_DataMap.hxx>
0025 #include <TopAbs_State.hxx>
0026 #include <TopExp_Explorer.hxx>
0027 #include <NCollection_IndexedMap.hxx>
0028
0029 class gp_Pnt;
0030 class TopoDS_Face;
0031 class gp_Vec;
0032 class TopoDS_Shell;
0033 class gp_Lin;
0034 class IntCurvesFace_Intersector;
0035
0036
0037
0038 class BRepClass3d_SolidExplorer
0039 {
0040 public:
0041 DEFINE_STANDARD_ALLOC
0042
0043 Standard_EXPORT BRepClass3d_SolidExplorer();
0044
0045 Standard_EXPORT BRepClass3d_SolidExplorer(const TopoDS_Shape& S);
0046
0047 Standard_EXPORT virtual ~BRepClass3d_SolidExplorer();
0048
0049 Standard_EXPORT void InitShape(const TopoDS_Shape& S);
0050
0051
0052 Standard_EXPORT virtual bool Reject(const gp_Pnt& P) const;
0053
0054
0055
0056
0057 Standard_EXPORT static bool FindAPointInTheFace(const TopoDS_Face& F, gp_Pnt& P, double& Param);
0058
0059 Standard_EXPORT static bool FindAPointInTheFace(const TopoDS_Face& F,
0060 gp_Pnt& P,
0061 double& u,
0062 double& v,
0063 double& Param);
0064
0065 Standard_EXPORT static bool FindAPointInTheFace(const TopoDS_Face& F,
0066 gp_Pnt& P,
0067 double& u,
0068 double& v,
0069 double& Param,
0070 gp_Vec& theVecD1U,
0071 gp_Vec& theVecD1V);
0072
0073 Standard_EXPORT static bool FindAPointInTheFace(const TopoDS_Face& F,
0074 gp_Pnt& P,
0075 double& u,
0076 double& v);
0077
0078 Standard_EXPORT static bool FindAPointInTheFace(const TopoDS_Face& F, gp_Pnt& P);
0079
0080 Standard_EXPORT static bool FindAPointInTheFace(const TopoDS_Face& F, double& u, double& v);
0081
0082 Standard_EXPORT bool PointInTheFace(const TopoDS_Face& F,
0083 gp_Pnt& P,
0084 double& u,
0085 double& v,
0086 double& Param,
0087 int& Index) const;
0088
0089 Standard_EXPORT bool PointInTheFace(const TopoDS_Face& F,
0090 gp_Pnt& P,
0091 double& u,
0092 double& v,
0093 double& Param,
0094 int& Index,
0095 const occ::handle<BRepAdaptor_Surface>& surf,
0096 const double u1,
0097 const double v1,
0098 const double u2,
0099 const double v2) const;
0100
0101
0102
0103 Standard_EXPORT bool PointInTheFace(const TopoDS_Face& F,
0104 gp_Pnt& P,
0105 double& u,
0106 double& v,
0107 double& Param,
0108 int& Index,
0109 const occ::handle<BRepAdaptor_Surface>& surf,
0110 const double u1,
0111 const double v1,
0112 const double u2,
0113 const double v2,
0114 gp_Vec& theVecD1U,
0115 gp_Vec& theVecD1V) const;
0116
0117
0118 Standard_EXPORT void InitShell();
0119
0120
0121 Standard_EXPORT bool MoreShell() const;
0122
0123
0124 Standard_EXPORT void NextShell();
0125
0126
0127 Standard_EXPORT TopoDS_Shell CurrentShell() const;
0128
0129
0130 Standard_EXPORT virtual bool RejectShell(const gp_Lin& L) const;
0131
0132
0133 Standard_EXPORT void InitFace();
0134
0135
0136 Standard_EXPORT bool MoreFace() const;
0137
0138
0139 Standard_EXPORT void NextFace();
0140
0141
0142 Standard_EXPORT TopoDS_Face CurrentFace() const;
0143
0144
0145 Standard_EXPORT virtual bool RejectFace(const gp_Lin& L) const;
0146
0147
0148
0149
0150 Standard_EXPORT int Segment(const gp_Pnt& P, gp_Lin& L, double& Par);
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160 Standard_EXPORT int OtherSegment(const gp_Pnt& P, gp_Lin& L, double& Par);
0161
0162
0163
0164 Standard_EXPORT int GetFaceSegmentIndex() const;
0165
0166 Standard_EXPORT virtual void DumpSegment(const gp_Pnt& P,
0167 const gp_Lin& L,
0168 const double Par,
0169 const TopAbs_State S) const;
0170
0171 Standard_EXPORT const TopoDS_Shape& GetShape() const;
0172
0173 Standard_EXPORT IntCurvesFace_Intersector& Intersector(const TopoDS_Face& F) const;
0174
0175
0176 const NCollection_UBTree<int, Bnd_Box>& GetTree() { return myTree; }
0177
0178
0179 const NCollection_IndexedMap<TopoDS_Shape, TopTools_ShapeMapHasher>& GetMapEV()
0180 {
0181 return myMapEV;
0182 }
0183
0184 Standard_EXPORT void Destroy();
0185
0186 private:
0187 BRepClass3d_SolidExplorer(const BRepClass3d_SolidExplorer& Oth) = delete;
0188
0189 protected:
0190 Standard_EXPORT TopAbs_State ClassifyUVPoint(const IntCurvesFace_Intersector& theIntersector,
0191 const occ::handle<BRepAdaptor_Surface>& theSurf,
0192 const gp_Pnt2d& theP2d) const;
0193
0194 private:
0195 TopoDS_Shape myShape;
0196 bool myReject;
0197 int myFirstFace;
0198 double myParamOnEdge;
0199 TopExp_Explorer myShellExplorer;
0200 TopExp_Explorer myFaceExplorer;
0201 NCollection_DataMap<TopoDS_Shape, void*, TopTools_ShapeMapHasher> myMapOfInter;
0202 NCollection_UBTree<int, Bnd_Box> myTree;
0203 NCollection_IndexedMap<TopoDS_Shape, TopTools_ShapeMapHasher> myMapEV;
0204 };
0205
0206 #endif