Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-21 09:18:27

0001 // Created on: 2006-08-07
0002 // Created by: Galina KULIKOVA
0003 // Copyright (c) 2006-2014 OPEN CASCADE SAS
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 _ShapeUpgrade_SplitSurfaceArea_HeaderFile
0017 #define _ShapeUpgrade_SplitSurfaceArea_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_Type.hxx>
0021 
0022 #include <Standard_Integer.hxx>
0023 #include <ShapeUpgrade_SplitSurface.hxx>
0024 
0025 //! Split surface in the parametric space
0026 //! in according specified number of splits on the
0027 class ShapeUpgrade_SplitSurfaceArea : public ShapeUpgrade_SplitSurface
0028 {
0029 
0030 public:
0031   //! Empty constructor.
0032   Standard_EXPORT ShapeUpgrade_SplitSurfaceArea();
0033 
0034   //! Set number of split for surfaces
0035   int& NbParts();
0036 
0037   //! Set splitting mode
0038   //! If the mode is "splitting into squares",
0039   //! the face is splitted approximately into <myNbParts> parts,
0040   //! the parts are similar to squares in 2D.
0041   void SetSplittingIntoSquares(const bool theIsSplittingIntoSquares);
0042 
0043   //! Set fixed numbers of splits in U and V directions.
0044   //! Only for "Splitting Into Squares" mode
0045   void SetNumbersUVSplits(const int theNbUsplits, const int theNbVsplits);
0046 
0047   Standard_EXPORT void Compute(const bool Segment = true) override;
0048 
0049   DEFINE_STANDARD_RTTIEXT(ShapeUpgrade_SplitSurfaceArea, ShapeUpgrade_SplitSurface)
0050 
0051 private:
0052   int  myNbParts;
0053   int  myUnbSplit;
0054   int  myVnbSplit;
0055   bool myIsSplittingIntoSquares;
0056 };
0057 
0058 #include <ShapeUpgrade_SplitSurfaceArea.lxx>
0059 
0060 #endif // _ShapeUpgrade_SplitSurfaceArea_HeaderFile