Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-16 08:21:50

0001 // Created on: 1993-01-09
0002 // Created by: CKY / Contract Toubro-Larsen (Anand NATRAJAN)
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 _IGESDimen_NewDimensionedGeometry_HeaderFile
0018 #define _IGESDimen_NewDimensionedGeometry_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <IGESData_HArray1OfIGESEntity.hxx>
0025 #include <TColStd_HArray1OfInteger.hxx>
0026 #include <TColgp_HArray1OfXYZ.hxx>
0027 #include <IGESData_IGESEntity.hxx>
0028 class gp_Pnt;
0029 
0030 class IGESDimen_NewDimensionedGeometry;
0031 DEFINE_STANDARD_HANDLE(IGESDimen_NewDimensionedGeometry, IGESData_IGESEntity)
0032 
0033 //! defines New Dimensioned Geometry, Type <402>, Form <21>
0034 //! in package IGESDimen
0035 //! Links a dimension entity with the geometry entities it
0036 //! is dimensioning, so that later, in the receiving
0037 //! database, the dimension can be automatically recalculated
0038 //! and redrawn should the geometry be changed.
0039 class IGESDimen_NewDimensionedGeometry : public IGESData_IGESEntity
0040 {
0041 
0042 public:
0043   Standard_EXPORT IGESDimen_NewDimensionedGeometry();
0044 
0045   //! This method is used to set the fields of the class
0046   //! NewDimensionedGeometry
0047   //! - nbDimen       : Number of Dimensions, default = 1
0048   //! - aDimen        : Dimension Entity
0049   //! - anOrientation : Dimension Orientation Flag
0050   //! - anAngle       : Angle Value
0051   //! - allEntities   : Geometric Entities
0052   //! - allLocations  : Dimension Location Flags
0053   //! - allPoints     : Points on the Geometry Entities
0054   //! exception raised if lengths of entities, locations, points
0055   //! are not the same
0056   Standard_EXPORT void Init(const Standard_Integer                      nbDimens,
0057                             const Handle(IGESData_IGESEntity)&          aDimen,
0058                             const Standard_Integer                      anOrientation,
0059                             const Standard_Real                         anAngle,
0060                             const Handle(IGESData_HArray1OfIGESEntity)& allEntities,
0061                             const Handle(TColStd_HArray1OfInteger)&     allLocations,
0062                             const Handle(TColgp_HArray1OfXYZ)&          allPoints);
0063 
0064   //! returns the number of dimensions
0065   Standard_EXPORT Standard_Integer NbDimensions() const;
0066 
0067   //! returns the number of associated geometry entities
0068   Standard_EXPORT Standard_Integer NbGeometries() const;
0069 
0070   //! returns the dimension entity
0071   Standard_EXPORT Handle(IGESData_IGESEntity) DimensionEntity() const;
0072 
0073   //! returns the dimension orientation flag
0074   Standard_EXPORT Standard_Integer DimensionOrientationFlag() const;
0075 
0076   //! returns the angle value
0077   Standard_EXPORT Standard_Real AngleValue() const;
0078 
0079   //! returns the Index'th geometry entity
0080   //! raises exception if Index <= 0 or Index > NbGeometries()
0081   Standard_EXPORT Handle(IGESData_IGESEntity) GeometryEntity(const Standard_Integer Index) const;
0082 
0083   //! returns the Index'th geometry entity's dimension location flag
0084   //! raises exception if Index <= 0 or Index > NbGeometries()
0085   Standard_EXPORT Standard_Integer DimensionLocationFlag(const Standard_Integer Index) const;
0086 
0087   //! coordinate of point on Index'th geometry entity
0088   //! raises exception if Index <= 0 or Index > NbGeometries()
0089   Standard_EXPORT gp_Pnt Point(const Standard_Integer Index) const;
0090 
0091   //! coordinate of point on Index'th geometry entity after Transformation
0092   //! raises exception if Index <= 0 or Index > NbGeometries()
0093   Standard_EXPORT gp_Pnt TransformedPoint(const Standard_Integer Index) const;
0094 
0095   DEFINE_STANDARD_RTTIEXT(IGESDimen_NewDimensionedGeometry, IGESData_IGESEntity)
0096 
0097 protected:
0098 private:
0099   Standard_Integer                     theNbDimensions;
0100   Handle(IGESData_IGESEntity)          theDimensionEntity;
0101   Standard_Integer                     theDimensionOrientationFlag;
0102   Standard_Real                        theAngleValue;
0103   Handle(IGESData_HArray1OfIGESEntity) theGeometryEntities;
0104   Handle(TColStd_HArray1OfInteger)     theDimensionLocationFlags;
0105   Handle(TColgp_HArray1OfXYZ)          thePoints;
0106 };
0107 
0108 #endif // _IGESDimen_NewDimensionedGeometry_HeaderFile