File indexing completed on 2025-01-18 10:03:13
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _BRepMesh_DefaultRangeSplitter_HeaderFile
0017 #define _BRepMesh_DefaultRangeSplitter_HeaderFile
0018
0019 #include <IMeshData_Face.hxx>
0020
0021 struct IMeshTools_Parameters;
0022
0023
0024
0025 class BRepMesh_DefaultRangeSplitter
0026 {
0027 public:
0028
0029
0030 BRepMesh_DefaultRangeSplitter()
0031 : myIsValid (Standard_True)
0032 {
0033 }
0034
0035
0036 virtual ~BRepMesh_DefaultRangeSplitter()
0037 {
0038 }
0039
0040
0041 Standard_EXPORT virtual void Reset(const IMeshData::IFaceHandle& theDFace,
0042 const IMeshTools_Parameters& theParameters);
0043
0044
0045 Standard_EXPORT virtual void AddPoint(const gp_Pnt2d& thePoint);
0046
0047
0048 Standard_EXPORT virtual void AdjustRange();
0049
0050
0051 Standard_EXPORT virtual Standard_Boolean IsValid();
0052
0053
0054
0055
0056
0057
0058
0059 Standard_EXPORT gp_Pnt2d Scale(const gp_Pnt2d& thePoint,
0060 const Standard_Boolean isToFaceBasis) const;
0061
0062
0063
0064 Standard_EXPORT virtual Handle(IMeshData::ListOfPnt2d) GenerateSurfaceNodes(
0065 const IMeshTools_Parameters& theParameters) const;
0066
0067
0068
0069 gp_Pnt Point(const gp_Pnt2d& thePoint2d) const
0070 {
0071 return GetSurface()->Value(thePoint2d.X(), thePoint2d.Y());
0072 }
0073
0074 protected:
0075
0076
0077 Standard_EXPORT virtual void computeTolerance (const Standard_Real theLenU, const Standard_Real theLenV);
0078
0079
0080 Standard_EXPORT virtual void computeDelta (const Standard_Real theLengthU, const Standard_Real theLengthV);
0081
0082 public:
0083
0084 const IMeshData::IFaceHandle& GetDFace() const
0085 {
0086 return myDFace;
0087 }
0088
0089
0090 const Handle(BRepAdaptor_Surface)& GetSurface() const
0091 {
0092 return myDFace->GetSurface();
0093 }
0094
0095
0096 const std::pair<Standard_Real, Standard_Real>& GetRangeU() const
0097 {
0098 return myRangeU;
0099 }
0100
0101
0102 const std::pair<Standard_Real, Standard_Real>& GetRangeV() const
0103 {
0104 return myRangeV;
0105 }
0106
0107
0108 const std::pair<Standard_Real, Standard_Real>& GetDelta () const
0109 {
0110 return myDelta;
0111 }
0112
0113 const std::pair<Standard_Real, Standard_Real>& GetToleranceUV() const
0114 {
0115 return myTolerance;
0116 }
0117
0118 private:
0119
0120
0121 Standard_Real computeLengthU();
0122
0123
0124 Standard_Real computeLengthV();
0125
0126
0127 void updateRange(const Standard_Real theGeomFirst,
0128 const Standard_Real theGeomLast,
0129 const Standard_Boolean isPeriodic,
0130 Standard_Real& theDiscreteFirst,
0131 Standard_Real& theDiscreteLast);
0132
0133 protected:
0134 IMeshData::IFaceHandle myDFace;
0135 std::pair<Standard_Real, Standard_Real> myRangeU;
0136 std::pair<Standard_Real, Standard_Real> myRangeV;
0137 std::pair<Standard_Real, Standard_Real> myDelta;
0138 std::pair<Standard_Real, Standard_Real> myTolerance;
0139 Standard_Boolean myIsValid;
0140 };
0141
0142 #endif