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
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 _IGESDraw_CircArraySubfigure_HeaderFile
18 #define _IGESDraw_CircArraySubfigure_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Integer.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;
35 class IGESDraw_CircArraySubfigure;
36 DEFINE_STANDARD_HANDLE(IGESDraw_CircArraySubfigure, IGESData_IGESEntity)
38 //! Defines IGES Circular Array Subfigure Instance Entity,
39 //! Type <414> Form Number <0> in package IGESDraw
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
50 Standard_EXPORT IGESDraw_CircArraySubfigure();
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
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);
65 //! returns the base entity, copies of which are produced
66 Standard_EXPORT Handle(IGESData_IGESEntity) BaseEntity() const;
68 //! returns total number of possible instance locations
69 Standard_EXPORT Standard_Integer NbLocations() const;
71 //! returns the center of the imaginary circle
72 Standard_EXPORT gp_Pnt CenterPoint() const;
74 //! returns the Transformed center of the imaginary circle
75 Standard_EXPORT gp_Pnt TransformedCenterPoint() const;
77 //! returns the radius of the imaginary circle
78 Standard_EXPORT Standard_Real CircleRadius() const;
80 //! returns the start angle in radians
81 Standard_EXPORT Standard_Real StartAngle() const;
83 //! returns the delta angle in radians
84 Standard_EXPORT Standard_Real DeltaAngle() const;
86 //! returns 0 if all elements to be displayed
87 Standard_EXPORT Standard_Integer ListCount() const;
89 //! returns True if (ListCount = 0) all elements are to be displayed
90 Standard_EXPORT Standard_Boolean DisplayFlag() const;
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;
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;
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;
109 DEFINE_STANDARD_RTTIEXT(IGESDraw_CircArraySubfigure,IGESData_IGESEntity)
119 Handle(IGESData_IGESEntity) theBaseEntity;
120 Standard_Integer theNbLocations;
122 Standard_Real theRadius;
123 Standard_Real theStartAngle;
124 Standard_Real theDeltaAngle;
125 Standard_Integer theDoDontFlag;
126 Handle(TColStd_HArray1OfInteger) thePositions;
137 #endif // _IGESDraw_CircArraySubfigure_HeaderFile