File indexing completed on 2025-01-18 10:04:06
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 <TColStd_Array1OfInteger.hxx>
0027 #include <TColStd_SequenceOfInteger.hxx>
0028 #include <TColStd_SequenceOfReal.hxx>
0029 #include <Standard_Real.hxx>
0030 #include <IntCurveSurface_TransitionOnCurve.hxx>
0031 #include <IntCurvesFace_Intersector.hxx>
0032 #include <TopAbs_State.hxx>
0033
0034 class Adaptor3d_Curve;
0035 class TopoDS_Shape;
0036 class gp_Lin;
0037 class gp_Pnt;
0038 class TopoDS_Face;
0039
0040 class IntCurvesFace_ShapeIntersector
0041 {
0042 public:
0043
0044 DEFINE_STANDARD_ALLOC
0045
0046
0047 Standard_EXPORT IntCurvesFace_ShapeIntersector();
0048
0049 Standard_EXPORT void Load (const TopoDS_Shape& Sh, const Standard_Real Tol);
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059 Standard_EXPORT void Perform (const gp_Lin& L, const Standard_Real PInf, const Standard_Real PSup);
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069 Standard_EXPORT void PerformNearest (const gp_Lin& L, const Standard_Real PInf, const Standard_Real PSup);
0070
0071
0072
0073 Standard_EXPORT void Perform (const Handle(Adaptor3d_Curve)& HCu, const Standard_Real PInf, const Standard_Real PSup);
0074
0075
0076 Standard_Boolean IsDone() const
0077 {
0078 return myIsDone;
0079 }
0080
0081 Standard_Integer NbPnt() const
0082 {
0083 return myIndexPt.Length();
0084 }
0085
0086
0087
0088 Standard_Real UParameter (const Standard_Integer I) const
0089 {
0090 Handle(IntCurvesFace_Intersector) anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I)));
0091 return anIntAdaptor->UParameter(myIndexIntPnt(myIndexPt(I)));
0092 }
0093
0094
0095
0096 Standard_Real VParameter (const Standard_Integer I) const
0097 {
0098 Handle(IntCurvesFace_Intersector) anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I)));
0099 return anIntAdaptor->VParameter(myIndexIntPnt(myIndexPt(I)));
0100 }
0101
0102
0103
0104 Standard_Real WParameter (const Standard_Integer I) const
0105 {
0106 Handle(IntCurvesFace_Intersector) anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I)));
0107 return anIntAdaptor->WParameter(myIndexIntPnt(myIndexPt(I)));
0108 }
0109
0110
0111
0112 const gp_Pnt& Pnt (const Standard_Integer I) const
0113 {
0114 Handle(IntCurvesFace_Intersector) anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I)));
0115 return anIntAdaptor->Pnt(myIndexIntPnt(myIndexPt(I)));
0116 }
0117
0118
0119 IntCurveSurface_TransitionOnCurve Transition (const Standard_Integer I) const
0120 {
0121 Handle(IntCurvesFace_Intersector) anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I)));
0122 return anIntAdaptor->Transition(myIndexIntPnt(myIndexPt(I)));
0123 }
0124
0125
0126
0127
0128
0129
0130 TopAbs_State State(const Standard_Integer I) const
0131 {
0132 Handle(IntCurvesFace_Intersector) anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I)));
0133 return anIntAdaptor->State(myIndexIntPnt(myIndexPt(I)));
0134 }
0135
0136
0137
0138 const TopoDS_Face& Face(const Standard_Integer I) const
0139 {
0140 Handle(IntCurvesFace_Intersector) anIntAdaptor = myIntersector(myIndexFace(myIndexPt(I)));
0141 return anIntAdaptor->Face();
0142 }
0143
0144
0145
0146 Standard_EXPORT void SortResult();
0147
0148 Standard_EXPORT virtual ~IntCurvesFace_ShapeIntersector();
0149
0150 private:
0151
0152 Standard_Boolean myIsDone;
0153 Standard_Integer myNbFaces;
0154 TColStd_Array1OfInteger myPtrNums;
0155 TColStd_Array1OfInteger myPtrIndexNums;
0156 NCollection_Sequence<Handle(IntCurvesFace_Intersector)> myIntersector;
0157 TColStd_SequenceOfInteger myIndexPt;
0158 TColStd_SequenceOfInteger myIndexFace;
0159 TColStd_SequenceOfInteger myIndexIntPnt;
0160 TColStd_SequenceOfReal myIndexPar;
0161 };
0162
0163 #endif