0030675: Visualization - remove redundant proxy classes in hierarchy of PrsMgr_Presen...
[occt.git] / src / IGESSolid / IGESSolid_Shell.hxx
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_Shell_HeaderFile
18 #define _IGESSolid_Shell_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <IGESSolid_HArray1OfFace.hxx>
24 #include <TColStd_HArray1OfInteger.hxx>
25 #include <IGESData_IGESEntity.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <Standard_Integer.hxx>
28 class Standard_DimensionMismatch;
29 class Standard_OutOfRange;
30 class IGESSolid_Face;
31
32
33 class IGESSolid_Shell;
34 DEFINE_STANDARD_HANDLE(IGESSolid_Shell, IGESData_IGESEntity)
35
36 //! defines Shell, Type <514> Form Number <1>
37 //! in package IGESSolid
38 //! Shell entity is a connected entity of dimensionality 2
39 //! which divides R3 into two arcwise connected open subsets,
40 //! one of which is finite. Inside of the shell is defined to
41 //! be the finite region.
42 //! From IGES-5.3, Form can be <1> for Closed or <2> for Open
43 class IGESSolid_Shell : public IGESData_IGESEntity
44 {
45
46 public:
47
48   
49   Standard_EXPORT IGESSolid_Shell();
50   
51   //! This method is used to set the fields of the class Shell
52   //! - allFaces  : the faces comprising the shell
53   //! - allOrient : the orientation flags of the shell
54   //! raises exception if length of allFaces & allOrient do not match
55   Standard_EXPORT void Init (const Handle(IGESSolid_HArray1OfFace)& allFaces, const Handle(TColStd_HArray1OfInteger)& allOrient);
56   
57   //! Tells if a Shell is Closed, i.e. if its FormNumber is 1
58   //! (this is the default)
59   Standard_EXPORT Standard_Boolean IsClosed() const;
60   
61   //! Sets or Unsets the Closed status (FormNumber = 1 else 2)
62   Standard_EXPORT void SetClosed (const Standard_Boolean closed);
63   
64   //! returns the number of the face entities in the shell
65   Standard_EXPORT Standard_Integer NbFaces() const;
66   
67   //! returns the Index'th face entity of the shell
68   //! raises exception if Index <= 0 or Index > NbFaces()
69   Standard_EXPORT Handle(IGESSolid_Face) Face (const Standard_Integer Index) const;
70   
71   //! returns the orientation of Index'th face w.r.t the direction of
72   //! the underlying surface
73   //! raises exception if Index <= 0 or Index > NbFaces()
74   Standard_EXPORT Standard_Boolean Orientation (const Standard_Integer Index) const;
75
76
77
78
79   DEFINE_STANDARD_RTTIEXT(IGESSolid_Shell,IGESData_IGESEntity)
80
81 protected:
82
83
84
85
86 private:
87
88
89   Handle(IGESSolid_HArray1OfFace) theFaces;
90   Handle(TColStd_HArray1OfInteger) theOrientation;
91
92
93 };
94
95
96
97
98
99
100
101 #endif // _IGESSolid_Shell_HeaderFile