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 _IMeshData_Model_HeaderFile
0017 #define _IMeshData_Model_HeaderFile
0018 
0019 #include <IMeshData_Shape.hxx>
0020 #include <Standard_Type.hxx>
0021 #include <TopoDS_Shape.hxx>
0022 #include <IMeshData_Types.hxx>
0023 
0024 class TopoDS_Face;
0025 class TopoDS_Edge;
0026 
0027 //! Interface class representing discrete model of a shape.
0028 class IMeshData_Model : public IMeshData_Shape
0029 {
0030 public:
0031 
0032   //! Destructor.
0033   virtual ~IMeshData_Model()
0034   {
0035   }
0036 
0037   //! Returns maximum size of shape model.
0038   Standard_EXPORT virtual Standard_Real GetMaxSize () const = 0;
0039 
0040   DEFINE_STANDARD_RTTIEXT(IMeshData_Model, IMeshData_Shape)
0041 
0042 public: //! @name discrete faces
0043 
0044   //! Returns number of faces in discrete model.
0045   Standard_EXPORT virtual Standard_Integer FacesNb () const = 0;
0046 
0047   //! Adds new face to shape model.
0048   Standard_EXPORT virtual const IMeshData::IFaceHandle& AddFace (const TopoDS_Face& theFace) = 0;
0049 
0050   //! Gets model's face with the given index.
0051   Standard_EXPORT virtual const IMeshData::IFaceHandle& GetFace (const Standard_Integer theIndex) const = 0;
0052 
0053 public: //! @name discrete edges
0054 
0055   //! Returns number of edges in discrete model.
0056   Standard_EXPORT virtual Standard_Integer EdgesNb () const = 0;
0057 
0058   //! Adds new edge to shape model.
0059   Standard_EXPORT virtual const IMeshData::IEdgeHandle& AddEdge (const TopoDS_Edge& theEdge) = 0;
0060 
0061   //! Gets model's edge with the given index.
0062   Standard_EXPORT virtual const IMeshData::IEdgeHandle& GetEdge (const Standard_Integer theIndex) const = 0;
0063 
0064 protected:
0065 
0066   //! Constructor.
0067   //! Initializes empty model.
0068   IMeshData_Model (const TopoDS_Shape& theShape)
0069     : IMeshData_Shape(theShape)
0070   {
0071   }
0072 };
0073 
0074 #endif