File indexing completed on 2026-12-03 10:54:19
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 BRepMesh_DefaultRangeSplitter()
0030 : myIsValid(true)
0031 {
0032 }
0033
0034
0035 virtual ~BRepMesh_DefaultRangeSplitter() = default;
0036
0037
0038 Standard_EXPORT virtual void Reset(const IMeshData::IFaceHandle& theDFace,
0039 const IMeshTools_Parameters& theParameters);
0040
0041
0042 Standard_EXPORT virtual void AddPoint(const gp_Pnt2d& thePoint);
0043
0044
0045 Standard_EXPORT virtual void AdjustRange();
0046
0047
0048 Standard_EXPORT virtual bool IsValid();
0049
0050
0051
0052
0053
0054
0055
0056 Standard_EXPORT gp_Pnt2d Scale(const gp_Pnt2d& thePoint, const bool isToFaceBasis) const;
0057
0058
0059
0060 Standard_EXPORT virtual Handle(IMeshData::ListOfPnt2d) GenerateSurfaceNodes(
0061 const IMeshTools_Parameters& theParameters) const;
0062
0063
0064
0065 gp_Pnt Point(const gp_Pnt2d& thePoint2d) const
0066 {
0067 return GetSurface()->Value(thePoint2d.X(), thePoint2d.Y());
0068 }
0069
0070 protected:
0071
0072 Standard_EXPORT virtual void computeTolerance(const double theLenU, const double theLenV);
0073
0074
0075 Standard_EXPORT virtual void computeDelta(const double theLengthU, const double theLengthV);
0076
0077 public:
0078
0079 const IMeshData::IFaceHandle& GetDFace() const { return myDFace; }
0080
0081
0082 const occ::handle<BRepAdaptor_Surface>& GetSurface() const { return myDFace->GetSurface(); }
0083
0084
0085 const std::pair<double, double>& GetRangeU() const { return myRangeU; }
0086
0087
0088 const std::pair<double, double>& GetRangeV() const { return myRangeV; }
0089
0090
0091 const std::pair<double, double>& GetDelta() const { return myDelta; }
0092
0093 const std::pair<double, double>& GetToleranceUV() const { return myTolerance; }
0094
0095 private:
0096
0097
0098 double computeLengthU();
0099
0100
0101
0102 double computeLengthV();
0103
0104
0105 void updateRange(const double theGeomFirst,
0106 const double theGeomLast,
0107 const bool isPeriodic,
0108 double& theDiscreteFirst,
0109 double& theDiscreteLast);
0110
0111 protected:
0112 IMeshData::IFaceHandle myDFace;
0113 std::pair<double, double> myRangeU;
0114 std::pair<double, double> myRangeV;
0115 std::pair<double, double> myDelta;
0116 std::pair<double, double> myTolerance;
0117 bool myIsValid;
0118 };
0119
0120 #endif