From 994771fd7d312e0652d9f98db511b17f7fa8e611 Mon Sep 17 00:00:00 2001 From: dmv Date: Wed, 13 Oct 2010 14:45:24 +0000 Subject: [PATCH] 0021031: EDF 1646 GEOM: Modify Location leads to Position driver failed --- src/GEOMImpl/GEOMImpl_ITransformOperations.cxx | 5 ++++- src/TransformationGUI/TransformationGUI_PositionDlg.cxx | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx b/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx index 744bdc200..259e42e35 100644 --- a/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx @@ -1236,6 +1236,9 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionShape Handle(GEOM_Function) anOriginal = theObject->GetLastFunction(); if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be set in position + Handle(GEOM_Function) aSrcF; + if (!theStartLCS.IsNull()) aSrcF = theStartLCS->GetLastFunction(); + //Add a Position function Standard_Integer aType = POSITION_SHAPE; if (theStartLCS.IsNull()) aType = POSITION_SHAPE_FROM_GLOBAL; @@ -1252,7 +1255,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionShape aTI.SetShape(anOriginal); aTI.SetEndLCS(theEndLCS->GetLastFunction()); if (!theStartLCS.IsNull()) - aTI.SetStartLCS(theStartLCS->GetLastFunction()); + aTI.SetStartLCS(aSrcF); //Compute the Position try { diff --git a/src/TransformationGUI/TransformationGUI_PositionDlg.cxx b/src/TransformationGUI/TransformationGUI_PositionDlg.cxx index ccbc45ab3..13ef19d78 100644 --- a/src/TransformationGUI/TransformationGUI_PositionDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_PositionDlg.cxx @@ -633,7 +633,6 @@ bool TransformationGUI_PositionDlg::execute (ObjectList& objects) case 1: { for (int i = 0; i < myObjects.length(); i++) { - if (toCreateCopy) anObj = toCreateCopy ? anOper->PositionShapeCopy(myObjects[i], myStartLCS, myEndLCS) : anOper->PositionShape(myObjects[i], myStartLCS, myEndLCS); -- 2.39.2