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 _IGESDimen_SectionedArea_HeaderFile
18 #define _IGESDimen_SectionedArea_HeaderFile
19 
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22 
23 #include <Standard_Integer.hxx>
24 #include <gp_XYZ.hxx>
25 #include <Standard_Real.hxx>
26 #include <IGESData_HArray1OfIGESEntity.hxx>
27 #include <IGESData_IGESEntity.hxx>
28 #include <Standard_Boolean.hxx>
29 class gp_Pnt;
30 
31 
32 class IGESDimen_SectionedArea;
33 DEFINE_STANDARD_HANDLE(IGESDimen_SectionedArea, IGESData_IGESEntity)
34 
35 //! defines IGES Sectioned Area, Type <230> Form <0>,
36 //! in package IGESDimen
37 //! A sectioned area is a portion of a design which is to be
38 //! filled with a pattern of lines. Ordinarily, this entity
39 //! is used to reveal or expose shape or material characteri-
40 //! stics defined by other entities. It consists of a pointer
41 //! to an exterior definition curve, a specification of the
42 //! pattern of lines, the coordinates of a point on a pattern
43 //! line, the distance between the pattern lines, the angle
44 //! between the pattern lines and the X-axis of definition
45 //! space, and the specification of any enclosed definition
46 //! curves (commonly known as islands).
47 class IGESDimen_SectionedArea : public IGESData_IGESEntity
48 {
49 
50 public:
51 
52 
53   Standard_EXPORT IGESDimen_SectionedArea();
54 
55   Standard_EXPORT void Init (const Handle(IGESData_IGESEntity)& aCurve, const Standard_Integer aPattern, const gp_XYZ& aPoint, const Standard_Real aDistance, const Standard_Real anAngle, const Handle(IGESData_HArray1OfIGESEntity)& someIslands);
56 
57   //! Sets the cross hatches to be inverted or not,
58   //! according value of <mode> (corresponds to FormNumber)
59   Standard_EXPORT void SetInverted (const Standard_Boolean mode);
60 
61   //! Returns True if cross hatches as Inverted, else they are
62   //! Standard (Inverted : Form=1, Standard : Form=0)
63   Standard_EXPORT Standard_Boolean IsInverted() const;
64 
65   //! returns the exterior definition curve
66   Standard_EXPORT Handle(IGESData_IGESEntity) ExteriorCurve() const;
67 
68   //! returns fill pattern code
69   Standard_EXPORT Standard_Integer Pattern() const;
70 
71   //! returns point thru which line should pass
72   Standard_EXPORT gp_Pnt PassingPoint() const;
73 
74   //! returns point thru which line should pass after Transformation
75   Standard_EXPORT gp_Pnt TransformedPassingPoint() const;
76 
77   //! returns the Z depth
78   Standard_EXPORT Standard_Real ZDepth() const;
79 
80   //! returns the normal distance between lines
81   Standard_EXPORT Standard_Real Distance() const;
82 
83   //! returns the angle of lines with XT axis
84   Standard_EXPORT Standard_Real Angle() const;
85 
86   //! returns the number of island curves
87   Standard_EXPORT Standard_Integer NbIslands() const;
88 
89   //! returns the interior definition curves, returns Null Handle
90   //! exception raised if Index <= 0 or Index > NbIslands()
91   Standard_EXPORT Handle(IGESData_IGESEntity) IslandCurve (const Standard_Integer Index) const;
92 
93 
94 
95 
96   DEFINE_STANDARD_RTTIEXT(IGESDimen_SectionedArea,IGESData_IGESEntity)
97 
98 protected:
99 
100 
101 
102 
103 private:
104 
105 
106   Handle(IGESData_IGESEntity) theExteriorCurve;
107   Standard_Integer thePattern;
108   gp_XYZ thePassingPoint;
109   Standard_Real theDistance;
110   Standard_Real theAngle;
111   Handle(IGESData_HArray1OfIGESEntity) theIslandCurves;
112 
113 
114 };
115 
116 
117 
118 
119 
120 
121 
122 #endif // _IGESDimen_SectionedArea_HeaderFile
123