File indexing completed on 2025-01-18 10:03:10
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 <Bnd_Box.hxx>
0021 #include <BRepAdaptor_Surface.hxx>
0022 #include <BRepClass3d_BndBoxTree.hxx>
0023 #include <BRepClass3d_MapOfInter.hxx>
0024 #include <TopAbs_State.hxx>
0025 #include <TopExp_Explorer.hxx>
0026 #include <TopoDS_Shape.hxx>
0027 #include <TopTools_IndexedMapOfShape.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
0042 DEFINE_STANDARD_ALLOC
0043
0044
0045 Standard_EXPORT BRepClass3d_SolidExplorer();
0046
0047 Standard_EXPORT BRepClass3d_SolidExplorer(const TopoDS_Shape& S);
0048
0049 Standard_EXPORT virtual ~BRepClass3d_SolidExplorer();
0050
0051 Standard_EXPORT void InitShape (const TopoDS_Shape& S);
0052
0053
0054 Standard_EXPORT virtual Standard_Boolean Reject (const gp_Pnt& P) const;
0055
0056
0057
0058
0059 Standard_EXPORT static Standard_Boolean FindAPointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& Param);
0060
0061 Standard_EXPORT static Standard_Boolean FindAPointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param);
0062
0063 Standard_EXPORT static Standard_Boolean FindAPointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, gp_Vec& theVecD1U, gp_Vec& theVecD1V);
0064
0065 Standard_EXPORT static Standard_Boolean FindAPointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v);
0066
0067 Standard_EXPORT static Standard_Boolean FindAPointInTheFace (const TopoDS_Face& F, gp_Pnt& P);
0068
0069 Standard_EXPORT static Standard_Boolean FindAPointInTheFace (const TopoDS_Face& F, Standard_Real& u, Standard_Real& v);
0070
0071 Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index) const;
0072
0073 Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index, const Handle(BRepAdaptor_Surface)& surf, const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2) const;
0074
0075
0076
0077 Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index, const Handle(BRepAdaptor_Surface)& surf, const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec& theVecD1U, gp_Vec& theVecD1V) const;
0078
0079
0080 Standard_EXPORT void InitShell();
0081
0082
0083 Standard_EXPORT Standard_Boolean MoreShell() const;
0084
0085
0086 Standard_EXPORT void NextShell();
0087
0088
0089 Standard_EXPORT TopoDS_Shell CurrentShell() const;
0090
0091
0092 Standard_EXPORT virtual Standard_Boolean RejectShell (const gp_Lin& L) const;
0093
0094
0095 Standard_EXPORT void InitFace();
0096
0097
0098 Standard_EXPORT Standard_Boolean MoreFace() const;
0099
0100
0101 Standard_EXPORT void NextFace();
0102
0103
0104 Standard_EXPORT TopoDS_Face CurrentFace() const;
0105
0106
0107 Standard_EXPORT virtual Standard_Boolean RejectFace (const gp_Lin& L) const;
0108
0109
0110
0111
0112 Standard_EXPORT Standard_Integer Segment (const gp_Pnt& P, gp_Lin& L, Standard_Real& Par);
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122 Standard_EXPORT Standard_Integer OtherSegment (const gp_Pnt& P, gp_Lin& L, Standard_Real& Par);
0123
0124
0125
0126 Standard_EXPORT Standard_Integer GetFaceSegmentIndex() const;
0127
0128 Standard_EXPORT virtual void DumpSegment (const gp_Pnt& P, const gp_Lin& L, const Standard_Real Par, const TopAbs_State S) const;
0129
0130 Standard_EXPORT const Bnd_Box& Box() const;
0131
0132 Standard_EXPORT const TopoDS_Shape& GetShape() const;
0133
0134 Standard_EXPORT IntCurvesFace_Intersector& Intersector (const TopoDS_Face& F) const;
0135
0136
0137 const BRepClass3d_BndBoxTree& GetTree () {return myTree;}
0138
0139 const TopTools_IndexedMapOfShape& GetMapEV () {return myMapEV;}
0140
0141 Standard_EXPORT void Destroy();
0142
0143 private:
0144
0145 Standard_EXPORT BRepClass3d_SolidExplorer(const BRepClass3d_SolidExplorer& Oth);
0146
0147 protected:
0148
0149 Standard_EXPORT TopAbs_State ClassifyUVPoint
0150 (const IntCurvesFace_Intersector& theIntersector,
0151 const Handle(BRepAdaptor_Surface)& theSurf,
0152 const gp_Pnt2d& theP2d) const;
0153
0154 private:
0155
0156
0157
0158 Bnd_Box myBox;
0159 TopoDS_Shape myShape;
0160 Standard_Boolean myReject;
0161 Standard_Integer myFirstFace;
0162 Standard_Real myParamOnEdge;
0163 TopExp_Explorer myShellExplorer;
0164 TopExp_Explorer myFaceExplorer;
0165 BRepClass3d_MapOfInter myMapOfInter;
0166 BRepClass3d_BndBoxTree myTree;
0167 TopTools_IndexedMapOfShape myMapEV;
0168
0169
0170 };
0171
0172
0173
0174
0175
0176
0177
0178 #endif