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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IGESSolid_Loop_HeaderFile
18 #define _IGESSolid_Loop_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <TColStd_HArray1OfInteger.hxx>
24 #include <IGESData_HArray1OfIGESEntity.hxx>
25 #include <IGESData_IGESEntity.hxx>
26 #include <Standard_Integer.hxx>
27 class IGESBasic_HArray1OfHArray1OfInteger;
28 class IGESBasic_HArray1OfHArray1OfIGESEntity;
32 DEFINE_STANDARD_HANDLE(IGESSolid_Loop, IGESData_IGESEntity)
34 //! defines Loop, Type <508> Form Number <1>
35 //! in package IGESSolid
36 //! A Loop entity specifies a bound of a face. It represents
37 //! a connected collection of face boundaries, seams, and
38 //! poles of a single face.
40 //! From IGES-5.3, a Loop can be free with Form Number 0,
41 //! else it is a bound of a face (it is the default)
42 class IGESSolid_Loop : public IGESData_IGESEntity
48 Standard_EXPORT IGESSolid_Loop();
50 //! This method is used to set the fields of the class Loop
51 //! - types : 0 = Edge; 1 = Vertex
52 //! - edges : Pointer to the EdgeList or VertexList
53 //! - index : Index of the edge into the EdgeList
55 //! - orient : Orientation flag of the edge
56 //! - nbParameterCurves : the number of parameter space curves
58 //! - isoparametricFlags : the isoparametric flag of the
59 //! parameter space curve
60 //! - curves : the parameter space curves
61 //! raises exception if length of types, edges, index, orient and
62 //! nbParameterCurves do not match or the length of
63 //! isoparametricFlags and curves do not match
64 Standard_EXPORT void Init (const Handle(TColStd_HArray1OfInteger)& types, const Handle(IGESData_HArray1OfIGESEntity)& edges, const Handle(TColStd_HArray1OfInteger)& index, const Handle(TColStd_HArray1OfInteger)& orient, const Handle(TColStd_HArray1OfInteger)& nbParameterCurves, const Handle(IGESBasic_HArray1OfHArray1OfInteger)& isoparametricFlags, const Handle(IGESBasic_HArray1OfHArray1OfIGESEntity)& curves);
66 //! Tells if a Loop is a Bound (FN 1) else it is free (FN 0)
67 Standard_EXPORT Standard_Boolean IsBound() const;
69 //! Sets or Unset the Bound Status (from Form Number)
71 Standard_EXPORT void SetBound (const Standard_Boolean bound);
73 //! returns the number of edge tuples
74 Standard_EXPORT Standard_Integer NbEdges() const;
76 //! returns the type of Index'th edge (0 = Edge, 1 = Vertex)
77 //! raises exception if Index <= 0 or Index > NbEdges()
78 Standard_EXPORT Standard_Integer EdgeType (const Standard_Integer Index) const;
80 //! return the EdgeList or VertexList corresponding to the Index
81 //! raises exception if Index <= 0 or Index > NbEdges()
82 Standard_EXPORT Handle(IGESData_IGESEntity) Edge (const Standard_Integer Index) const;
84 //! returns the orientation flag corresponding to Index'th edge
85 //! raises exception if Index <= 0 or Index > NbEdges()
86 Standard_EXPORT Standard_Boolean Orientation (const Standard_Integer Index) const;
88 //! return the number of parameter space curves associated with
90 //! raises exception if Index <= 0 or Index > NbEdges()
91 Standard_EXPORT Standard_Integer NbParameterCurves (const Standard_Integer Index) const;
93 Standard_EXPORT Standard_Boolean IsIsoparametric (const Standard_Integer EdgeIndex, const Standard_Integer CurveIndex) const;
95 //! returns the CurveIndex'th parameter space curve associated with
97 //! raises exception if EdgeIndex <= 0 or EdgeIndex > NbEdges() or
98 //! if CurveIndex <= 0 or CurveIndex > NbParameterCurves(EdgeIndex)
99 Standard_EXPORT Handle(IGESData_IGESEntity) ParametricCurve (const Standard_Integer EdgeIndex, const Standard_Integer CurveIndex) const;
101 //! raises exception If num <= 0 or num > NbEdges()
102 Standard_EXPORT Standard_Integer ListIndex (const Standard_Integer num) const;
107 DEFINE_STANDARD_RTTIEXT(IGESSolid_Loop,IGESData_IGESEntity)
117 Handle(TColStd_HArray1OfInteger) theTypes;
118 Handle(IGESData_HArray1OfIGESEntity) theEdges;
119 Handle(TColStd_HArray1OfInteger) theIndex;
120 Handle(TColStd_HArray1OfInteger) theOrientationFlags;
121 Handle(TColStd_HArray1OfInteger) theNbParameterCurves;
122 Handle(IGESBasic_HArray1OfHArray1OfInteger) theIsoparametricFlags;
123 Handle(IGESBasic_HArray1OfHArray1OfIGESEntity) theCurves;
134 #endif // _IGESSolid_Loop_HeaderFile