Back to home page

EIC code displayed by LXR

 
 

    


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

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_FaceDivideArea_HeaderFile
0017 #define _ShapeUpgrade_FaceDivideArea_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_Type.hxx>
0021 
0022 #include <ShapeUpgrade_FaceDivide.hxx>
0023 class TopoDS_Face;
0024 
0025 
0026 class ShapeUpgrade_FaceDivideArea;
0027 DEFINE_STANDARD_HANDLE(ShapeUpgrade_FaceDivideArea, ShapeUpgrade_FaceDivide)
0028 
0029 //! Divides face by max area criterium.
0030 class ShapeUpgrade_FaceDivideArea : public ShapeUpgrade_FaceDivide
0031 {
0032 
0033 public:
0034 
0035   
0036   //! Creates empty  constructor.
0037   Standard_EXPORT ShapeUpgrade_FaceDivideArea();
0038   
0039   Standard_EXPORT ShapeUpgrade_FaceDivideArea(const TopoDS_Face& F);
0040   
0041   //! Performs splitting and computes the resulting shell
0042   //! The context is used to keep track of former splittings
0043   Standard_EXPORT virtual Standard_Boolean Perform(const Standard_Real theArea = 0.) Standard_OVERRIDE;
0044   
0045   //! Set max area allowed for faces
0046     Standard_Real& MaxArea();
0047 
0048   //! Set number of parts expected
0049     Standard_Integer& NbParts();
0050 
0051   //! Set fixed numbers of splits in U and V directions.
0052   //! Only for "Splitting By Numbers" mode
0053     void SetNumbersUVSplits(const Standard_Integer theNbUsplits,
0054                             const Standard_Integer theNbVsplits);
0055   
0056   //! Set splitting mode
0057   //! If the mode is "splitting by number",
0058   //! the face is splitted approximately into <myNbParts> parts,
0059   //! the parts are similar to squares in 2D.
0060     void SetSplittingByNumber(const Standard_Boolean theIsSplittingByNumber);
0061 
0062 
0063   DEFINE_STANDARD_RTTIEXT(ShapeUpgrade_FaceDivideArea,ShapeUpgrade_FaceDivide)
0064 
0065 protected:
0066 
0067 
0068 
0069 
0070 private:
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_FaceDivideArea.lxx>
0083 
0084 
0085 
0086 
0087 
0088 #endif // _ShapeUpgrade_FaceDivideArea_HeaderFile