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_RectArraySubfigure_HeaderFile
18 #define _IGESDraw_RectArraySubfigure_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Real.hxx>
25 #include <Standard_Integer.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_RectArraySubfigure;
36 DEFINE_STANDARD_HANDLE(IGESDraw_RectArraySubfigure, IGESData_IGESEntity)
38 //! Defines IGES Rectangular Array Subfigure Instance Entity,
39 //! Type <412> Form Number <0> in package IGESDraw
40 //! Used to produce copies of object called the base entity,
41 //! arranging them in equally spaced rows and columns
42 class IGESDraw_RectArraySubfigure : public IGESData_IGESEntity
48 Standard_EXPORT IGESDraw_RectArraySubfigure();
50 //! This method is used to set the fields of the class
51 //! RectArraySubfigure
52 //! - aBase : a base entity which is replicated
53 //! - aScale : Scale Factor
54 //! - aCorner : lower left hand corner for the entire array
55 //! - nbCols : Number of columns of the array
56 //! - nbRows : Number of rows of the array
57 //! - hDisp : Column separations
58 //! - vtDisp : Row separation
59 //! - rotationAngle : Rotation angle specified in radians
60 //! - allDont : DO-DON'T flag to control which portion
62 //! - allNumPos : List of positions to be or not to be
64 Standard_EXPORT void Init (const Handle(IGESData_IGESEntity)& aBase, const Standard_Real aScale, const gp_XYZ& aCorner, const Standard_Integer nbCols, const Standard_Integer nbRows, const Standard_Real hDisp, const Standard_Real vtDisp, const Standard_Real rotationAngle, const Standard_Integer doDont, const Handle(TColStd_HArray1OfInteger)& allNumPos);
66 //! returns the base entity, copies of which are produced
67 Standard_EXPORT Handle(IGESData_IGESEntity) BaseEntity() const;
69 //! returns the scale factor
70 Standard_EXPORT Standard_Real ScaleFactor() const;
72 //! returns coordinates of lower left hand corner for the entire array
73 Standard_EXPORT gp_Pnt LowerLeftCorner() const;
75 //! returns Transformed coordinates of lower left corner for the array
76 Standard_EXPORT gp_Pnt TransformedLowerLeftCorner() const;
78 //! returns number of columns in the array
79 Standard_EXPORT Standard_Integer NbColumns() const;
81 //! returns number of rows in the array
82 Standard_EXPORT Standard_Integer NbRows() const;
84 //! returns horizontal distance between columns
85 Standard_EXPORT Standard_Real ColumnSeparation() const;
87 //! returns vertical distance between rows
88 Standard_EXPORT Standard_Real RowSeparation() const;
90 //! returns rotation angle in radians
91 Standard_EXPORT Standard_Real RotationAngle() const;
93 //! returns True if (ListCount = 0) i.e., all elements to be displayed
94 Standard_EXPORT Standard_Boolean DisplayFlag() const;
96 //! returns 0 if all replicated entities to be displayed
97 Standard_EXPORT Standard_Integer ListCount() const;
99 //! returns 0 if half or fewer of the elements of the array are defined
100 //! 1 if half or more of the elements are defined
101 Standard_EXPORT Standard_Boolean DoDontFlag() const;
103 //! returns whether Index is to be processed (DO)
104 //! or not to be processed(DON'T)
105 //! if (ListCount = 0) return theDoDontFlag
106 Standard_EXPORT Standard_Boolean PositionNum (const Standard_Integer Index) const;
108 //! returns the Index'th value position
109 //! raises exception if Index <= 0 or Index > ListCount()
110 Standard_EXPORT Standard_Integer ListPosition (const Standard_Integer Index) const;
115 DEFINE_STANDARD_RTTIEXT(IGESDraw_RectArraySubfigure,IGESData_IGESEntity)
125 Handle(IGESData_IGESEntity) theBaseEntity;
126 Standard_Real theScaleFactor;
127 gp_XYZ theLowerLeftCorner;
128 Standard_Integer theNbColumns;
129 Standard_Integer theNbRows;
130 Standard_Real theColumnSeparation;
131 Standard_Real theRowSeparation;
132 Standard_Real theRotationAngle;
133 Standard_Boolean theDoDontFlag;
134 Handle(TColStd_HArray1OfInteger) thePositions;
145 #endif // _IGESDraw_RectArraySubfigure_HeaderFile