1 // Created on: 1993-01-09
2 // Created by: CKY / Contract Toubro-Larsen (Anand NATRAJAN)
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 _IGESDimen_NewDimensionedGeometry_HeaderFile
18 #define _IGESDimen_NewDimensionedGeometry_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Integer.hxx>
24 #include <IGESData_HArray1OfIGESEntity.hxx>
25 #include <TColStd_HArray1OfInteger.hxx>
26 #include <TColgp_HArray1OfXYZ.hxx>
27 #include <IGESData_IGESEntity.hxx>
31 class IGESDimen_NewDimensionedGeometry;
32 DEFINE_STANDARD_HANDLE(IGESDimen_NewDimensionedGeometry, IGESData_IGESEntity)
34 //! defines New Dimensioned Geometry, Type <402>, Form <21>
35 //! in package IGESDimen
36 //! Links a dimension entity with the geometry entities it
37 //! is dimensioning, so that later, in the receiving
38 //! database, the dimension can be automatically recalculated
39 //! and redrawn should the geometry be changed.
40 class IGESDimen_NewDimensionedGeometry : public IGESData_IGESEntity
46 Standard_EXPORT IGESDimen_NewDimensionedGeometry();
48 //! This method is used to set the fields of the class
49 //! NewDimensionedGeometry
50 //! - nbDimen : Number of Dimensions, default = 1
51 //! - aDimen : Dimension Entity
52 //! - anOrientation : Dimension Orientation Flag
53 //! - anAngle : Angle Value
54 //! - allEntities : Geometric Entities
55 //! - allLocations : Dimension Location Flags
56 //! - allPoints : Points on the Geometry Entities
57 //! exception raised if lengths of entities, locations, points
59 Standard_EXPORT void Init (const Standard_Integer nbDimens, const Handle(IGESData_IGESEntity)& aDimen, const Standard_Integer anOrientation, const Standard_Real anAngle, const Handle(IGESData_HArray1OfIGESEntity)& allEntities, const Handle(TColStd_HArray1OfInteger)& allLocations, const Handle(TColgp_HArray1OfXYZ)& allPoints);
61 //! returns the number of dimensions
62 Standard_EXPORT Standard_Integer NbDimensions() const;
64 //! returns the number of associated geometry entities
65 Standard_EXPORT Standard_Integer NbGeometries() const;
67 //! returns the dimension entity
68 Standard_EXPORT Handle(IGESData_IGESEntity) DimensionEntity() const;
70 //! returns the dimension orientation flag
71 Standard_EXPORT Standard_Integer DimensionOrientationFlag() const;
73 //! returns the angle value
74 Standard_EXPORT Standard_Real AngleValue() const;
76 //! returns the Index'th geometry entity
77 //! raises exception if Index <= 0 or Index > NbGeometries()
78 Standard_EXPORT Handle(IGESData_IGESEntity) GeometryEntity (const Standard_Integer Index) const;
80 //! returns the Index'th geometry entity's dimension location flag
81 //! raises exception if Index <= 0 or Index > NbGeometries()
82 Standard_EXPORT Standard_Integer DimensionLocationFlag (const Standard_Integer Index) const;
84 //! coordinate of point on Index'th geometry entity
85 //! raises exception if Index <= 0 or Index > NbGeometries()
86 Standard_EXPORT gp_Pnt Point (const Standard_Integer Index) const;
88 //! coordinate of point on Index'th geometry entity after Transformation
89 //! raises exception if Index <= 0 or Index > NbGeometries()
90 Standard_EXPORT gp_Pnt TransformedPoint (const Standard_Integer Index) const;
95 DEFINE_STANDARD_RTTIEXT(IGESDimen_NewDimensionedGeometry,IGESData_IGESEntity)
105 Standard_Integer theNbDimensions;
106 Handle(IGESData_IGESEntity) theDimensionEntity;
107 Standard_Integer theDimensionOrientationFlag;
108 Standard_Real theAngleValue;
109 Handle(IGESData_HArray1OfIGESEntity) theGeometryEntities;
110 Handle(TColStd_HArray1OfInteger) theDimensionLocationFlags;
111 Handle(TColgp_HArray1OfXYZ) thePoints;
122 #endif // _IGESDimen_NewDimensionedGeometry_HeaderFile