Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 2016-04-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 _IMeshTools_MeshBuilder_HeaderFile
0017 #define _IMeshTools_MeshBuilder_HeaderFile
0018 
0019 #include <IMeshTools_Context.hxx>
0020 #include <Standard_Type.hxx>
0021 #include <Message_ProgressRange.hxx>
0022 
0023 //! Builds mesh for each face of shape without triangulation.
0024 //! In case if some faces of shape have already been triangulated
0025 //! checks deflection of existing polygonal model and re-uses it
0026 //! if deflection satisfies the specified parameter. Otherwise
0027 //! nullifies existing triangulation and build triangulation anew.
0028 //!
0029 //! The following statuses are used:
0030 //! Message_Done1 - algorithm has finished without errors.
0031 //! Message_Fail1 - invalid context.
0032 //! Message_Fail2 - algorithm has faced unexpected error.
0033 //! Message_Fail3 - fail to discretize edges.
0034 //! Message_Fail4 - can't heal discrete model.
0035 //! Message_Fail5 - fail to pre-process model.
0036 //! Message_Fail6 - fail to discretize faces.
0037 //! Message_Fail7 - fail to post-process model.
0038 //! Message_Warn1 - shape contains no objects to mesh.
0039 class IMeshTools_MeshBuilder : public Message_Algorithm
0040 {
0041 public:
0042 
0043   //! Constructor.
0044   Standard_EXPORT IMeshTools_MeshBuilder();
0045 
0046   //! Constructor.
0047   Standard_EXPORT IMeshTools_MeshBuilder (const Handle (IMeshTools_Context)& theContext);
0048   
0049   //! Destructor.
0050   Standard_EXPORT virtual ~IMeshTools_MeshBuilder();
0051 
0052   //! Sets context for algorithm.
0053   void SetContext (const Handle (IMeshTools_Context)& theContext)
0054   {
0055     myContext = theContext;
0056   }
0057 
0058   //! Gets context of algorithm.
0059   const Handle (IMeshTools_Context)& GetContext () const
0060   {
0061     return myContext;
0062   }
0063 
0064   //! Performs meshing to the shape using current context.
0065   Standard_EXPORT virtual void Perform (const Message_ProgressRange& theRange);
0066 
0067   DEFINE_STANDARD_RTTIEXT(IMeshTools_MeshBuilder, Message_Algorithm)
0068 
0069 private:
0070 
0071   Handle (IMeshTools_Context) myContext;
0072 };
0073 
0074 #endif