Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:15

0001 // Created on: 2016-07-07
0002 // Copyright (c) 2016 OPEN CASCADE SAS
0003 // Created by: Oleg AGASHIN
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _BRepMesh_UVParamRangeSplitter_HeaderFile
0017 #define _BRepMesh_UVParamRangeSplitter_HeaderFile
0018 
0019 #include <BRepMesh_DefaultRangeSplitter.hxx>
0020 #include <IMeshData_Types.hxx>
0021 
0022 //! Intended to generate internal mesh nodes using UV parameters of boundary discrete points.
0023 class BRepMesh_UVParamRangeSplitter : public BRepMesh_DefaultRangeSplitter
0024 {
0025 public:
0026 
0027   //! Constructor.
0028   BRepMesh_UVParamRangeSplitter()
0029     : myAllocator(new NCollection_IncAllocator(IMeshData::MEMORY_BLOCK_SIZE_HUGE)),
0030       myUParams(1, myAllocator),
0031       myVParams(1, myAllocator)
0032   {
0033   }
0034 
0035   //! Destructor.
0036   virtual ~BRepMesh_UVParamRangeSplitter()
0037   {
0038   }
0039 
0040   //! Resets this splitter.
0041   virtual void Reset(const IMeshData::IFaceHandle& theDFace,
0042                      const IMeshTools_Parameters&  theParameters) Standard_OVERRIDE
0043   {
0044     BRepMesh_DefaultRangeSplitter::Reset(theDFace, theParameters);
0045     myUParams.Clear();
0046     myVParams.Clear();
0047     myAllocator->Reset(Standard_False);
0048   }
0049 
0050 public:
0051   //! Returns U parameters.
0052   const IMeshData::IMapOfReal& GetParametersU() const
0053   {
0054     return myUParams;
0055   }
0056 
0057   //! Returns U parameters.
0058   IMeshData::IMapOfReal& GetParametersU()
0059   {
0060     return myUParams;
0061   }
0062 
0063   //! Returns V parameters.
0064   const IMeshData::IMapOfReal& GetParametersV() const
0065   {
0066     return myVParams;
0067   }
0068 
0069   //! Returns V parameters.
0070   IMeshData::IMapOfReal& GetParametersV()
0071   {
0072     return myVParams;
0073   }
0074 
0075 private:
0076   Handle(NCollection_IncAllocator) myAllocator;
0077   IMeshData::IMapOfReal            myUParams;
0078   IMeshData::IMapOfReal            myVParams;
0079 };
0080 
0081 #endif