1 // Copyright (c) 2013 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #ifndef _BRepMesh_DiscretRoot_HeaderFile
15 #define _BRepMesh_DiscretRoot_HeaderFile
17 #include <Standard.hxx>
18 #include <Standard_Type.hxx>
19 #include <TopoDS_Shape.hxx>
20 #include <Standard_Transient.hxx>
21 #include <Message_ProgressRange.hxx>
23 //! This is a common interface for meshing algorithms
24 //! instantiated by Mesh Factory and implemented by plugins.
25 class BRepMesh_DiscretRoot : public Standard_Transient
30 Standard_EXPORT virtual ~BRepMesh_DiscretRoot();
32 //! Set the shape to triangulate.
33 inline void SetShape(const TopoDS_Shape& theShape)
38 inline const TopoDS_Shape& Shape() const
43 //! Returns true if triangualtion was performed and has success.
44 inline Standard_Boolean IsDone() const
49 //! Compute triangulation for set shape.
50 virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) = 0;
53 DEFINE_STANDARD_RTTIEXT(BRepMesh_DiscretRoot,Standard_Transient)
58 Standard_EXPORT BRepMesh_DiscretRoot();
63 myIsDone = Standard_True;
66 //! Clears IsDone flag.
67 inline void setNotDone()
69 myIsDone = Standard_False;
72 Standard_EXPORT virtual void init();
75 Standard_Boolean myIsDone;
78 DEFINE_STANDARD_HANDLE(BRepMesh_DiscretRoot, Standard_Transient)