1 // Created on: 1993-01-13
2 // Created by: CKY / Contract Toubro-Larsen ( Deepak PRABHU )
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_CenterLine_HeaderFile
18 #define _IGESDimen_CenterLine_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Integer.hxx>
24 #include <Standard_Real.hxx>
25 #include <TColgp_HArray1OfXY.hxx>
26 #include <IGESData_IGESEntity.hxx>
27 #include <Standard_Boolean.hxx>
31 class IGESDimen_CenterLine;
32 DEFINE_STANDARD_HANDLE(IGESDimen_CenterLine, IGESData_IGESEntity)
34 //! defines CenterLine, Type <106> Form <20-21>
35 //! in package IGESDimen
36 //! Is an entity appearing as crosshairs or as a
37 //! construction between 2 positions
38 class IGESDimen_CenterLine : public IGESData_IGESEntity
44 Standard_EXPORT IGESDimen_CenterLine();
46 //! This method is used to set the fields of the class
48 //! - aDataType : Interpretation Flag, always = 1
49 //! - aZDisplacement : Common z displacement
50 //! - dataPnts : Data points (x and y)
51 Standard_EXPORT void Init (const Standard_Integer aDataType, const Standard_Real aZdisp, const Handle(TColgp_HArray1OfXY)& dataPnts);
53 //! Sets FormNumber to 20 if <mode> is True, 21 else
54 Standard_EXPORT void SetCrossHair (const Standard_Boolean mode);
56 //! returns Interpretation Flag : IP = 1.
57 Standard_EXPORT Standard_Integer Datatype() const;
59 //! returns Number of Data Points.
60 Standard_EXPORT Standard_Integer NbPoints() const;
62 //! returns Common Z displacement.
63 Standard_EXPORT Standard_Real ZDisplacement() const;
65 //! returns the data point as Pnt from gp.
66 //! raises exception if Index <= 0 or Index > NbPoints()
67 Standard_EXPORT gp_Pnt Point (const Standard_Integer Index) const;
69 //! returns the data point as Pnt from gp after Transformation.
70 //! raises exception if Index <= 0 or Index > NbPoints()
71 Standard_EXPORT gp_Pnt TransformedPoint (const Standard_Integer Index) const;
73 //! returns True if Form is 20.
74 Standard_EXPORT Standard_Boolean IsCrossHair() const;
79 DEFINE_STANDARD_RTTIEXT(IGESDimen_CenterLine,IGESData_IGESEntity)
89 Standard_Integer theDatatype;
90 Standard_Real theZDisplacement;
91 Handle(TColgp_HArray1OfXY) theDataPoints;
102 #endif // _IGESDimen_CenterLine_HeaderFile