From: dmv Date: Thu, 11 Mar 2010 10:16:20 +0000 (+0000) Subject: 0020766: EDF 1320 GEOM: Bad result of GEOM operations X-Git-Tag: V5_1_4a1~42 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ce0e0427ad8861068ffc677ff7bc49302947c828;p=modules%2Fgeom.git 0020766: EDF 1320 GEOM: Bad result of GEOM operations --- diff --git a/src/GEOMImpl/GEOMImpl_PipeDriver.cxx b/src/GEOMImpl/GEOMImpl_PipeDriver.cxx index e35a5119c..09042804c 100644 --- a/src/GEOMImpl/GEOMImpl_PipeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PipeDriver.cxx @@ -51,6 +51,7 @@ #include #include #include +#include #include #include @@ -1964,7 +1965,12 @@ Standard_Integer GEOMImpl_PipeDriver::Execute(TFunction_Logbook& log) const if (aType == PIPE_BASE_PATH) { Handle(GEOM_Function) aRefBase = aCI->GetBase(); - TopoDS_Shape aShapeBase = aRefBase->GetValue(); + TopoDS_Shape aShapeBase; + + // Make copy to prevent modifying of base object 0020766 : EDF 1320 + BRepBuilderAPI_Copy Copy(aRefBase->GetValue()); + if( Copy.IsDone() ) + aShapeBase = Copy.Shape(); if (aShapeBase.IsNull()) { if(aCI) delete aCI; @@ -2002,9 +2008,16 @@ Standard_Integer GEOMImpl_PipeDriver::Execute(TFunction_Logbook& log) const Handle(GEOM_Function) aRefBase = Handle(GEOM_Function)::DownCast(anItem); if(aRefBase.IsNull()) continue; - TopoDS_Shape aShapeBase = aRefBase->GetValue(); - if(aShapeBase.IsNull()) + + if(aRefBase->GetValue().IsNull()) continue; + + // Make copy to prevent modifying of base object 0020766 : EDF 1320 + TopoDS_Shape aShapeBase; + BRepBuilderAPI_Copy Copy(aRefBase->GetValue())); + if( Copy.IsDone() ) + aShapeBase = Copy.Shape(); + TopAbs_ShapeEnum aTypeBase = aShapeBase.ShapeType(); //if for section was specified face with a few wires then a few