Salome HOME
INT PAL 0052642: Notebook variables are not dumped to script with Fillet1D, Fillet2D...
[modules/geom.git] / src / GEOMImpl / GEOMImpl_OffsetDriver.cxx
index 495d6294ed614e4e2b57a9d14c936d28bc9bc167..da393a67edf988bda4bff539398ff33a0b79f6ac 100644 (file)
@@ -73,8 +73,12 @@ Standard_Integer GEOMImpl_OffsetDriver::Execute(TFunction_Logbook& log) const
   Handle(GEOM_Function) aRefShape = aCI.GetShape();
   TopoDS_Shape aShapeBase = aRefShape->GetValue();
   Standard_Real anOffset = aCI.GetValue();
+  Standard_Boolean isInside = aCI.GetParam();
   Standard_Real aTol = Precision::Confusion();
 
+  if (isInside)
+    anOffset = -anOffset;
+
   if (Abs(anOffset) < aTol) {
     TCollection_AsciiString aMsg ("Absolute value of offset can not be less than the tolerance value (");
     aMsg += TCollection_AsciiString(aTol);
@@ -208,7 +212,7 @@ GetCreationInformation(std::string&             theOperationName,
   case OFFSET_THICKENING_COPY:
     theOperationName = "MakeThickening";
     AddParam( theParams, "Object", aCI.GetShape() );
-    AddParam( theParams, "Offset", aCI.GetValue() );
+    AddParam( theParams, "Offset", aCI.GetParam() ? -aCI.GetValue() : aCI.GetValue() );
     {
       Handle(TColStd_HArray1OfInteger) aFacesIDs = aCI.GetFaceIDs();