Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-20 08:17:21

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