Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-10 09:17:08

0001 // Created on: 1993-01-13
0002 // Created by: CKY / Contract Toubro-Larsen ( Deepak PRABHU )
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_FlagNote_HeaderFile
0018 #define _IGESDimen_FlagNote_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <gp_XYZ.hxx>
0024 #include <IGESDimen_HArray1OfLeaderArrow.hxx>
0025 #include <IGESData_IGESEntity.hxx>
0026 #include <Standard_Integer.hxx>
0027 class IGESDimen_GeneralNote;
0028 class gp_Pnt;
0029 class IGESDimen_LeaderArrow;
0030 
0031 class IGESDimen_FlagNote;
0032 DEFINE_STANDARD_HANDLE(IGESDimen_FlagNote, IGESData_IGESEntity)
0033 
0034 //! defines FlagNote, Type <208> Form <0>
0035 //! in package IGESDimen
0036 //! Is label information formatted in different ways
0037 class IGESDimen_FlagNote : public IGESData_IGESEntity
0038 {
0039 
0040 public:
0041   Standard_EXPORT IGESDimen_FlagNote();
0042 
0043   //! This method is used to set the fields of the class
0044   //! FlagNote
0045   //! - leftCorner  : Lower left corner of the Flag
0046   //! - anAngle     : Rotation angle in radians
0047   //! - aNote       : General Note Entity
0048   //! - someLeaders : Leader Entities
0049   Standard_EXPORT void Init(const gp_XYZ&                                 leftCorner,
0050                             const Standard_Real                           anAngle,
0051                             const Handle(IGESDimen_GeneralNote)&          aNote,
0052                             const Handle(IGESDimen_HArray1OfLeaderArrow)& someLeaders);
0053 
0054   //! returns Lower Left coordinate of Flag as Pnt from package gp
0055   Standard_EXPORT gp_Pnt LowerLeftCorner() const;
0056 
0057   //! returns Lower Left coordinate of Flag as Pnt from package gp
0058   //! after Transformation.
0059   Standard_EXPORT gp_Pnt TransformedLowerLeftCorner() const;
0060 
0061   //! returns Rotation angle in radians
0062   Standard_EXPORT Standard_Real Angle() const;
0063 
0064   //! returns General Note Entity
0065   Standard_EXPORT Handle(IGESDimen_GeneralNote) Note() const;
0066 
0067   //! returns number of Arrows (Leaders) or zero
0068   Standard_EXPORT Standard_Integer NbLeaders() const;
0069 
0070   //! returns Leader Entity
0071   //! raises exception if Index <= 0 or Index > NbLeaders()
0072   Standard_EXPORT Handle(IGESDimen_LeaderArrow) Leader(const Standard_Integer Index) const;
0073 
0074   //! returns Height computed by the formula :
0075   //! Height = 2 * CH   where CH is from theNote
0076   Standard_EXPORT Standard_Real Height() const;
0077 
0078   //! returns the Character Height (from General Note)
0079   Standard_EXPORT Standard_Real CharacterHeight() const;
0080 
0081   //! returns Length computed by the formula :
0082   //! Length = TW + 0.4*CH  where CH is from theNote
0083   //! and TW is from theNote
0084   Standard_EXPORT Standard_Real Length() const;
0085 
0086   //! returns the Text Width (from General Note)
0087   Standard_EXPORT Standard_Real TextWidth() const;
0088 
0089   //! returns TipLength computed by the formula :
0090   //! TipLength = 0.5 * H / tan 35(deg)  where H is Height()
0091   Standard_EXPORT Standard_Real TipLength() const;
0092 
0093   DEFINE_STANDARD_RTTIEXT(IGESDimen_FlagNote, IGESData_IGESEntity)
0094 
0095 protected:
0096 private:
0097   gp_XYZ                                 theLowerLeftcorner;
0098   Standard_Real                          theAngle;
0099   Handle(IGESDimen_GeneralNote)          theNote;
0100   Handle(IGESDimen_HArray1OfLeaderArrow) theLeaders;
0101 };
0102 
0103 #endif // _IGESDimen_FlagNote_HeaderFile