From: jfa Date: Wed, 3 Oct 2012 12:37:29 +0000 (+0000) Subject: Mantis issue 0021525: EDF GEOM: Tolerance deggradation issue and partition failure X-Git-Tag: V6_6_0a1~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=39e0fe04d98838842f378b3a882ade7f2d053c0b;p=modules%2Fgeom.git Mantis issue 0021525: EDF GEOM: Tolerance deggradation issue and partition failure --- diff --git a/src/GEOMImpl/GEOMImpl_PipeDriver.cxx b/src/GEOMImpl/GEOMImpl_PipeDriver.cxx index e3c734a10..21475ee42 100644 --- a/src/GEOMImpl/GEOMImpl_PipeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PipeDriver.cxx @@ -2222,6 +2222,11 @@ static TopoDS_Shape CreatePipeBiNormalAlongVector(const TopoDS_Wire& aWirePath, Standard_NullObject::Raise("MakePipe aborted : null base argument"); } + // Make copy to prevent modifying of base object: 0021525 + BRepBuilderAPI_Copy Copy (aShapeBase); + if (Copy.IsDone()) + aShapeBase = Copy.Shape(); + TopoDS_Shape aProf; if (aShapeBase.ShapeType() == TopAbs_VERTEX) { aProf = aShapeBase; @@ -2233,14 +2238,14 @@ static TopoDS_Shape CreatePipeBiNormalAlongVector(const TopoDS_Wire& aWirePath, aProf = aShapeBase; } else if (aShapeBase.ShapeType() == TopAbs_FACE) { - TopExp_Explorer wexp(aShapeBase,TopAbs_WIRE); + TopExp_Explorer wexp (aShapeBase,TopAbs_WIRE); aProf = wexp.Current(); } else { Standard_TypeMismatch::Raise ("MakePipe aborted : invalid type of base"); } - BRepOffsetAPI_MakePipeShell PipeBuilder(aWirePath); + BRepOffsetAPI_MakePipeShell PipeBuilder (aWirePath); PipeBuilder.Add(aProf); if (aShapeVec.IsNull()) {