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_Wire_HeaderFile
17 #define _IMeshData_Wire_HeaderFile
19 #include <IMeshData_TessellatedShape.hxx>
20 #include <IMeshData_StatusOwner.hxx>
21 #include <Standard_Type.hxx>
22 #include <TopoDS_Wire.hxx>
24 #include <IMeshData_Types.hxx>
28 //! Interface class representing discrete model of a wire.
29 //! Wire should represent an ordered set of edges.
30 class IMeshData_Wire : public IMeshData_TessellatedShape, public IMeshData_StatusOwner
35 Standard_EXPORT virtual ~IMeshData_Wire()
39 //! Returns TopoDS_Face attached to model.
40 inline const TopoDS_Wire& GetWire () const
42 return TopoDS::Wire (GetShape ());
45 //! Returns number of edges.
46 Standard_EXPORT virtual Standard_Integer EdgesNb () const = 0;
48 //! Adds new discrete edge with specified orientation to wire chain.
49 //! @return index of added edge in wire chain.
50 Standard_EXPORT virtual Standard_Integer AddEdge (
51 const IMeshData::IEdgePtr& theDEdge,
52 const TopAbs_Orientation theOrientation) = 0;
54 //! Returns discrete edge with the given index.
55 Standard_EXPORT virtual const IMeshData::IEdgePtr& GetEdge (
56 const Standard_Integer theIndex) const = 0;
58 //! Returns True if orientation of discrete edge with the given index is forward.
59 Standard_EXPORT virtual TopAbs_Orientation GetEdgeOrientation (
60 const Standard_Integer theIndex) const = 0;
62 DEFINE_STANDARD_RTTI_INLINE(IMeshData_Wire, IMeshData_TessellatedShape)
67 //! Initializes empty model.
68 Standard_EXPORT IMeshData_Wire(const TopoDS_Wire& theWire)
69 : IMeshData_TessellatedShape(theWire)