7bd071ed |
1 | // Created on: 2016-04-07 |
2 | // Copyright (c) 2016 OPEN CASCADE SAS |
3 | // Created by: Oleg AGASHIN |
4 | // |
5 | // This file is part of Open CASCADE Technology software library. |
6 | // |
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. |
12 | // |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
15 | |
16 | #ifndef _IMeshData_Wire_HeaderFile |
17 | #define _IMeshData_Wire_HeaderFile |
18 | |
19 | #include <IMeshData_TessellatedShape.hxx> |
20 | #include <IMeshData_StatusOwner.hxx> |
21 | #include <Standard_Type.hxx> |
22 | #include <TopoDS_Wire.hxx> |
23 | #include <TopoDS.hxx> |
24 | #include <IMeshData_Types.hxx> |
25 | |
26 | class IMeshData_Edge; |
27 | |
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 |
31 | { |
32 | public: |
33 | |
34 | //! Destructor. |
35 | Standard_EXPORT virtual ~IMeshData_Wire() |
36 | { |
37 | } |
38 | |
39 | //! Returns TopoDS_Face attached to model. |
40 | inline const TopoDS_Wire& GetWire () const |
41 | { |
42 | return TopoDS::Wire (GetShape ()); |
43 | } |
44 | |
45 | //! Returns number of edges. |
46 | Standard_EXPORT virtual Standard_Integer EdgesNb () const = 0; |
47 | |
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; |
53 | |
54 | //! Returns discrete edge with the given index. |
55 | Standard_EXPORT virtual const IMeshData::IEdgePtr& GetEdge ( |
56 | const Standard_Integer theIndex) const = 0; |
57 | |
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; |
61 | |
62 | DEFINE_STANDARD_RTTI_INLINE(IMeshData_Wire, IMeshData_TessellatedShape) |
63 | |
64 | protected: |
65 | |
66 | //! Constructor. |
67 | //! Initializes empty model. |
68 | Standard_EXPORT IMeshData_Wire(const TopoDS_Wire& theWire) |
69 | : IMeshData_TessellatedShape(theWire) |
70 | { |
71 | } |
72 | }; |
73 | |
74 | #endif |