Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-21 09:17:33

0001 // Created on: 1993-01-09
0002 // Created by: CKY / Contract Toubro-Larsen ( SIVA )
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _IGESSolid_Loop_HeaderFile
0018 #define _IGESSolid_Loop_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <NCollection_Array1.hxx>
0025 #include <NCollection_HArray1.hxx>
0026 #include <IGESData_IGESEntity.hxx>
0027 class IGESBasic_HArray1OfHArray1OfInteger;
0028 class IGESBasic_HArray1OfHArray1OfIGESEntity;
0029 
0030 //! defines Loop, Type <508> Form Number <1>
0031 //! in package IGESSolid
0032 //! A Loop entity specifies a bound of a face. It represents
0033 //! a connected collection of face boundaries, seams, and
0034 //! poles of a single face.
0035 //!
0036 //! From IGES-5.3, a Loop can be free with Form Number 0,
0037 //! else it is a bound of a face (it is the default)
0038 class IGESSolid_Loop : public IGESData_IGESEntity
0039 {
0040 
0041 public:
0042   Standard_EXPORT IGESSolid_Loop();
0043 
0044   //! This method is used to set the fields of the class Loop
0045   //! - types              : 0 = Edge; 1 = Vertex
0046   //! - edges              : Pointer to the EdgeList or VertexList
0047   //! - index              : Index of the edge into the EdgeList
0048   //! VertexList entity
0049   //! - orient             : Orientation flag of the edge
0050   //! - nbParameterCurves  : the number of parameter space curves
0051   //! for each edge
0052   //! - isoparametricFlags : the isoparametric flag of the
0053   //! parameter space curve
0054   //! - curves             : the parameter space curves
0055   //! raises exception if length of types, edges, index, orient and
0056   //! nbParameterCurves do not match or the length of
0057   //! isoparametricFlags and curves do not match
0058   Standard_EXPORT void Init(
0059     const occ::handle<NCollection_HArray1<int>>&                              types,
0060     const occ::handle<NCollection_HArray1<occ::handle<IGESData_IGESEntity>>>& edges,
0061     const occ::handle<NCollection_HArray1<int>>&                              index,
0062     const occ::handle<NCollection_HArray1<int>>&                              orient,
0063     const occ::handle<NCollection_HArray1<int>>&                              nbParameterCurves,
0064     const occ::handle<IGESBasic_HArray1OfHArray1OfInteger>&                   isoparametricFlags,
0065     const occ::handle<IGESBasic_HArray1OfHArray1OfIGESEntity>&                curves);
0066 
0067   //! Tells if a Loop is a Bound (FN 1) else it is free (FN 0)
0068   Standard_EXPORT bool IsBound() const;
0069 
0070   //! Sets or Unset the Bound Status (from Form Number)
0071   //! Default is True
0072   Standard_EXPORT void SetBound(const bool bound);
0073 
0074   //! returns the number of edge tuples
0075   Standard_EXPORT int NbEdges() const;
0076 
0077   //! returns the type of Index'th edge (0 = Edge, 1 = Vertex)
0078   //! raises exception if Index <= 0 or Index > NbEdges()
0079   Standard_EXPORT int EdgeType(const int Index) const;
0080 
0081   //! return the EdgeList or VertexList corresponding to the Index
0082   //! raises exception if Index <= 0 or Index > NbEdges()
0083   Standard_EXPORT occ::handle<IGESData_IGESEntity> Edge(const int Index) const;
0084 
0085   //! returns the orientation flag corresponding to Index'th edge
0086   //! raises exception if Index <= 0 or Index > NbEdges()
0087   Standard_EXPORT bool Orientation(const int Index) const;
0088 
0089   //! return the number of parameter space curves associated with
0090   //! Index'th Edge
0091   //! raises exception if Index <= 0 or Index > NbEdges()
0092   Standard_EXPORT int NbParameterCurves(const int Index) const;
0093 
0094   Standard_EXPORT bool IsIsoparametric(const int EdgeIndex, const int CurveIndex) const;
0095 
0096   //! returns the CurveIndex'th parameter space curve associated with
0097   //! EdgeIndex'th edge
0098   //! raises exception if EdgeIndex <= 0 or EdgeIndex > NbEdges() or
0099   //! if CurveIndex <= 0 or CurveIndex > NbParameterCurves(EdgeIndex)
0100   Standard_EXPORT occ::handle<IGESData_IGESEntity> ParametricCurve(const int EdgeIndex,
0101                                                                    const int CurveIndex) const;
0102 
0103   //! raises exception If num <= 0 or num > NbEdges()
0104   Standard_EXPORT int ListIndex(const int num) const;
0105 
0106   DEFINE_STANDARD_RTTIEXT(IGESSolid_Loop, IGESData_IGESEntity)
0107 
0108 private:
0109   occ::handle<NCollection_HArray1<int>>                              theTypes;
0110   occ::handle<NCollection_HArray1<occ::handle<IGESData_IGESEntity>>> theEdges;
0111   occ::handle<NCollection_HArray1<int>>                              theIndex;
0112   occ::handle<NCollection_HArray1<int>>                              theOrientationFlags;
0113   occ::handle<NCollection_HArray1<int>>                              theNbParameterCurves;
0114   occ::handle<IGESBasic_HArray1OfHArray1OfInteger>                   theIsoparametricFlags;
0115   occ::handle<IGESBasic_HArray1OfHArray1OfIGESEntity>                theCurves;
0116 };
0117 
0118 #endif // _IGESSolid_Loop_HeaderFile