Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:57

0001 // Created on: 2006-08-08
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_ShapeDivideArea_HeaderFile
0017 #define _ShapeUpgrade_ShapeDivideArea_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_DefineAlloc.hxx>
0021 #include <Standard_Handle.hxx>
0022 
0023 #include <ShapeUpgrade_ShapeDivide.hxx>
0024 class TopoDS_Shape;
0025 class ShapeUpgrade_FaceDivide;
0026 
0027 
0028 //! Divides faces from sprcified shape  by max area criterium.
0029 class ShapeUpgrade_ShapeDivideArea  : public ShapeUpgrade_ShapeDivide
0030 {
0031 public:
0032 
0033   DEFINE_STANDARD_ALLOC
0034 
0035   
0036   Standard_EXPORT ShapeUpgrade_ShapeDivideArea();
0037   
0038   //! Initialize by a Shape.
0039   Standard_EXPORT ShapeUpgrade_ShapeDivideArea(const TopoDS_Shape& S);
0040   
0041   //! Set max area allowed for faces
0042     Standard_Real& MaxArea();
0043 
0044   //! Set number of parts expected
0045   //! for the case of splitting by number
0046     Standard_Integer& NbParts();
0047 
0048   //! Set fixed numbers of splits in U and V directions.
0049   //! Only for "Splitting By Numbers" mode
0050     void SetNumbersUVSplits(const Standard_Integer theNbUsplits,
0051                             const Standard_Integer theNbVsplits);
0052   
0053   //! Set splitting mode
0054   //! If the mode is "splitting by number",
0055   //! the face is splitted approximately into <myNbParts> parts,
0056   //! the parts are similar to squares in 2D.
0057     void SetSplittingByNumber(const Standard_Boolean theIsSplittingByNumber);
0058 
0059 
0060 protected:
0061 
0062   
0063   //! Returns the tool for splitting faces.
0064   Standard_EXPORT virtual Handle(ShapeUpgrade_FaceDivide) GetSplitFaceTool() const Standard_OVERRIDE;
0065 
0066 
0067 
0068 
0069 private:
0070 
0071 
0072 
0073   Standard_Real    myMaxArea;
0074   Standard_Integer myNbParts;
0075   Standard_Integer myUnbSplit;
0076   Standard_Integer myVnbSplit;
0077   Standard_Boolean myIsSplittingByNumber;
0078 
0079 };
0080 
0081 
0082 #include <ShapeUpgrade_ShapeDivideArea.lxx>
0083 
0084 
0085 
0086 
0087 
0088 #endif // _ShapeUpgrade_ShapeDivideArea_HeaderFile