Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:00

0001 // Created on: 1993-01-11
0002 // Created by: CKY / Contract Toubro-Larsen ( Niraj RANGWALA )
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _IGESDraw_RectArraySubfigure_HeaderFile
0018 #define _IGESDraw_RectArraySubfigure_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <gp_XYZ.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <TColStd_HArray1OfInteger.hxx>
0026 #include <IGESData_IGESEntity.hxx>
0027 class gp_Pnt;
0028 
0029 
0030 class IGESDraw_RectArraySubfigure;
0031 DEFINE_STANDARD_HANDLE(IGESDraw_RectArraySubfigure, IGESData_IGESEntity)
0032 
0033 //! Defines IGES Rectangular Array Subfigure Instance Entity,
0034 //! Type <412> Form Number <0> in package IGESDraw
0035 //! Used to produce copies of object called the base entity,
0036 //! arranging them in equally spaced rows and columns
0037 class IGESDraw_RectArraySubfigure : public IGESData_IGESEntity
0038 {
0039 
0040 public:
0041 
0042   
0043   Standard_EXPORT IGESDraw_RectArraySubfigure();
0044   
0045   //! This method is used to set the fields of the class
0046   //! RectArraySubfigure
0047   //! - aBase         : a base entity which is replicated
0048   //! - aScale        : Scale Factor
0049   //! - aCorner       : lower left hand corner for the entire array
0050   //! - nbCols        : Number of columns of the array
0051   //! - nbRows        : Number of rows of the array
0052   //! - hDisp         : Column separations
0053   //! - vtDisp        : Row separation
0054   //! - rotationAngle : Rotation angle specified in radians
0055   //! - allDont       : DO-DON'T flag to control which portion
0056   //! to display
0057   //! - allNumPos     : List of positions to be or not to be
0058   //! displayed
0059   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);
0060   
0061   //! returns the base entity, copies of which are produced
0062   Standard_EXPORT Handle(IGESData_IGESEntity) BaseEntity() const;
0063   
0064   //! returns the scale factor
0065   Standard_EXPORT Standard_Real ScaleFactor() const;
0066   
0067   //! returns coordinates of lower left hand corner for the entire array
0068   Standard_EXPORT gp_Pnt LowerLeftCorner() const;
0069   
0070   //! returns Transformed coordinates of lower left corner for the array
0071   Standard_EXPORT gp_Pnt TransformedLowerLeftCorner() const;
0072   
0073   //! returns number of columns in the array
0074   Standard_EXPORT Standard_Integer NbColumns() const;
0075   
0076   //! returns number of rows in the array
0077   Standard_EXPORT Standard_Integer NbRows() const;
0078   
0079   //! returns horizontal distance between columns
0080   Standard_EXPORT Standard_Real ColumnSeparation() const;
0081   
0082   //! returns vertical distance between rows
0083   Standard_EXPORT Standard_Real RowSeparation() const;
0084   
0085   //! returns rotation angle in radians
0086   Standard_EXPORT Standard_Real RotationAngle() const;
0087   
0088   //! returns True if (ListCount = 0) i.e., all elements to be displayed
0089   Standard_EXPORT Standard_Boolean DisplayFlag() const;
0090   
0091   //! returns 0 if all replicated entities to be displayed
0092   Standard_EXPORT Standard_Integer ListCount() const;
0093   
0094   //! returns 0 if half or fewer of the elements of  the array are defined
0095   //! 1 if half or more of the elements are defined
0096   Standard_EXPORT Standard_Boolean DoDontFlag() const;
0097   
0098   //! returns whether Index is to be processed (DO)
0099   //! or not to be processed(DON'T)
0100   //! if (ListCount = 0) return theDoDontFlag
0101   Standard_EXPORT Standard_Boolean PositionNum (const Standard_Integer Index) const;
0102   
0103   //! returns the Index'th value position
0104   //! raises exception if Index <= 0 or Index > ListCount()
0105   Standard_EXPORT Standard_Integer ListPosition (const Standard_Integer Index) const;
0106 
0107 
0108 
0109 
0110   DEFINE_STANDARD_RTTIEXT(IGESDraw_RectArraySubfigure,IGESData_IGESEntity)
0111 
0112 protected:
0113 
0114 
0115 
0116 
0117 private:
0118 
0119 
0120   Handle(IGESData_IGESEntity) theBaseEntity;
0121   Standard_Real theScaleFactor;
0122   gp_XYZ theLowerLeftCorner;
0123   Standard_Integer theNbColumns;
0124   Standard_Integer theNbRows;
0125   Standard_Real theColumnSeparation;
0126   Standard_Real theRowSeparation;
0127   Standard_Real theRotationAngle;
0128   Standard_Boolean theDoDontFlag;
0129   Handle(TColStd_HArray1OfInteger) thePositions;
0130 
0131 
0132 };
0133 
0134 
0135 
0136 
0137 
0138 
0139 
0140 #endif // _IGESDraw_RectArraySubfigure_HeaderFile