From ce0e0427ad8861068ffc677ff7bc49302947c828 Mon Sep 17 00:00:00 2001 From: dmv Date: Thu, 11 Mar 2010 10:16:20 +0000 Subject: [PATCH] 0020766: EDF 1320 GEOM: Bad result of GEOM operations --- src/GEOMImpl/GEOMImpl_PipeDriver.cxx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) 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 -- 2.39.2