File indexing completed on 2025-11-03 09:53:00
0001 
0002 
0003 
0004 
0005 
0006 
0007 
0008 
0009 
0010 
0011 
0012 
0013 
0014 
0015 
0016 #ifndef _BRepMesh_SphereRangeSplitter_HeaderFile
0017 #define _BRepMesh_SphereRangeSplitter_HeaderFile
0018 
0019 #include <BRepMesh_DefaultRangeSplitter.hxx>
0020 #include <IMeshTools_Parameters.hxx>
0021 
0022 
0023 
0024 class BRepMesh_SphereRangeSplitter : public BRepMesh_DefaultRangeSplitter
0025 {
0026 public:
0027 
0028   
0029   BRepMesh_SphereRangeSplitter()
0030   {
0031   }
0032 
0033   
0034   virtual ~BRepMesh_SphereRangeSplitter()
0035   {
0036   }
0037 
0038   
0039   Standard_EXPORT virtual Handle(IMeshData::ListOfPnt2d) GenerateSurfaceNodes(
0040     const IMeshTools_Parameters& theParameters) const Standard_OVERRIDE;
0041 
0042 private:
0043 
0044   
0045   void computeStep(
0046     const std::pair<Standard_Real, Standard_Real>& theRange,
0047     const Standard_Real                            theDefaultStep,
0048     std::pair<Standard_Real, Standard_Real>&       theStepAndOffset) const
0049   {
0050     const Standard_Real aDiff = theRange.second - theRange.first;
0051     theStepAndOffset.first  = aDiff / ((Standard_Integer) (aDiff / theDefaultStep) + 1);
0052     theStepAndOffset.second = theRange.second - Precision::PConfusion();
0053   }
0054 };
0055 
0056 #endif