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_LeaderArrow_HeaderFile
18 #define _IGESDimen_LeaderArrow_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Real.hxx>
25 #include <TColgp_HArray1OfXY.hxx>
26 #include <IGESData_IGESEntity.hxx>
27 #include <Standard_Integer.hxx>
28 class Standard_OutOfRange;
34 class IGESDimen_LeaderArrow;
35 DEFINE_STANDARD_HANDLE(IGESDimen_LeaderArrow, IGESData_IGESEntity)
37 //! defines LeaderArrow, Type <214> Form <1-12>
38 //! in package IGESDimen
39 //! Consists of one or more line segments except when
40 //! leader is part of an angular dimension, with links to
41 //! presumed text item
42 class IGESDimen_LeaderArrow : public IGESData_IGESEntity
48 Standard_EXPORT IGESDimen_LeaderArrow();
50 //! This method is used to set the fields of the class
52 //! - height : ArrowHead height
53 //! - width : ArrowHead width
55 //! - position : ArrowHead coordinates
56 //! - segments : Segment tail coordinate pairs
57 Standard_EXPORT void Init (const Standard_Real height, const Standard_Real width, const Standard_Real depth, const gp_XY& position, const Handle(TColgp_HArray1OfXY)& segments);
59 //! Changes FormNumber (indicates the Shape of the Arrow)
60 //! Error if not in range [0-12]
61 Standard_EXPORT void SetFormNumber (const Standard_Integer form);
63 //! returns number of segments
64 Standard_EXPORT Standard_Integer NbSegments() const;
66 //! returns ArrowHead height
67 Standard_EXPORT Standard_Real ArrowHeadHeight() const;
69 //! returns ArrowHead width
70 Standard_EXPORT Standard_Real ArrowHeadWidth() const;
73 Standard_EXPORT Standard_Real ZDepth() const;
75 //! returns ArrowHead co-ordinates
76 Standard_EXPORT gp_Pnt2d ArrowHead() const;
78 //! returns ArrowHead co-ordinates after Transformation
79 Standard_EXPORT gp_Pnt TransformedArrowHead() const;
81 //! returns segment tail co-ordinates.
82 //! raises exception if Index <= 0 or Index > NbSegments
83 Standard_EXPORT gp_Pnt2d SegmentTail (const Standard_Integer Index) const;
85 //! returns segment tail co-ordinates after Transformation.
86 //! raises exception if Index <= 0 or Index > NbSegments
87 Standard_EXPORT gp_Pnt TransformedSegmentTail (const Standard_Integer Index) const;
92 DEFINE_STANDARD_RTTIEXT(IGESDimen_LeaderArrow,IGESData_IGESEntity)
102 Standard_Real theArrowHeadHeight;
103 Standard_Real theArrowHeadWidth;
104 Standard_Real theZDepth;
106 Handle(TColgp_HArray1OfXY) theSegmentTails;
117 #endif // _IGESDimen_LeaderArrow_HeaderFile