Back to home page

EIC code displayed by LXR

 
 

    


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

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   
0028   //! Destructor
0029   Standard_EXPORT virtual ~BRepMesh_DiscretRoot();
0030 
0031   //! Set the shape to triangulate.
0032   void SetShape(const TopoDS_Shape& theShape)
0033   {
0034     myShape = theShape;
0035   }
0036   
0037   const TopoDS_Shape& Shape() const
0038   {
0039     return myShape;
0040   }
0041   
0042   //! Returns true if triangualtion was performed and has success.
0043   Standard_Boolean IsDone() const
0044   {
0045     return myIsDone;
0046   }
0047 
0048   //! Compute triangulation for set shape.
0049   virtual void Perform(const Message_ProgressRange& theRange = Message_ProgressRange()) = 0;
0050 
0051 
0052   DEFINE_STANDARD_RTTIEXT(BRepMesh_DiscretRoot,Standard_Transient)
0053 
0054 protected:
0055   
0056   //! Constructor
0057   Standard_EXPORT BRepMesh_DiscretRoot();
0058   
0059   //! Sets IsDone flag.
0060   void setDone()
0061   {
0062     myIsDone = Standard_True;
0063   }
0064   
0065   //! Clears IsDone flag.
0066   void setNotDone()
0067   {
0068     myIsDone = Standard_False;
0069   }
0070   
0071   Standard_EXPORT virtual void init();
0072 
0073   TopoDS_Shape      myShape;
0074   Standard_Boolean  myIsDone;
0075 };
0076 
0077 DEFINE_STANDARD_HANDLE(BRepMesh_DiscretRoot, Standard_Transient)
0078 
0079 #endif