File indexing completed on 2025-01-18 10:04:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _Prs3d_DimensionAspect_HeaderFile
0016 #define _Prs3d_DimensionAspect_HeaderFile
0017
0018 #include <Prs3d_ArrowAspect.hxx>
0019 #include <Prs3d_DimensionArrowOrientation.hxx>
0020 #include <Prs3d_DimensionTextHorizontalPosition.hxx>
0021 #include <Prs3d_DimensionTextVerticalPosition.hxx>
0022 #include <Prs3d_LineAspect.hxx>
0023 #include <Prs3d_TextAspect.hxx>
0024 #include <TCollection_AsciiString.hxx>
0025
0026
0027 class Prs3d_DimensionAspect : public Prs3d_BasicAspect
0028 {
0029 DEFINE_STANDARD_RTTIEXT(Prs3d_DimensionAspect, Prs3d_BasicAspect)
0030 public:
0031
0032
0033 Standard_EXPORT Prs3d_DimensionAspect();
0034
0035
0036 const Handle(Prs3d_LineAspect)& LineAspect() const { return myLineAspect; }
0037
0038
0039 void SetLineAspect (const Handle(Prs3d_LineAspect)& theAspect) { myLineAspect = theAspect; }
0040
0041
0042 const Handle(Prs3d_TextAspect)& TextAspect() const { return myTextAspect; }
0043
0044
0045 void SetTextAspect (const Handle(Prs3d_TextAspect)& theAspect) { myTextAspect = theAspect; }
0046
0047
0048 Standard_Boolean IsText3d() const { return myIsText3d; }
0049
0050
0051 void MakeText3d (const Standard_Boolean isText3d) { myIsText3d = isText3d; }
0052
0053
0054 Standard_Boolean IsTextShaded() const { return myIsTextShaded; }
0055
0056
0057 void MakeTextShaded (const Standard_Boolean theIsTextShaded) { myIsTextShaded = theIsTextShaded; }
0058
0059
0060 Standard_Boolean IsArrows3d() const { return myIsArrows3d; }
0061
0062
0063 void MakeArrows3d (const Standard_Boolean theIsArrows3d) { myIsArrows3d = theIsArrows3d; }
0064
0065
0066 Standard_Boolean IsUnitsDisplayed() const { return myToDisplayUnits; }
0067
0068
0069
0070 void MakeUnitsDisplayed (const Standard_Boolean theIsDisplayed) { myToDisplayUnits = theIsDisplayed; }
0071
0072
0073
0074 void SetArrowOrientation (const Prs3d_DimensionArrowOrientation theArrowOrient) { myArrowOrientation = theArrowOrient; }
0075
0076
0077 Prs3d_DimensionArrowOrientation ArrowOrientation() const { return myArrowOrientation; }
0078
0079
0080 void SetTextVerticalPosition (const Prs3d_DimensionTextVerticalPosition thePosition) { myTextVPosition = thePosition; }
0081
0082
0083 Prs3d_DimensionTextVerticalPosition TextVerticalPosition() const { return myTextVPosition; }
0084
0085
0086 void SetTextHorizontalPosition (const Prs3d_DimensionTextHorizontalPosition thePosition) { myTextHPosition = thePosition; }
0087
0088
0089 Prs3d_DimensionTextHorizontalPosition TextHorizontalPosition() const { return myTextHPosition; }
0090
0091
0092 const Handle(Prs3d_ArrowAspect)& ArrowAspect() const { return myArrowAspect; }
0093
0094
0095 void SetArrowAspect (const Handle(Prs3d_ArrowAspect)& theAspect) { myArrowAspect = theAspect; }
0096
0097
0098 Standard_EXPORT void SetCommonColor (const Quantity_Color& theColor);
0099
0100
0101 void SetExtensionSize (const Standard_Real theSize) { myExtensionSize = theSize; }
0102
0103
0104 Standard_Real ExtensionSize() const { return myExtensionSize; }
0105
0106
0107 void SetArrowTailSize (const Standard_Real theSize) { myArrowTailSize = theSize; }
0108
0109
0110 Standard_Real ArrowTailSize() const { return myArrowTailSize; }
0111
0112
0113 void SetValueStringFormat (const TCollection_AsciiString& theFormat) { myValueStringFormat = theFormat; }
0114
0115
0116 const TCollection_AsciiString& ValueStringFormat() const { return myValueStringFormat; }
0117
0118
0119 Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0120
0121 protected:
0122
0123 Handle(Prs3d_LineAspect) myLineAspect;
0124 Handle(Prs3d_TextAspect) myTextAspect;
0125 Handle(Prs3d_ArrowAspect) myArrowAspect;
0126 TCollection_AsciiString myValueStringFormat;
0127 Standard_Real myExtensionSize;
0128 Standard_Real myArrowTailSize;
0129 Prs3d_DimensionArrowOrientation myArrowOrientation;
0130 Prs3d_DimensionTextHorizontalPosition myTextHPosition;
0131 Prs3d_DimensionTextVerticalPosition myTextVPosition;
0132 Standard_Boolean myToDisplayUnits;
0133 Standard_Boolean myIsText3d;
0134 Standard_Boolean myIsTextShaded;
0135 Standard_Boolean myIsArrows3d;
0136
0137 };
0138
0139 DEFINE_STANDARD_HANDLE(Prs3d_DimensionAspect, Prs3d_BasicAspect)
0140
0141 #endif