From ecabd400f82783d0aa93a58e7768ab2b6b381354 Mon Sep 17 00:00:00 2001 From: mpa Date: Thu, 26 Mar 2015 11:08:05 +0300 Subject: [PATCH] INT PAL 0052642: Notebook variables are not dumped to script with Fillet1D, Fillet2D operations --- src/GEOM_SWIG/geomBuilder.py | 10 ++++++++++ src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx | 8 +++++++- .../TransformationGUI_ProjectionOnCylDlg.cxx | 8 ++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/GEOM_SWIG/geomBuilder.py b/src/GEOM_SWIG/geomBuilder.py index 5287a1194..e5c2bd608 100644 --- a/src/GEOM_SWIG/geomBuilder.py +++ b/src/GEOM_SWIG/geomBuilder.py @@ -9455,8 +9455,18 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen): the source shape onto a cylinder. """ # Example: see GEOM_TestAll.py + flagStartAngle = False + if isinstance(theStartAngle,str): + flagStartAngle = True + flagAngleLength = False + if isinstance(theAngleLength,str): + flagAngleLength = True theRadius, theStartAngle, theAngleLength, Parameters = ParseParameters( theRadius, theStartAngle, theAngleLength) + if flagStartAngle: + theStartAngle = theStartAngle*math.pi/180. + if flagAngleLength: + theAngleLength = theAngleLength*math.pi/180. anObj = self.TrsfOp.MakeProjectionOnCylinder(theObject, theRadius, theStartAngle, theAngleLength) RaiseIfFailed("MakeProjectionOnCylinder", self.TrsfOp) diff --git a/src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx b/src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx index dbbae0297..2de8fbc40 100644 --- a/src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx +++ b/src/OperationGUI/OperationGUI_Fillet1d2dDlg.cxx @@ -411,8 +411,14 @@ bool OperationGUI_Fillet1d2dDlg::execute (ObjectList& objects) anOper->MakeFillet1D(myShape, getRadius(), aListOfIndexes, GroupVertexes->CheckButton1->isChecked()) : anOper->MakeFillet2D(myShape, getRadius(), aListOfIndexes); - if (!anObj->_is_nil()) + if (!anObj->_is_nil()) { + if (!IsPreview()) { + QStringList aParameters; + aParameters << GroupVertexes->SpinBox_DX->text(); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); + } objects.push_back(anObj._retn()); + } return true; } diff --git a/src/TransformationGUI/TransformationGUI_ProjectionOnCylDlg.cxx b/src/TransformationGUI/TransformationGUI_ProjectionOnCylDlg.cxx index d3efac641..7c5dd6176 100644 --- a/src/TransformationGUI/TransformationGUI_ProjectionOnCylDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_ProjectionOnCylDlg.cxx @@ -353,6 +353,14 @@ bool TransformationGUI_ProjectionOnCylDlg::execute (ObjectList& objects) (myObj, aRadius, aStartAngle, aLengthAngle); if (!anObj->_is_nil()) { + if (!IsPreview()) { + QStringList aParameters; + aParameters << myRadiusSpin->text(); + aParameters << myStartAngleSpin->text(); + if (myUseAngleLen->isChecked()) + aParameters << myAngleLenSpin->text(); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); + } objects.push_back(anObj._retn()); } -- 2.39.2