1 // Created on: 1993-01-09
2 // Created by: CKY / Contract Toubro-Larsen ( SIVA )
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16 
17 #ifndef _IGESSolid_EdgeList_HeaderFile
18 #define _IGESSolid_EdgeList_HeaderFile
19 
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22 
23 #include <IGESData_HArray1OfIGESEntity.hxx>
24 #include <IGESSolid_HArray1OfVertexList.hxx>
25 #include <TColStd_HArray1OfInteger.hxx>
26 #include <IGESData_IGESEntity.hxx>
27 #include <Standard_Integer.hxx>
28 class IGESSolid_VertexList;
29 
30 
31 class IGESSolid_EdgeList;
32 DEFINE_STANDARD_HANDLE(IGESSolid_EdgeList, IGESData_IGESEntity)
33 
34 //! defines EdgeList, Type <504> Form <1>
35 //! in package IGESSolid
36 //! EdgeList is defined as a segment joining two vertices
37 //! It contains one or more edge tuples.
38 class IGESSolid_EdgeList : public IGESData_IGESEntity
39 {
40 
41 public:
42 
43 
44   Standard_EXPORT IGESSolid_EdgeList();
45 
46   //! This method is used to set the fields of the class
47   //! EdgeList
48   //! - curves           : the model space curves
49   //! - startVertexList  : the vertex list that contains the
50   //! start vertices
51   //! - startVertexIndex : the index of the vertex in the
52   //! corresponding vertex list
53   //! - endVertexList    : the vertex list that contains the
54   //! end vertices
55   //! - endVertexIndex   : the index of the vertex in the
56   //! corresponding vertex list
57   //! raises exception if size of curves,startVertexList,startVertexIndex,
58   //! endVertexList and endVertexIndex do no match
59   Standard_EXPORT void Init (const Handle(IGESData_HArray1OfIGESEntity)& curves, const Handle(IGESSolid_HArray1OfVertexList)& startVertexList, const Handle(TColStd_HArray1OfInteger)& startVertexIndex, const Handle(IGESSolid_HArray1OfVertexList)& endVertexList, const Handle(TColStd_HArray1OfInteger)& endVertexIndex);
60 
61   //! returns the number of edges in the edge list
62   Standard_EXPORT Standard_Integer NbEdges() const;
63 
64   //! returns the num'th model space curve
65   //! raises Exception if num <= 0 or num > NbEdges()
66   Standard_EXPORT Handle(IGESData_IGESEntity) Curve (const Standard_Integer num) const;
67 
68   //! returns the num'th start vertex list
69   //! raises Exception if num <= 0 or num > NbEdges()
70   Standard_EXPORT Handle(IGESSolid_VertexList) StartVertexList (const Standard_Integer num) const;
71 
72   //! returns the index of num'th start vertex in
73   //! the corresponding start vertex list
74   //! raises Exception if num <= 0 or num > NbEdges()
75   Standard_EXPORT Standard_Integer StartVertexIndex (const Standard_Integer num) const;
76 
77   //! returns the num'th end vertex list
78   //! raises Exception if num <= 0 or num > NbEdges()
79   Standard_EXPORT Handle(IGESSolid_VertexList) EndVertexList (const Standard_Integer num) const;
80 
81   //! returns the index of num'th end vertex in
82   //! the corresponding end vertex list
83   //! raises Exception if num <= 0 or num > NbEdges()
84   Standard_EXPORT Standard_Integer EndVertexIndex (const Standard_Integer num) const;
85 
86 
87 
88 
89   DEFINE_STANDARD_RTTIEXT(IGESSolid_EdgeList,IGESData_IGESEntity)
90 
91 protected:
92 
93 
94 
95 
96 private:
97 
98 
99   Handle(IGESData_HArray1OfIGESEntity) theCurves;
100   Handle(IGESSolid_HArray1OfVertexList) theStartVertexList;
101   Handle(TColStd_HArray1OfInteger) theStartVertexIndex;
102   Handle(IGESSolid_HArray1OfVertexList) theEndVertexList;
103   Handle(TColStd_HArray1OfInteger) theEndVertexIndex;
104 
105 
106 };
107 
108 
109 
110 
111 
112 
113 
114 #endif // _IGESSolid_EdgeList_HeaderFile
115