From 6fbe1acba90fadae771c7b442d2c531589643cd0 Mon Sep 17 00:00:00 2001 From: jfa Date: Wed, 26 Aug 2020 15:04:50 +0300 Subject: [PATCH] bos #19940: [CEA] Wrong dump offset if join by pipes is unticked. --- src/GEOMImpl/GEOMImpl_ITransformOperations.cxx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx b/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx index 7a414ba08..7d560fc63 100644 --- a/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx @@ -1075,8 +1075,12 @@ GEOMImpl_ITransformOperations::OffsetShape (Handle(GEOM_Object) theObject, } //Make a Python command - GEOM::TPythonDump(aFunction) << "geompy.Offset(" - << theObject << ", " << theOffset << ")"; + if (theJoinByPipes) + GEOM::TPythonDump(aFunction) << "geompy.Offset(" + << theObject << ", " << theOffset << ")"; + else + GEOM::TPythonDump(aFunction) << theObject << " = geompy.MakeOffsetIntersectionJoin(" + << theObject << ", " << theOffset << ")"; SetErrorCode(OK); return theObject; @@ -1129,8 +1133,12 @@ GEOMImpl_ITransformOperations::OffsetShapeCopy( Handle(GEOM_Object) theObject, } //Make a Python command - GEOM::TPythonDump(aFunction) << aCopy << " = geompy.MakeOffset(" - << theObject << ", " << theOffset << ")"; + if (theJoinByPipes) + GEOM::TPythonDump(aFunction) << aCopy << " = geompy.MakeOffset(" + << theObject << ", " << theOffset << ")"; + else + GEOM::TPythonDump(aFunction) << aCopy << " = geompy.MakeOffsetIntersectionJoin(" + << theObject << ", " << theOffset << ")"; SetErrorCode(OK); return aCopy;