From ad2ef2599af8ee7c63e4a724108cd9eeb4311ff5 Mon Sep 17 00:00:00 2001 From: skl Date: Wed, 11 Nov 2020 13:27:33 +0300 Subject: [PATCH] 0029855: Data Exchange, XCAF GD&T - PMI objects copy constructors ignore presentation Add all missing values. --- .../XCAFDimTolObjects_DatumObject.cxx | 8 +++++++- .../XCAFDimTolObjects_DatumObject.hxx | 4 ++-- .../XCAFDimTolObjects_DimensionObject.cxx | 10 ++++++++++ .../XCAFDimTolObjects_GeomToleranceObject.cxx | 2 ++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/XCAFDimTolObjects/XCAFDimTolObjects_DatumObject.cxx b/src/XCAFDimTolObjects/XCAFDimTolObjects_DatumObject.cxx index 56728584d8..676201969b 100644 --- a/src/XCAFDimTolObjects/XCAFDimTolObjects_DatumObject.cxx +++ b/src/XCAFDimTolObjects/XCAFDimTolObjects_DatumObject.cxx @@ -42,17 +42,23 @@ XCAFDimTolObjects_DatumObject::XCAFDimTolObjects_DatumObject(const Handle(XCAFDi myModifierWithValue = theObj->myModifierWithValue; myValueOfModifier = theObj->myValueOfModifier; myDatumTarget = theObj->myDatumTarget; + myPosition = theObj->myPosition; myIsDTarget = theObj->myIsDTarget; myIsValidDT = theObj->myIsValidDT; - myAxis = theObj->myAxis; myDTargetType = theObj->myDTargetType; + myLength = theObj->myLength; + myWidth = theObj->myWidth; + myDatumTargetNumber = theObj->myDatumTargetNumber; + myAxis = theObj->myAxis; myPlane = theObj->myPlane; myPnt= theObj->myPnt; myPntText= theObj->myPntText; myHasPlane = theObj->myHasPlane; myHasPnt = theObj->myHasPnt; myHasPntText = theObj->myHasPntText; + myPresentation = theObj->myPresentation; mySemanticName = theObj->mySemanticName; + myPresentationName = theObj->myPresentationName; } //======================================================================= diff --git a/src/XCAFDimTolObjects/XCAFDimTolObjects_DatumObject.hxx b/src/XCAFDimTolObjects/XCAFDimTolObjects_DatumObject.hxx index b1eb5343ef..c0e6dfc41f 100644 --- a/src/XCAFDimTolObjects/XCAFDimTolObjects_DatumObject.hxx +++ b/src/XCAFDimTolObjects/XCAFDimTolObjects_DatumObject.hxx @@ -203,7 +203,7 @@ public: DEFINE_STANDARD_RTTIEXT(XCAFDimTolObjects_DatumObject,Standard_Transient) -private: +private: Handle(TCollection_HAsciiString) myName; XCAFDimTolObjects_DatumModifiersSequence myModifiers; @@ -214,10 +214,10 @@ private: Standard_Boolean myIsDTarget; Standard_Boolean myIsValidDT; XCAFDimTolObjects_DatumTargetType myDTargetType; - gp_Ax2 myAxis; Standard_Real myLength; Standard_Real myWidth; Standard_Integer myDatumTargetNumber; + gp_Ax2 myAxis; gp_Ax2 myPlane; gp_Pnt myPnt; gp_Pnt myPntText; diff --git a/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.cxx b/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.cxx index f810bf9940..2720ad7140 100644 --- a/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.cxx +++ b/src/XCAFDimTolObjects/XCAFDimTolObjects_DimensionObject.cxx @@ -58,6 +58,16 @@ XCAFDimTolObjects_DimensionObject::XCAFDimTolObjects_DimensionObject(const Handl myPlane = theObj->myPlane; myHasPntText = theObj->myHasPntText; mySemanticName = theObj->mySemanticName; + myPresentation = theObj->myPresentation; + myPresentationName = theObj->myPresentationName; + for (int i = 0; i < theObj->myDescriptions.Length(); i++) + { + myDescriptions.Append(theObj->myDescriptions(i)); + } + for (int i = 0; i < theObj->myDescriptionNames.Length(); i++) + { + myDescriptionNames.Append(theObj->myDescriptionNames(i)); + } } //======================================================================= diff --git a/src/XCAFDimTolObjects/XCAFDimTolObjects_GeomToleranceObject.cxx b/src/XCAFDimTolObjects/XCAFDimTolObjects_GeomToleranceObject.cxx index 88bd42fdcc..0537a64b88 100644 --- a/src/XCAFDimTolObjects/XCAFDimTolObjects_GeomToleranceObject.cxx +++ b/src/XCAFDimTolObjects/XCAFDimTolObjects_GeomToleranceObject.cxx @@ -55,6 +55,8 @@ XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject(con mySemanticName = theObj->mySemanticName; myAffectedPlaneType = theObj->myAffectedPlaneType; myAffectedPlane = theObj->myAffectedPlane; + myPresentation = theObj->myPresentation; + myPresentationName = theObj->myPresentationName; } //=======================================================================