File indexing completed on 2025-01-18 10:05:33
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _XCAFDimTolObjects_DatumObject_HeaderFile
0018 #define _XCAFDimTolObjects_DatumObject_HeaderFile
0019
0020 #include <Standard.hxx>
0021
0022 #include <XCAFDimTolObjects_DatumObjectSequence.hxx>
0023 #include <XCAFDimTolObjects_DatumTargetType.hxx>
0024 #include <TCollection_HAsciiString.hxx>
0025 #include <XCAFDimTolObjects_DatumModifiersSequence.hxx>
0026 #include <XCAFDimTolObjects_DatumModifWithValue.hxx>
0027 #include <Standard_Real.hxx>
0028 #include <TopoDS_Shape.hxx>
0029 #include <Standard_Transient.hxx>
0030 #include <XCAFDimTolObjects_DatumSingleModif.hxx>
0031 #include <gp_Ax2.hxx>
0032
0033 class XCAFDimTolObjects_DatumObject;
0034 DEFINE_STANDARD_HANDLE(XCAFDimTolObjects_DatumObject, Standard_Transient)
0035
0036
0037 class XCAFDimTolObjects_DatumObject : public Standard_Transient
0038 {
0039
0040 public:
0041
0042 Standard_EXPORT XCAFDimTolObjects_DatumObject();
0043
0044 Standard_EXPORT XCAFDimTolObjects_DatumObject(const Handle(XCAFDimTolObjects_DatumObject)& theObj);
0045
0046
0047 Standard_EXPORT Handle(TCollection_HAsciiString) GetSemanticName() const;
0048
0049
0050 Standard_EXPORT void SetSemanticName(const Handle(TCollection_HAsciiString)& theName);
0051
0052
0053 Standard_EXPORT Handle(TCollection_HAsciiString) GetName() const;
0054
0055
0056 Standard_EXPORT void SetName (const Handle(TCollection_HAsciiString)& theTag);
0057
0058
0059 Standard_EXPORT XCAFDimTolObjects_DatumModifiersSequence GetModifiers() const;
0060
0061
0062 Standard_EXPORT void SetModifiers (const XCAFDimTolObjects_DatumModifiersSequence& theModifiers);
0063
0064
0065 Standard_EXPORT void GetModifierWithValue (XCAFDimTolObjects_DatumModifWithValue& theModifier,
0066 Standard_Real& theValue) const;
0067
0068
0069 Standard_EXPORT void SetModifierWithValue (const XCAFDimTolObjects_DatumModifWithValue theModifier,
0070 const Standard_Real theValue);
0071
0072
0073 Standard_EXPORT void AddModifier (const XCAFDimTolObjects_DatumSingleModif theModifier);
0074
0075
0076 Standard_EXPORT TopoDS_Shape GetDatumTarget() const;
0077
0078
0079 Standard_EXPORT void SetDatumTarget (const TopoDS_Shape& theShape);
0080
0081
0082 Standard_EXPORT Standard_Integer GetPosition () const;
0083
0084
0085 Standard_EXPORT void SetPosition (const Standard_Integer thePosition);
0086
0087
0088 Standard_EXPORT Standard_Boolean IsDatumTarget() const;
0089
0090
0091 Standard_EXPORT void IsDatumTarget(const Standard_Boolean theIsDT);
0092
0093
0094 Standard_EXPORT XCAFDimTolObjects_DatumTargetType GetDatumTargetType() const;
0095
0096
0097 Standard_EXPORT void SetDatumTargetType (const XCAFDimTolObjects_DatumTargetType theType);
0098
0099
0100
0101
0102 Standard_EXPORT gp_Ax2 GetDatumTargetAxis() const;
0103
0104
0105 Standard_EXPORT void SetDatumTargetAxis (const gp_Ax2& theAxis);
0106
0107
0108
0109 Standard_EXPORT Standard_Real GetDatumTargetLength() const;
0110
0111
0112 Standard_EXPORT void SetDatumTargetLength (const Standard_Real theLength);
0113
0114
0115
0116
0117 Standard_EXPORT Standard_Real GetDatumTargetWidth() const;
0118
0119
0120 Standard_EXPORT void SetDatumTargetWidth (const Standard_Real theWidth);
0121
0122
0123 Standard_EXPORT Standard_Integer GetDatumTargetNumber() const;
0124
0125
0126 Standard_EXPORT void SetDatumTargetNumber (const Standard_Integer theNumber);
0127
0128
0129 void SetPlane (const gp_Ax2& thePlane)
0130 {
0131 myPlane = thePlane;
0132 myHasPlane = Standard_True;
0133 }
0134
0135
0136 const gp_Ax2& GetPlane() const { return myPlane; }
0137
0138
0139 void SetPoint (const gp_Pnt& thePnt)
0140 {
0141 myPnt = thePnt;
0142 myHasPnt = Standard_True;
0143 }
0144
0145
0146 const gp_Pnt& GetPoint() const
0147 {
0148 return myPnt;
0149 }
0150
0151
0152 void SetPointTextAttach (const gp_Pnt& thePntText)
0153 {
0154 myPntText = thePntText;
0155 myHasPntText = Standard_True;
0156 }
0157
0158
0159 const gp_Pnt& GetPointTextAttach() const
0160 {
0161 return myPntText;
0162 }
0163
0164
0165 Standard_Boolean HasPlane() const { return myHasPlane; }
0166
0167
0168 Standard_Boolean HasPoint() const { return myHasPnt; }
0169
0170
0171 Standard_Boolean HasPointText() const
0172 {
0173 return myHasPntText;
0174 }
0175
0176
0177 void SetPresentation(const TopoDS_Shape& thePresentation,
0178 const Handle(TCollection_HAsciiString)& thePresentationName)
0179 {
0180 myPresentation = thePresentation;
0181 myPresentationName = thePresentationName;
0182 }
0183
0184
0185 TopoDS_Shape GetPresentation() const
0186 {
0187 return myPresentation;
0188 }
0189
0190
0191 Handle(TCollection_HAsciiString) GetPresentationName() const
0192 {
0193 return myPresentationName;
0194 }
0195
0196
0197 Standard_Boolean HasDatumTargetParams()
0198 {
0199 return myIsValidDT;
0200 }
0201
0202
0203 Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
0204
0205 DEFINE_STANDARD_RTTIEXT(XCAFDimTolObjects_DatumObject,Standard_Transient)
0206
0207 private:
0208
0209 Handle(TCollection_HAsciiString) myName;
0210 XCAFDimTolObjects_DatumModifiersSequence myModifiers;
0211 XCAFDimTolObjects_DatumModifWithValue myModifierWithValue;
0212 Standard_Real myValueOfModifier;
0213 TopoDS_Shape myDatumTarget;
0214 Standard_Integer myPosition;
0215 Standard_Boolean myIsDTarget;
0216 Standard_Boolean myIsValidDT;
0217 XCAFDimTolObjects_DatumTargetType myDTargetType;
0218 Standard_Real myLength;
0219 Standard_Real myWidth;
0220 Standard_Integer myDatumTargetNumber;
0221 gp_Ax2 myAxis;
0222 gp_Ax2 myPlane;
0223 gp_Pnt myPnt;
0224 gp_Pnt myPntText;
0225 Standard_Boolean myHasPlane;
0226 Standard_Boolean myHasPnt;
0227 Standard_Boolean myHasPntText;
0228 TopoDS_Shape myPresentation;
0229 Handle(TCollection_HAsciiString) mySemanticName;
0230 Handle(TCollection_HAsciiString) myPresentationName;
0231 };
0232
0233 #endif