From: skl Date: Wed, 19 Jul 2006 11:56:40 +0000 (+0000) Subject: Corrections for bug IPAL12999. X-Git-Tag: V3_2_1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8ca4c231a831ee9adb7c7d3db29a8f34b3f9bde1;p=modules%2Fgeom.git Corrections for bug IPAL12999. --- diff --git a/src/GEOM/GEOM_Object.cxx b/src/GEOM/GEOM_Object.cxx index e36ddc909..ecb9f84a3 100644 --- a/src/GEOM/GEOM_Object.cxx +++ b/src/GEOM/GEOM_Object.cxx @@ -272,7 +272,10 @@ bool GEOM_Object::IsMainShape() Handle(GEOM_Function) GEOM_Object::AddFunction(const Standard_GUID& theGUID, int theFunctionType) { Standard_Integer nb = GetNbFunctions(); - if(nb == 1 && theGUID == GetSubShapeID()) return NULL; //It's impossible to add a function to sub shape + + //if(nb == 1 && theGUID == GetSubShapeID()) return NULL; //It's impossible to add a function to sub shape + // change by skl (+srn) for IPAL12999 + if(nb == 1 && GetFunction(1)->GetDriverGUID() == GetSubShapeID()) return NULL; //It's impossible to add a function to sub shape nb++; TDF_Label aChild = FUNCTION_LABEL(nb); diff --git a/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx b/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx index 00abf47d7..201a71a31 100644 --- a/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx @@ -788,6 +788,11 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::ChangeOrientation (Handle(GEOM_ if (theObject.IsNull()) return NULL; + if (!theObject->IsMainShape()) { + SetErrorCode("Sub shape cannot be transformed - need to create a copy"); + return NULL; + } + Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction(); if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed