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_GeomToleranceObject_HeaderFile
0018 #define _XCAFDimTolObjects_GeomToleranceObject_HeaderFile
0019
0020 #include <Standard.hxx>
0021
0022 #include <XCAFDimTolObjects_GeomToleranceType.hxx>
0023 #include <XCAFDimTolObjects_GeomToleranceTypeValue.hxx>
0024 #include <Standard_Real.hxx>
0025 #include <XCAFDimTolObjects_GeomToleranceMatReqModif.hxx>
0026 #include <XCAFDimTolObjects_GeomToleranceZoneModif.hxx>
0027 #include <XCAFDimTolObjects_GeomToleranceModifiersSequence.hxx>
0028 #include <Standard_Transient.hxx>
0029 #include <XCAFDimTolObjects_GeomToleranceModif.hxx>
0030 #include <XCAFDimTolObjects_ToleranceZoneAffectedPlane.hxx>
0031 #include <gp_Pln.hxx>
0032 #include <TopoDS_Shape.hxx>
0033 #include <TCollection_HAsciiString.hxx>
0034
0035 class XCAFDimTolObjects_GeomToleranceObject;
0036 DEFINE_STANDARD_HANDLE(XCAFDimTolObjects_GeomToleranceObject, Standard_Transient)
0037
0038
0039 class XCAFDimTolObjects_GeomToleranceObject : public Standard_Transient
0040 {
0041
0042 public:
0043
0044 Standard_EXPORT XCAFDimTolObjects_GeomToleranceObject();
0045
0046 Standard_EXPORT XCAFDimTolObjects_GeomToleranceObject(const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObj);
0047
0048
0049 Standard_EXPORT Handle(TCollection_HAsciiString) GetSemanticName() const;
0050
0051
0052 Standard_EXPORT void SetSemanticName(const Handle(TCollection_HAsciiString)& theName);
0053
0054
0055 Standard_EXPORT void SetType (const XCAFDimTolObjects_GeomToleranceType theType);
0056
0057
0058 Standard_EXPORT XCAFDimTolObjects_GeomToleranceType GetType() const;
0059
0060
0061 Standard_EXPORT void SetTypeOfValue (const XCAFDimTolObjects_GeomToleranceTypeValue theTypeOfValue);
0062
0063
0064 Standard_EXPORT XCAFDimTolObjects_GeomToleranceTypeValue GetTypeOfValue() const;
0065
0066
0067 Standard_EXPORT void SetValue (const Standard_Real theValue);
0068
0069
0070 Standard_EXPORT Standard_Real GetValue() const;
0071
0072
0073 Standard_EXPORT void SetMaterialRequirementModifier (const XCAFDimTolObjects_GeomToleranceMatReqModif theMatReqModif);
0074
0075
0076 Standard_EXPORT XCAFDimTolObjects_GeomToleranceMatReqModif GetMaterialRequirementModifier() const;
0077
0078
0079 Standard_EXPORT void SetZoneModifier (const XCAFDimTolObjects_GeomToleranceZoneModif theZoneModif);
0080
0081
0082 Standard_EXPORT XCAFDimTolObjects_GeomToleranceZoneModif GetZoneModifier() const;
0083
0084
0085 Standard_EXPORT void SetValueOfZoneModifier (const Standard_Real theValue);
0086
0087
0088 Standard_EXPORT Standard_Real GetValueOfZoneModifier() const;
0089
0090
0091 Standard_EXPORT void SetModifiers (const XCAFDimTolObjects_GeomToleranceModifiersSequence& theModifiers);
0092
0093
0094 Standard_EXPORT void AddModifier (const XCAFDimTolObjects_GeomToleranceModif theModifier);
0095
0096
0097 Standard_EXPORT XCAFDimTolObjects_GeomToleranceModifiersSequence GetModifiers() const;
0098
0099
0100 Standard_EXPORT void SetMaxValueModifier (const Standard_Real theModifier);
0101
0102
0103 Standard_EXPORT Standard_Real GetMaxValueModifier() const;
0104
0105 Standard_EXPORT void SetAxis (const gp_Ax2& theAxis);
0106
0107 Standard_EXPORT gp_Ax2 GetAxis() const;
0108
0109 Standard_EXPORT Standard_Boolean HasAxis () const;
0110
0111
0112 void SetPlane (const gp_Ax2& thePlane)
0113 {
0114 myPlane = thePlane;
0115 myHasPlane = Standard_True;
0116 }
0117
0118
0119 const gp_Ax2& GetPlane() const { return myPlane; }
0120
0121
0122 void SetPoint (const gp_Pnt& thePnt)
0123 {
0124 myPnt = thePnt;
0125 myHasPnt = Standard_True;
0126 }
0127
0128
0129 const gp_Pnt& GetPoint() const { return myPnt; }
0130
0131
0132 void SetPointTextAttach (const gp_Pnt& thePntText)
0133 {
0134 myPntText = thePntText;
0135 myHasPntText = Standard_True;
0136 }
0137
0138
0139 const gp_Pnt& GetPointTextAttach() const
0140 {
0141 return myPntText;
0142 }
0143
0144
0145 Standard_Boolean HasPlane() const { return myHasPlane; }
0146
0147
0148 Standard_Boolean HasPoint() const { return myHasPnt; }
0149
0150
0151 Standard_Boolean HasPointText() const
0152 {
0153 return myHasPntText;
0154 }
0155
0156
0157 void SetPresentation(const TopoDS_Shape& thePresentation,
0158 const Handle(TCollection_HAsciiString)& thePresentationName)
0159 {
0160 myPresentation = thePresentation;
0161 myPresentationName = thePresentationName;
0162 }
0163
0164
0165 TopoDS_Shape GetPresentation() const
0166 {
0167 return myPresentation;
0168 }
0169
0170
0171 Handle(TCollection_HAsciiString) GetPresentationName() const
0172 {
0173 return myPresentationName;
0174 }
0175
0176
0177 bool HasAffectedPlane() const
0178 {
0179 return (myAffectedPlaneType != XCAFDimTolObjects_ToleranceZoneAffectedPlane_None);
0180 }
0181
0182
0183 XCAFDimTolObjects_ToleranceZoneAffectedPlane GetAffectedPlaneType() const
0184 {
0185 return myAffectedPlaneType;
0186 }
0187
0188
0189 void SetAffectedPlaneType(const XCAFDimTolObjects_ToleranceZoneAffectedPlane theType)
0190 {
0191 myAffectedPlaneType = theType;
0192 }
0193
0194
0195 void SetAffectedPlane(const gp_Pln& thePlane)
0196 {
0197 myAffectedPlane = thePlane;
0198 }
0199
0200
0201 void SetAffectedPlane(const gp_Pln& thePlane,
0202 const XCAFDimTolObjects_ToleranceZoneAffectedPlane theType)
0203 {
0204 myAffectedPlaneType = theType;
0205 myAffectedPlane = thePlane;
0206 }
0207
0208
0209 const gp_Pln& GetAffectedPlane() const
0210 {
0211 return myAffectedPlane;
0212 }
0213
0214
0215 Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
0216
0217 DEFINE_STANDARD_RTTIEXT(XCAFDimTolObjects_GeomToleranceObject,Standard_Transient)
0218
0219 private:
0220
0221 XCAFDimTolObjects_GeomToleranceType myType;
0222 XCAFDimTolObjects_GeomToleranceTypeValue myTypeOfValue;
0223 Standard_Real myValue;
0224 XCAFDimTolObjects_GeomToleranceMatReqModif myMatReqModif;
0225 XCAFDimTolObjects_GeomToleranceZoneModif myZoneModif;
0226 Standard_Real myValueOfZoneModif;
0227 XCAFDimTolObjects_GeomToleranceModifiersSequence myModifiers;
0228 Standard_Real myMaxValueModif;
0229 gp_Ax2 myAxis;
0230 Standard_Boolean myHasAxis;
0231 gp_Ax2 myPlane;
0232 gp_Pnt myPnt;
0233 gp_Pnt myPntText;
0234 Standard_Boolean myHasPlane;
0235 Standard_Boolean myHasPnt;
0236 Standard_Boolean myHasPntText;
0237 TopoDS_Shape myPresentation;
0238 Handle(TCollection_HAsciiString) mySemanticName;
0239 Handle(TCollection_HAsciiString) myPresentationName;
0240 XCAFDimTolObjects_ToleranceZoneAffectedPlane myAffectedPlaneType;
0241 gp_Pln myAffectedPlane;
0242
0243 };
0244
0245 #endif