42cf5bc1 |
1 | // Created on: 1993-01-11 |
2 | // Created by: CKY / Contract Toubro-Larsen ( Niraj RANGWALA ) |
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 _IGESDraw_CircArraySubfigure_HeaderFile |
18 | #define _IGESDraw_CircArraySubfigure_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 <TColStd_HArray1OfInteger.hxx> |
27 | #include <IGESData_IGESEntity.hxx> |
28 | #include <Standard_Boolean.hxx> |
29 | class IGESData_IGESEntity; |
30 | class Standard_OutOfRange; |
31 | class gp_XYZ; |
32 | class gp_Pnt; |
33 | |
34 | |
35 | class IGESDraw_CircArraySubfigure; |
36 | DEFINE_STANDARD_HANDLE(IGESDraw_CircArraySubfigure, IGESData_IGESEntity) |
37 | |
38 | //! Defines IGES Circular Array Subfigure Instance Entity, |
39 | //! Type <414> Form Number <0> in package IGESDraw |
40 | //! |
41 | //! Used to produce copies of object called the base entity, |
42 | //! arranging them around the edge of an imaginary circle |
43 | //! whose center and radius are specified |
44 | class IGESDraw_CircArraySubfigure : public IGESData_IGESEntity |
45 | { |
46 | |
47 | public: |
48 | |
49 | |
50 | Standard_EXPORT IGESDraw_CircArraySubfigure(); |
51 | |
52 | //! This method is used to set the fields of the class |
53 | //! CircArraySubfigure |
54 | //! - aBase : Base entity |
55 | //! - aNumLocs : Total number of possible instance locations |
56 | //! - aCenter : Coordinates of Center of imaginary circle |
57 | //! - aRadius : Radius of imaginary circle |
58 | //! - aStAngle : Start angle in radians |
59 | //! - aDelAngle : Delta angle in radians |
60 | //! - aFlag : DO-DON'T flag to control which portion to |
61 | //! display |
62 | //! - allNumPos : All position to be or not to be processed |
63 | Standard_EXPORT void Init (const Handle(IGESData_IGESEntity)& aBase, const Standard_Integer aNumLocs, const gp_XYZ& aCenter, const Standard_Real aRadius, const Standard_Real aStAngle, const Standard_Real aDelAngle, const Standard_Integer aFlag, const Handle(TColStd_HArray1OfInteger)& allNumPos); |
64 | |
65 | //! returns the base entity, copies of which are produced |
66 | Standard_EXPORT Handle(IGESData_IGESEntity) BaseEntity() const; |
67 | |
68 | //! returns total number of possible instance locations |
69 | Standard_EXPORT Standard_Integer NbLocations() const; |
70 | |
71 | //! returns the center of the imaginary circle |
72 | Standard_EXPORT gp_Pnt CenterPoint() const; |
73 | |
74 | //! returns the Transformed center of the imaginary circle |
75 | Standard_EXPORT gp_Pnt TransformedCenterPoint() const; |
76 | |
77 | //! returns the radius of the imaginary circle |
78 | Standard_EXPORT Standard_Real CircleRadius() const; |
79 | |
80 | //! returns the start angle in radians |
81 | Standard_EXPORT Standard_Real StartAngle() const; |
82 | |
83 | //! returns the delta angle in radians |
84 | Standard_EXPORT Standard_Real DeltaAngle() const; |
85 | |
86 | //! returns 0 if all elements to be displayed |
87 | Standard_EXPORT Standard_Integer ListCount() const; |
88 | |
89 | //! returns True if (ListCount = 0) all elements are to be displayed |
90 | Standard_EXPORT Standard_Boolean DisplayFlag() const; |
91 | |
92 | //! returns 0 if half or fewer of the elements of the array are defined |
93 | //! 1 if half or more of the elements are defined |
94 | Standard_EXPORT Standard_Boolean DoDontFlag() const; |
95 | |
96 | //! returns whether Index is to be processed (DO) |
97 | //! or not to be processed(DON'T) |
98 | //! if (ListCount = 0) return theDoDontFlag |
99 | //! raises exception if Index <= 0 or Index > ListCount(). |
100 | Standard_EXPORT Standard_Boolean PositionNum (const Standard_Integer Index) const; |
101 | |
102 | //! returns the Index'th value position |
103 | //! raises exception if Index <= 0 or Index > ListCount(). |
104 | Standard_EXPORT Standard_Integer ListPosition (const Standard_Integer Index) const; |
105 | |
106 | |
107 | |
108 | |
92efcf78 |
109 | DEFINE_STANDARD_RTTIEXT(IGESDraw_CircArraySubfigure,IGESData_IGESEntity) |
42cf5bc1 |
110 | |
111 | protected: |
112 | |
113 | |
114 | |
115 | |
116 | private: |
117 | |
118 | |
119 | Handle(IGESData_IGESEntity) theBaseEntity; |
120 | Standard_Integer theNbLocations; |
121 | gp_XYZ theCenter; |
122 | Standard_Real theRadius; |
123 | Standard_Real theStartAngle; |
124 | Standard_Real theDeltaAngle; |
dde68833 |
125 | Standard_Boolean theDoDontFlag; |
42cf5bc1 |
126 | Handle(TColStd_HArray1OfInteger) thePositions; |
127 | |
128 | |
129 | }; |
130 | |
131 | |
132 | |
133 | |
134 | |
135 | |
136 | |
137 | #endif // _IGESDraw_CircArraySubfigure_HeaderFile |