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>
22 //! This is a common interface for meshing algorithms
23 //! instantiated by Mesh Factory and implemented by plugins.
24 class BRepMesh_DiscretRoot : public Standard_Transient
29 Standard_EXPORT virtual ~BRepMesh_DiscretRoot();
31 //! Set the shape to triangulate.
32 inline void SetShape(const TopoDS_Shape& theShape)
37 inline const TopoDS_Shape& Shape() const
42 //! Returns true if triangualtion was performed and has success.
43 inline Standard_Boolean IsDone() const
48 //! Compute triangulation for set shape.
49 virtual void Perform() = 0;
52 DEFINE_STANDARD_RTTIEXT(BRepMesh_DiscretRoot,Standard_Transient)
57 Standard_EXPORT BRepMesh_DiscretRoot();
62 myIsDone = Standard_True;
65 //! Clears IsDone flag.
66 inline void setNotDone()
68 myIsDone = Standard_False;
71 Standard_EXPORT virtual void init();
74 Standard_Boolean myIsDone;
77 DEFINE_STANDARD_HANDLE(BRepMesh_DiscretRoot, Standard_Transient)