File indexing completed on 2025-01-18 10:04:11
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _IntTools_BeanFaceIntersector_HeaderFile
0017 #define _IntTools_BeanFaceIntersector_HeaderFile
0018
0019 #include <Standard.hxx>
0020 #include <Standard_DefineAlloc.hxx>
0021
0022 #include <BRepAdaptor_Curve.hxx>
0023 #include <BRepAdaptor_Surface.hxx>
0024 #include <Standard_Real.hxx>
0025 #include <Extrema_ExtCS.hxx>
0026 #include <GeomAPI_ProjectPointOnSurf.hxx>
0027 #include <IntTools_MarkedRangeSet.hxx>
0028 #include <IntTools_SequenceOfRanges.hxx>
0029 #include <Standard_Boolean.hxx>
0030 #include <Standard_Integer.hxx>
0031 #include <IntTools_ListOfCurveRangeSample.hxx>
0032 #include <IntTools_ListOfSurfaceRangeSample.hxx>
0033 class Geom_Surface;
0034 class IntTools_Context;
0035 class TopoDS_Edge;
0036 class TopoDS_Face;
0037 class IntTools_CurveRangeSample;
0038 class Bnd_Box;
0039 class IntTools_SurfaceRangeSample;
0040 class IntTools_CurveRangeLocalizeData;
0041 class IntTools_SurfaceRangeLocalizeData;
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051 class IntTools_BeanFaceIntersector
0052 {
0053 public:
0054
0055 DEFINE_STANDARD_ALLOC
0056
0057
0058 Standard_EXPORT IntTools_BeanFaceIntersector();
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068 Standard_EXPORT IntTools_BeanFaceIntersector(const TopoDS_Edge& theEdge, const TopoDS_Face& theFace);
0069
0070
0071
0072 Standard_EXPORT IntTools_BeanFaceIntersector(const BRepAdaptor_Curve& theCurve, const BRepAdaptor_Surface& theSurface, const Standard_Real theBeanTolerance, const Standard_Real theFaceTolerance);
0073
0074
0075
0076
0077
0078 Standard_EXPORT IntTools_BeanFaceIntersector(const BRepAdaptor_Curve& theCurve, const BRepAdaptor_Surface& theSurface, const Standard_Real theFirstParOnCurve, const Standard_Real theLastParOnCurve, const Standard_Real theUMinParameter, const Standard_Real theUMaxParameter, const Standard_Real theVMinParameter, const Standard_Real theVMaxParameter, const Standard_Real theBeanTolerance, const Standard_Real theFaceTolerance);
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088 Standard_EXPORT void Init (const TopoDS_Edge& theEdge, const TopoDS_Face& theFace);
0089
0090
0091
0092 Standard_EXPORT void Init (const BRepAdaptor_Curve& theCurve, const BRepAdaptor_Surface& theSurface, const Standard_Real theBeanTolerance, const Standard_Real theFaceTolerance);
0093
0094
0095
0096
0097
0098 Standard_EXPORT void Init (const BRepAdaptor_Curve& theCurve, const BRepAdaptor_Surface& theSurface, const Standard_Real theFirstParOnCurve, const Standard_Real theLastParOnCurve, const Standard_Real theUMinParameter, const Standard_Real theUMaxParameter, const Standard_Real theVMinParameter, const Standard_Real theVMaxParameter, const Standard_Real theBeanTolerance, const Standard_Real theFaceTolerance);
0099
0100
0101
0102 Standard_EXPORT void SetContext (const Handle(IntTools_Context)& theContext);
0103
0104
0105
0106 Standard_EXPORT const Handle(IntTools_Context)& Context() const;
0107
0108
0109
0110 Standard_EXPORT void SetBeanParameters (const Standard_Real theFirstParOnCurve, const Standard_Real theLastParOnCurve);
0111
0112
0113
0114 Standard_EXPORT void SetSurfaceParameters (const Standard_Real theUMinParameter, const Standard_Real theUMaxParameter, const Standard_Real theVMinParameter, const Standard_Real theVMaxParameter);
0115
0116
0117
0118 Standard_EXPORT void Perform();
0119
0120
0121 Standard_Boolean IsDone() const
0122 {
0123 return myIsDone;
0124 }
0125
0126 Standard_EXPORT const IntTools_SequenceOfRanges& Result() const;
0127
0128 Standard_EXPORT void Result (IntTools_SequenceOfRanges& theResults) const;
0129
0130
0131 Standard_Real MinimalSquareDistance() const
0132 {
0133 return myMinSqDistance;
0134 }
0135
0136
0137 private:
0138
0139 Standard_EXPORT void ComputeAroundExactIntersection();
0140
0141 Standard_EXPORT void ComputeLinePlane();
0142
0143
0144
0145
0146
0147
0148 Standard_EXPORT Standard_Boolean FastComputeAnalytic();
0149
0150 Standard_EXPORT void ComputeUsingExtremum();
0151
0152 Standard_EXPORT void ComputeNearRangeBoundaries();
0153
0154 Standard_EXPORT Standard_Boolean ComputeLocalized();
0155
0156 Standard_EXPORT void ComputeRangeFromStartPoint (const Standard_Boolean ToIncreaseParameter, const Standard_Real theParameter, const Standard_Real theUParameter, const Standard_Real theVParameter);
0157
0158 Standard_EXPORT void ComputeRangeFromStartPoint (const Standard_Boolean ToIncreaseParameter, const Standard_Real theParameter, const Standard_Real theUParameter, const Standard_Real theVParameter, const Standard_Integer theIndex);
0159
0160 Standard_EXPORT Standard_Real Distance (const Standard_Real theArg, Standard_Real& theUParameter, Standard_Real& theVParameter);
0161
0162 Standard_EXPORT Standard_Real Distance (const Standard_Real theArg);
0163
0164 Standard_EXPORT Standard_Boolean LocalizeSolutions (const IntTools_CurveRangeSample& theCurveRange, const Bnd_Box& theBoxCurve, const IntTools_SurfaceRangeSample& theSurfaceRange, const Bnd_Box& theBoxSurface, IntTools_CurveRangeLocalizeData& theCurveData, IntTools_SurfaceRangeLocalizeData& theSurfaceData, IntTools_ListOfCurveRangeSample& theListCurveRange, IntTools_ListOfSurfaceRangeSample& theListSurfaceRange);
0165
0166 Standard_EXPORT Standard_Boolean TestComputeCoinside();
0167
0168
0169 BRepAdaptor_Curve myCurve;
0170 BRepAdaptor_Surface mySurface;
0171 Handle(Geom_Surface) myTrsfSurface;
0172 Standard_Real myFirstParameter;
0173 Standard_Real myLastParameter;
0174 Standard_Real myUMinParameter;
0175 Standard_Real myUMaxParameter;
0176 Standard_Real myVMinParameter;
0177 Standard_Real myVMaxParameter;
0178 Standard_Real myBeanTolerance;
0179 Standard_Real myFaceTolerance;
0180 Standard_Real myCurveResolution;
0181 Standard_Real myCriteria;
0182 GeomAPI_ProjectPointOnSurf myProjector;
0183 IntTools_MarkedRangeSet myRangeManager;
0184 Handle(IntTools_Context) myContext;
0185 IntTools_SequenceOfRanges myResults;
0186 Standard_Boolean myIsDone;
0187 Standard_Real myMinSqDistance;
0188
0189 };
0190
0191 #endif