1 // Created on: 2016-04-07
2 // Copyright (c) 2016 OPEN CASCADE SAS
3 // Created by: Oleg AGASHIN
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _IMeshData_Model_HeaderFile
17 #define _IMeshData_Model_HeaderFile
19 #include <IMeshData_Shape.hxx>
20 #include <Standard_Type.hxx>
21 #include <TopoDS_Shape.hxx>
22 #include <IMeshData_Types.hxx>
29 //! Interface class representing discrete model of a shape.
30 class IMeshData_Model : public IMeshData_Shape
35 virtual ~IMeshData_Model()
39 //! Returns maximum size of shape model.
40 Standard_EXPORT virtual Standard_Real GetMaxSize () const = 0;
42 DEFINE_STANDARD_RTTIEXT(IMeshData_Model, IMeshData_Shape)
44 public: //! @name discrete faces
46 //! Returns number of faces in discrete model.
47 Standard_EXPORT virtual Standard_Integer FacesNb () const = 0;
49 //! Adds new face to shape model.
50 Standard_EXPORT virtual const IMeshData::IFaceHandle& AddFace (const TopoDS_Face& theFace) = 0;
52 //! Gets model's face with the given index.
53 Standard_EXPORT virtual const IMeshData::IFaceHandle& GetFace (const Standard_Integer theIndex) const = 0;
55 public: //! @name discrete edges
57 //! Returns number of edges in discrete model.
58 Standard_EXPORT virtual Standard_Integer EdgesNb () const = 0;
60 //! Adds new edge to shape model.
61 Standard_EXPORT virtual const IMeshData::IEdgeHandle& AddEdge (const TopoDS_Edge& theEdge) = 0;
63 //! Gets model's edge with the given index.
64 Standard_EXPORT virtual const IMeshData::IEdgeHandle& GetEdge (const Standard_Integer theIndex) const = 0;
69 //! Initializes empty model.
70 IMeshData_Model (const TopoDS_Shape& theShape)
71 : IMeshData_Shape(theShape)