File indexing completed on 2026-09-14 09:15:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _IntCurvesFace_ShapeIntersector_HeaderFile
0018 #define _IntCurvesFace_ShapeIntersector_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <Standard_Boolean.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <NCollection_Array1.hxx>
0027 #include <NCollection_Sequence.hxx>
0028 #include <Standard_Real.hxx>
0029 #include <IntCurveSurface_TransitionOnCurve.hxx>
0030 #include <IntCurvesFace_Intersector.hxx>
0031 #include <TopAbs_State.hxx>
0032
0033 class Adaptor3d_Curve;
0034 class TopoDS_Shape;
0035 class gp_Lin;
0036 class gp_Pnt;
0037 class TopoDS_Face;
0038
0039 class IntCurvesFace_ShapeIntersector
0040 {
0041 public:
0042 DEFINE_STANDARD_ALLOC
0043
0044 Standard_EXPORT IntCurvesFace_ShapeIntersector();
0045
0046 Standard_EXPORT void Load(const TopoDS_Shape& Sh, const double Tol);
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056 Standard_EXPORT void Perform(const gp_Lin& L, const double PInf, const double PSup);
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066 Standard_EXPORT void PerformNearest(const gp_Lin& L, const double PInf, const double PSup);
0067
0068
0069
0070 Standard_EXPORT void Perform(const occ::handle<Adaptor3d_Curve>& HCu,
0071 const double PInf,
0072 const double PSup);
0073
0074
0075 bool IsDone() const { return myIsDone; }
0076
0077
0078 int NbPnt() const { return myIndexPt.Length(); }
0079
0080
0081
0082 double UParameter(const int I) const
0083 {
0084 occ::handle<IntCurvesFace_Intersector> anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I)));
0085 return anIntAdaptor->UParameter(myIndexIntPnt(myIndexPt(I)));
0086 }
0087
0088
0089
0090 double VParameter(const int I) const
0091 {
0092 occ::handle<IntCurvesFace_Intersector> anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I)));
0093 return anIntAdaptor->VParameter(myIndexIntPnt(myIndexPt(I)));
0094 }
0095
0096
0097
0098 double WParameter(const int I) const
0099 {
0100 occ::handle<IntCurvesFace_Intersector> anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I)));
0101 return anIntAdaptor->WParameter(myIndexIntPnt(myIndexPt(I)));
0102 }
0103
0104
0105
0106 const gp_Pnt& Pnt(const int I) const
0107 {
0108 occ::handle<IntCurvesFace_Intersector> anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I)));
0109 return anIntAdaptor->Pnt(myIndexIntPnt(myIndexPt(I)));
0110 }
0111
0112
0113 IntCurveSurface_TransitionOnCurve Transition(const int I) const
0114 {
0115 occ::handle<IntCurvesFace_Intersector> anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I)));
0116 return anIntAdaptor->Transition(myIndexIntPnt(myIndexPt(I)));
0117 }
0118
0119
0120
0121
0122
0123
0124 TopAbs_State State(const int I) const
0125 {
0126 occ::handle<IntCurvesFace_Intersector> anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I)));
0127 return anIntAdaptor->State(myIndexIntPnt(myIndexPt(I)));
0128 }
0129
0130
0131
0132 const TopoDS_Face& Face(const int I) const
0133 {
0134 occ::handle<IntCurvesFace_Intersector> anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I)));
0135 return anIntAdaptor->Face();
0136 }
0137
0138
0139
0140 Standard_EXPORT void SortResult();
0141
0142 Standard_EXPORT virtual ~IntCurvesFace_ShapeIntersector();
0143
0144 private:
0145 bool myIsDone;
0146 int myNbFaces;
0147 NCollection_Array1<int> myPtrNums;
0148 NCollection_Array1<int> myPtrIndexNums;
0149 NCollection_Sequence<occ::handle<IntCurvesFace_Intersector>> myIntersector;
0150 NCollection_Sequence<int> myIndexPt;
0151 NCollection_Sequence<int> myIndexFace;
0152 NCollection_Sequence<int> myIndexIntPnt;
0153 NCollection_Sequence<double> myIndexPar;
0154 };
0155
0156 #endif