Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-16 09:16:41

0001 // Copyright (c) 2013 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _BRepMesh_DiscretRoot_HeaderFile
0015 #define _BRepMesh_DiscretRoot_HeaderFile
0016 
0017 #include <Standard.hxx>
0018 #include <TopoDS_Shape.hxx>
0019 #include <Standard_Transient.hxx>
0020 #include <Message_ProgressRange.hxx>
0021 
0022 //! This is a common interface for meshing algorithms
0023 //! instantiated by Mesh Factory and implemented by plugins.
0024 class BRepMesh_DiscretRoot : public Standard_Transient
0025 {
0026 public:
0027   //! Destructor
0028   Standard_EXPORT ~BRepMesh_DiscretRoot() override;
0029 
0030   //! Set the shape to triangulate.
0031   void SetShape(const TopoDS_Shape& theShape) { myShape = theShape; }
0032 
0033   const TopoDS_Shape& Shape() const { return myShape; }
0034 
0035   //! Returns true if triangualtion was performed and has success.
0036   bool IsDone() const { return myIsDone; }
0037 
0038   //! Compute triangulation for set shape.
0039   virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) = 0;
0040 
0041   DEFINE_STANDARD_RTTIEXT(BRepMesh_DiscretRoot, Standard_Transient)
0042 
0043 protected:
0044   //! Constructor
0045   Standard_EXPORT BRepMesh_DiscretRoot();
0046 
0047   //! Sets IsDone flag.
0048   void setDone() { myIsDone = true; }
0049 
0050   //! Clears IsDone flag.
0051   void setNotDone() { myIsDone = false; }
0052 
0053   Standard_EXPORT virtual void init();
0054 
0055   TopoDS_Shape myShape;
0056   bool         myIsDone;
0057 };
0058 
0059 #endif