X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FOperationGUI%2FOperationGUI_ExtrudedFeatureDlg.cxx;h=8812cd5ee0e6d96ebf1fe0c0ab2a9541597ea2dd;hb=f312091eb5bf90096c0a8d4d0ed4be68f34fbd9b;hp=135a8532ddcceb993d69a42c180de182765c6350;hpb=73555c78ebf12a1fdb85157b8e7934ad566ae90a;p=modules%2Fgeom.git diff --git a/src/OperationGUI/OperationGUI_ExtrudedFeatureDlg.cxx b/src/OperationGUI/OperationGUI_ExtrudedFeatureDlg.cxx index 135a8532d..8812cd5ee 100644 --- a/src/OperationGUI/OperationGUI_ExtrudedFeatureDlg.cxx +++ b/src/OperationGUI/OperationGUI_ExtrudedFeatureDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -36,7 +36,6 @@ #include #include -#include // OCCT Includes #include @@ -366,14 +365,9 @@ bool OperationGUI_ExtrudedFeatureDlg::execute (ObjectList& objects) if (myGroup->PushButton3->isChecked()) angle=myGroup->SpinBox_DY->value(); - - if (myGroup->PushButton4->isChecked()) - { - aHeight = -aHeight; - angle = -angle; - } - bool isProtrusion = (myOperation == OperationGUI::BOSS); + bool isProtrusion = (myOperation == OperationGUI::BOSS); + bool isInvert = myGroup->PushButton4->isChecked(); // Hide the initial shape in order to see the modifications on the preview erase(myObject1.get(),false); @@ -381,9 +375,18 @@ bool OperationGUI_ExtrudedFeatureDlg::execute (ObjectList& objects) GEOM::GEOM_Object_var anObj = anOper->MakeDraftPrism(myObject1.get(), myObject2.get(), aHeight, angle, - isProtrusion); - if (!anObj->_is_nil()) + isProtrusion, + isInvert); + if (!anObj->_is_nil()) { + if (!IsPreview()) { + QStringList aParameters; + aParameters << myGroup->SpinBox_DX->text(); + if (myGroup->PushButton3->isChecked()) + aParameters << myGroup->SpinBox_DY->text(); + anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + } objects.push_back(anObj._retn()); + } return true; } @@ -396,3 +399,14 @@ bool OperationGUI_ExtrudedFeatureDlg::execute (ObjectList& objects) // { // GEOMBase::PublishSubObject( myObject2.get() ); // } + +//================================================================================= +// function : getSourceObjects +// purpose : virtual method to get source objects +//================================================================================= +QList OperationGUI_ExtrudedFeatureDlg::getSourceObjects() +{ + QList res; + res << myObject1 << myObject2; + return res; +}