Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 2016-04-19
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_FaceDiscret_HeaderFile
0017 #define _BRepMesh_FaceDiscret_HeaderFile
0018 
0019 #include <IMeshTools_ModelAlgo.hxx>
0020 #include <IMeshTools_Parameters.hxx>
0021 #include <IMeshTools_MeshAlgoFactory.hxx>
0022 
0023 //! Class implements functionality starting triangulation of model's faces.
0024 //! Each face is processed separately and can be executed in parallel mode.
0025 //! Uses mesh algo factory passed as initializer to create instance of triangulation 
0026 //! algorithm according to type of surface of target face.
0027 class BRepMesh_FaceDiscret : public IMeshTools_ModelAlgo
0028 {
0029 public:
0030 
0031   //! Constructor.
0032   Standard_EXPORT BRepMesh_FaceDiscret(
0033     const Handle(IMeshTools_MeshAlgoFactory)& theAlgoFactory);
0034 
0035   //! Destructor.
0036   Standard_EXPORT virtual ~BRepMesh_FaceDiscret();
0037 
0038   DEFINE_STANDARD_RTTIEXT(BRepMesh_FaceDiscret, IMeshTools_ModelAlgo)
0039 
0040 protected:
0041 
0042   //! Performs processing of faces of the given model.
0043   Standard_EXPORT virtual Standard_Boolean performInternal (
0044     const Handle(IMeshData_Model)& theModel,
0045     const IMeshTools_Parameters&   theParameters,
0046     const Message_ProgressRange&   theRange) Standard_OVERRIDE;
0047 
0048 private:
0049 
0050   //! Checks existing discretization of the face and updates data model.
0051   void process (const Standard_Integer theFaceIndex,
0052                 const Message_ProgressRange& theRange) const;
0053 
0054 private:
0055   class FaceListFunctor;
0056 
0057 private:
0058 
0059   Handle(IMeshTools_MeshAlgoFactory) myAlgoFactory;
0060   Handle(IMeshData_Model)            myModel;
0061   IMeshTools_Parameters              myParameters;
0062 };
0063 
0064 #endif