Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:59

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_NewGeneralNote_HeaderFile
0018 #define _IGESDimen_NewGeneralNote_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <gp_XYZ.hxx>
0025 #include <TColStd_HArray1OfInteger.hxx>
0026 #include <TColStd_HArray1OfReal.hxx>
0027 #include <Interface_HArray1OfHAsciiString.hxx>
0028 #include <IGESData_HArray1OfIGESEntity.hxx>
0029 #include <TColgp_HArray1OfXYZ.hxx>
0030 #include <IGESData_IGESEntity.hxx>
0031 class gp_Pnt;
0032 class TCollection_HAsciiString;
0033 
0034 
0035 class IGESDimen_NewGeneralNote;
0036 DEFINE_STANDARD_HANDLE(IGESDimen_NewGeneralNote, IGESData_IGESEntity)
0037 
0038 //! defines NewGeneralNote, Type <213> Form <0>
0039 //! in package IGESDimen
0040 //! Further attributes for formatting text strings
0041 class IGESDimen_NewGeneralNote : public IGESData_IGESEntity
0042 {
0043 
0044 public:
0045 
0046   
0047   Standard_EXPORT IGESDimen_NewGeneralNote();
0048   
0049   //! This method is used to set the fields of the class
0050   //! NewGeneralNote
0051   //! - width                : Width of text containment area
0052   //! - height               : Height of text containment area
0053   //! - justifyCode          : Justification code
0054   //! - areaLoc              : Text containment area location
0055   //! - areaRotationAngle    : Text containment area rotation
0056   //! - baseLinePos          : Base line position
0057   //! - normalInterlineSpace : Normal interline spacing
0058   //! - charDisplays         : Character display type
0059   //! - charWidths           : Character width
0060   //! - charHeights          : Character height
0061   //! - interCharSpc         : Intercharacter spacing
0062   //! - interLineSpc         : Interline spacing
0063   //! - fontStyles           : Font style
0064   //! - charAngles           : Character angle
0065   //! - controlCodeStrings   : Control Code string
0066   //! - nbChars              : Number of characters in string
0067   //! - boxWidths            : Box width
0068   //! - boxHeights           : Box height
0069   //! - charSetCodes         : Character Set Interpretation
0070   //! - charSetEntities      : Character Set Font
0071   //! - slAngles             : Slant angle of text in radians
0072   //! - rotAngles            : Rotation angle of text in radians
0073   //! - mirrorFlags          : Type of mirroring
0074   //! - rotateFlags          : Rotate internal text flag
0075   //! - startPoints          : Text start point
0076   //! - texts                : Text strings
0077   //! raises exception if there is mismatch between the various
0078   //! Array Lengths.
0079   Standard_EXPORT void Init (const Standard_Real width, const Standard_Real height, const Standard_Integer justifyCode, const gp_XYZ& areaLoc, const Standard_Real areaRotationAngle, const gp_XYZ& baseLinePos, const Standard_Real normalInterlineSpace, const Handle(TColStd_HArray1OfInteger)& charDisplays, const Handle(TColStd_HArray1OfReal)& charWidths, const Handle(TColStd_HArray1OfReal)& charHeights, const Handle(TColStd_HArray1OfReal)& interCharSpc, const Handle(TColStd_HArray1OfReal)& interLineSpc, const Handle(TColStd_HArray1OfInteger)& fontStyles, const Handle(TColStd_HArray1OfReal)& charAngles, const Handle(Interface_HArray1OfHAsciiString)& controlCodeStrings, const Handle(TColStd_HArray1OfInteger)& nbChars, const Handle(TColStd_HArray1OfReal)& boxWidths, const Handle(TColStd_HArray1OfReal)& boxHeights, const Handle(TColStd_HArray1OfInteger)& charSetCodes, const Handle(IGESData_HArray1OfIGESEntity)& charSetEntities, const Handle(TColStd_HArray1OfReal)& slAngles, const Handle(TColStd_HArray1OfReal)& rotAngles, const Handle(TColStd_HArray1OfInteger)& mirrorFlags, const Handle(TColStd_HArray1OfInteger)& rotateFlags, const Handle(TColgp_HArray1OfXYZ)& startPoints, const Handle(Interface_HArray1OfHAsciiString)& texts);
0080   
0081   //! returns width of text containment area of all strings in the note
0082   Standard_EXPORT Standard_Real TextWidth() const;
0083   
0084   //! returns height of text containment area of all strings in the note
0085   Standard_EXPORT Standard_Real TextHeight() const;
0086   
0087   //! returns Justification code of all strings within the note
0088   //! 0 = no justification
0089   //! 1 = right justified
0090   //! 2 = center justified
0091   //! 3 = left justified
0092   Standard_EXPORT Standard_Integer JustifyCode() const;
0093   
0094   //! returns Text containment area Location point
0095   Standard_EXPORT gp_Pnt AreaLocation() const;
0096   
0097   //! returns Text containment area Location point after Transformation
0098   Standard_EXPORT gp_Pnt TransformedAreaLocation() const;
0099   
0100   //! returns distance from the containment area plane
0101   Standard_EXPORT Standard_Real ZDepthAreaLocation() const;
0102   
0103   //! returns rotation angle of text containment area in radians
0104   Standard_EXPORT Standard_Real AreaRotationAngle() const;
0105   
0106   //! returns position of first base line
0107   Standard_EXPORT gp_Pnt BaseLinePosition() const;
0108   
0109   //! returns position of first base line after Transformation
0110   Standard_EXPORT gp_Pnt TransformedBaseLinePosition() const;
0111   
0112   //! returns distance from the Base line position plane
0113   Standard_EXPORT Standard_Real ZDepthBaseLinePosition() const;
0114   
0115   //! returns Normal Interline Spacing
0116   Standard_EXPORT Standard_Real NormalInterlineSpace() const;
0117   
0118   //! returns number of text HAsciiStrings
0119   Standard_EXPORT Standard_Integer NbStrings() const;
0120   
0121   //! returns Fixed/Variable width character display of string
0122   //! 0 = Fixed
0123   //! 1 = Variable
0124   //! raises exception if Index <= 0 or Index > NbStrings()
0125   Standard_EXPORT Standard_Integer CharacterDisplay (const Standard_Integer Index) const;
0126   
0127   //! returns False if Character display width is Fixed
0128   //! optional method, if required
0129   //! raises exception if Index <= 0 or Index > NbStrings()
0130   Standard_EXPORT Standard_Boolean IsVariable (const Standard_Integer Index) const;
0131   
0132   //! returns Character Width of string
0133   //! raises exception if Index <= 0 or Index > NbStrings()
0134   Standard_EXPORT Standard_Real CharacterWidth (const Standard_Integer Index) const;
0135   
0136   //! returns Character Height of string
0137   //! raises exception if Index <= 0 or Index > NbStrings()
0138   Standard_EXPORT Standard_Real CharacterHeight (const Standard_Integer Index) const;
0139   
0140   //! returns Inter-character spacing of string
0141   //! raises exception if Index <= 0 or Index > NbStrings()
0142   Standard_EXPORT Standard_Real InterCharacterSpace (const Standard_Integer Index) const;
0143   
0144   //! returns Interline spacing of string
0145   //! raises exception if Index <= 0 or Index > NbStrings()
0146   Standard_EXPORT Standard_Real InterlineSpace (const Standard_Integer Index) const;
0147   
0148   //! returns FontStyle of string
0149   //! raises exception if Index <= 0 or Index > NbStrings()
0150   Standard_EXPORT Standard_Integer FontStyle (const Standard_Integer Index) const;
0151   
0152   //! returns CharacterAngle of string
0153   //! Angle returned will be between 0 and 2PI
0154   //! raises exception if Index <= 0 or Index > NbStrings()
0155   Standard_EXPORT Standard_Real CharacterAngle (const Standard_Integer Index) const;
0156   
0157   //! returns ControlCodeString of string
0158   //! raises exception if Index <= 0 or Index > NbStrings()
0159   Standard_EXPORT Handle(TCollection_HAsciiString) ControlCodeString (const Standard_Integer Index) const;
0160   
0161   //! returns number of characters in string or zero
0162   //! raises exception if Index <= 0 or Index > NbStrings()
0163   Standard_EXPORT Standard_Integer NbCharacters (const Standard_Integer Index) const;
0164   
0165   //! returns Box width of string
0166   //! raises exception if Index <= 0 or Index > NbStrings()
0167   Standard_EXPORT Standard_Real BoxWidth (const Standard_Integer Index) const;
0168   
0169   //! returns Box height of string
0170   //! raises exception if Index <= 0 or Index > NbStrings()
0171   Standard_EXPORT Standard_Real BoxHeight (const Standard_Integer Index) const;
0172   
0173   //! returns False if Value, True if Pointer (Entity)
0174   //! raises exception if Index <= 0 or Index > NbStrings()
0175   Standard_EXPORT Standard_Boolean IsCharSetEntity (const Standard_Integer Index) const;
0176   
0177   //! returns Character Set Interpretation (default = 1) of string
0178   //! returns 0 if IsCharSetEntity () is True
0179   //! 1 = Standard ASCII
0180   //! 1001 = Symbol Font1
0181   //! 1002 = Symbol Font2
0182   //! 1003 = Symbol Font3
0183   //! raises exception if Index <= 0 or Index > NbStrings()
0184   Standard_EXPORT Standard_Integer CharSetCode (const Standard_Integer Index) const;
0185   
0186   //! returns Character Set Interpretation of string
0187   //! returns a Null Handle if IsCharSetEntity () is False
0188   //! raises exception if Index <= 0 or Index > NbStrings()
0189   Standard_EXPORT Handle(IGESData_IGESEntity) CharSetEntity (const Standard_Integer Index) const;
0190   
0191   //! returns Slant angle of string in radians
0192   //! default value = PI/2
0193   //! raises exception if Index <= 0 or Index > NbStrings()
0194   Standard_EXPORT Standard_Real SlantAngle (const Standard_Integer Index) const;
0195   
0196   //! returns Rotation angle of string in radians
0197   //! raises exception if Index <= 0 or Index > NbStrings()
0198   Standard_EXPORT Standard_Real RotationAngle (const Standard_Integer Index) const;
0199   
0200   //! returns Mirror Flag of string
0201   //! 0 = no mirroring
0202   //! 1 = mirror axis is perpendicular to the text base line
0203   //! 2 = mirror axis is text base line
0204   //! raises exception if Index <= 0 or Index > NbStrings()
0205   Standard_EXPORT Standard_Integer MirrorFlag (const Standard_Integer Index) const;
0206   
0207   //! returns False if MirrorFlag = 0. ie. no mirroring
0208   //! else returns True
0209   //! raises exception if Index <= 0 or Index > NbStrings()
0210   Standard_EXPORT Standard_Boolean IsMirrored (const Standard_Integer Index) const;
0211   
0212   //! returns Rotate internal text Flag of string
0213   //! 0 = text horizontal
0214   //! 1 = text vertical
0215   //! raises exception if Index <= 0 or Index > NbStrings()
0216   Standard_EXPORT Standard_Integer RotateFlag (const Standard_Integer Index) const;
0217   
0218   //! returns text start point of string
0219   //! raises exception if Index <= 0 or Index > NbStrings()
0220   Standard_EXPORT gp_Pnt StartPoint (const Standard_Integer Index) const;
0221   
0222   //! returns text start point of string after Transformation
0223   //! raises exception if Index <= 0 or Index > NbStrings()
0224   Standard_EXPORT gp_Pnt TransformedStartPoint (const Standard_Integer Index) const;
0225   
0226   //! returns distance from the start point plane
0227   //! raises exception if Index <= 0 or Index > NbStrings()
0228   Standard_EXPORT Standard_Real ZDepthStartPoint (const Standard_Integer Index) const;
0229   
0230   //! returns text string
0231   //! raises exception if Index <= 0 or Index > NbStrings()
0232   Standard_EXPORT Handle(TCollection_HAsciiString) Text (const Standard_Integer Index) const;
0233 
0234 
0235 
0236 
0237   DEFINE_STANDARD_RTTIEXT(IGESDimen_NewGeneralNote,IGESData_IGESEntity)
0238 
0239 protected:
0240 
0241 
0242 
0243 
0244 private:
0245 
0246 
0247   Standard_Real theWidth;
0248   Standard_Real theHeight;
0249   Standard_Integer theJustifyCode;
0250   gp_XYZ theAreaLoc;
0251   Standard_Real theAreaRotationAngle;
0252   gp_XYZ theBaseLinePos;
0253   Standard_Real theNormalInterlineSpace;
0254   Handle(TColStd_HArray1OfInteger) theCharDisplays;
0255   Handle(TColStd_HArray1OfReal) theCharWidths;
0256   Handle(TColStd_HArray1OfReal) theCharHeights;
0257   Handle(TColStd_HArray1OfReal) theInterCharSpaces;
0258   Handle(TColStd_HArray1OfReal) theInterlineSpaces;
0259   Handle(TColStd_HArray1OfInteger) theFontStyles;
0260   Handle(TColStd_HArray1OfReal) theCharAngles;
0261   Handle(Interface_HArray1OfHAsciiString) theControlCodeStrings;
0262   Handle(TColStd_HArray1OfInteger) theNbChars;
0263   Handle(TColStd_HArray1OfReal) theBoxWidths;
0264   Handle(TColStd_HArray1OfReal) theBoxHeights;
0265   Handle(TColStd_HArray1OfInteger) theCharSetCodes;
0266   Handle(IGESData_HArray1OfIGESEntity) theCharSetEntities;
0267   Handle(TColStd_HArray1OfReal) theSlantAngles;
0268   Handle(TColStd_HArray1OfReal) theRotationAngles;
0269   Handle(TColStd_HArray1OfInteger) theMirrorFlags;
0270   Handle(TColStd_HArray1OfInteger) theRotateFlags;
0271   Handle(TColgp_HArray1OfXYZ) theStartPoints;
0272   Handle(Interface_HArray1OfHAsciiString) theTexts;
0273 
0274 
0275 };
0276 
0277 
0278 
0279 
0280 
0281 
0282 
0283 #endif // _IGESDimen_NewGeneralNote_HeaderFile