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 _BRepMeshData_Wire_HeaderFile |
17 | #define _BRepMeshData_Wire_HeaderFile |
18 | |
19 | #include <IMeshData_Wire.hxx> |
20 | #include <IMeshData_Types.hxx> |
21 | |
22 | //! Default implementation of wire data model entity. |
23 | class BRepMeshData_Wire : public IMeshData_Wire |
24 | { |
25 | public: |
26 | |
27 | DEFINE_INC_ALLOC |
28 | |
29 | //! Constructor. |
30 | Standard_EXPORT BRepMeshData_Wire ( |
31 | const TopoDS_Wire& theWire, |
32 | const Standard_Integer theEdgeNb, |
33 | const Handle (NCollection_IncAllocator)& theAllocator); |
34 | |
35 | //! Destructor. |
36 | Standard_EXPORT virtual ~BRepMeshData_Wire (); |
37 | |
38 | //! Gets number of children. |
39 | Standard_EXPORT virtual Standard_Integer EdgesNb () const Standard_OVERRIDE; |
40 | |
41 | //! Adds new discrete edge with specified orientation to wire chain. |
42 | //! @return index of added edge in wire chain. |
43 | Standard_EXPORT virtual Standard_Integer AddEdge ( |
44 | const IMeshData::IEdgePtr& theDEdge, |
45 | const TopAbs_Orientation theOrientation) Standard_OVERRIDE; |
46 | |
47 | //! Gets edge with the given index. |
48 | Standard_EXPORT virtual const IMeshData::IEdgePtr& GetEdge ( |
49 | const Standard_Integer theIndex) const Standard_OVERRIDE; |
50 | |
51 | //! Returns True if orientation of discrete edge with the given index is forward. |
52 | Standard_EXPORT virtual TopAbs_Orientation GetEdgeOrientation ( |
53 | const Standard_Integer theIndex) const Standard_OVERRIDE; |
54 | |
55 | DEFINE_STANDARD_RTTI_INLINE(BRepMeshData_Wire, IMeshData_Wire) |
56 | |
57 | private: |
58 | |
59 | IMeshData::VectorOfIEdgePtrs myDEdges; |
60 | IMeshData::VectorOfOrientation myDEdgesOri; |
61 | }; |
62 | |
63 | #endif |