Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-02 09:11:44

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   //! Constructor.
0027   BRepMesh_UVParamRangeSplitter()
0028       : myAllocator(new NCollection_IncAllocator(IMeshData::MEMORY_BLOCK_SIZE_HUGE)),
0029         myUParams(1, myAllocator),
0030         myVParams(1, myAllocator)
0031   {
0032   }
0033 
0034   //! Destructor.
0035   ~BRepMesh_UVParamRangeSplitter() override = default;
0036 
0037   //! Resets this splitter.
0038   void Reset(const IMeshData::IFaceHandle& theDFace,
0039              const IMeshTools_Parameters&  theParameters) override
0040   {
0041     BRepMesh_DefaultRangeSplitter::Reset(theDFace, theParameters);
0042     myUParams.Clear();
0043     myVParams.Clear();
0044     myAllocator->Reset(false);
0045   }
0046 
0047 public:
0048   //! Returns U parameters.
0049   const IMeshData::IMapOfReal& GetParametersU() const { return myUParams; }
0050 
0051   //! Returns U parameters.
0052   IMeshData::IMapOfReal& GetParametersU() { return myUParams; }
0053 
0054   //! Returns V parameters.
0055   const IMeshData::IMapOfReal& GetParametersV() const { return myVParams; }
0056 
0057   //! Returns V parameters.
0058   IMeshData::IMapOfReal& GetParametersV() { return myVParams; }
0059 
0060 private:
0061   occ::handle<NCollection_IncAllocator> myAllocator;
0062   IMeshData::IMapOfReal                 myUParams;
0063   IMeshData::IMapOfReal                 myVParams;
0064 };
0065 
0066 #endif