-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 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
// 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
myEditCurrentArgument = GroupVecH->LineEdit2;
GroupVecH->PushButton1->setDown(false);
GroupVecH->LineEdit1->setEnabled(false);
- localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE);
+ localSelection(TopAbs_EDGE);
}
else if (send == Group2Points->PushButton1) {
myEditCurrentArgument = Group2Points->LineEdit1;
Group2Points->PushButton3->setDown(false);
Group2Points->LineEdit1->setEnabled(false);
Group2Points->LineEdit3->setEnabled(false);
- localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
+ localSelection(TopAbs_VERTEX);
}
else if (send == Group2Points->PushButton3) {
myEditCurrentArgument = Group2Points->LineEdit3;
Group2Points->PushButton2->setDown(false);
Group2Points->LineEdit1->setEnabled(false);
Group2Points->LineEdit2->setEnabled(false);
- localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX);
+ localSelection(TopAbs_VERTEX);
}
else if (send == GroupDXDYDZ->PushButton1) {
myEditCurrentArgument = GroupDXDYDZ->LineEdit1;
//=================================================================================
GEOM::GEOM_IOperations_ptr GenerationGUI_PrismDlg::createOperation()
{
- return getGeomEngine()->GetI3DPrimOperations(getStudyId());
+ return getGeomEngine()->GetI3DPrimOperations();
}
//=================================================================================
// function : onChangeDirection(bool)
// purpose :
//=================================================================================
-void GenerationGUI_PrismDlg::onChangeDirection(bool isChecked)
+void GenerationGUI_PrismDlg::onChangeDirection(bool /*isChecked*/)
{
processPreview();
}
if (!anObj->_is_nil() && !IsPreview()) {
aParameters << GroupVecH->SpinBox_DX->text();
- anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
break;
case 1:
aParameters << GroupDXDYDZ->SpinBox_DX->text();
aParameters << GroupDXDYDZ->SpinBox_DY->text();
aParameters << GroupDXDYDZ->SpinBox_DZ->text();
- anObj->SetParameters(aParameters.join(":").toLatin1().constData());
+ anObj->SetParameters(aParameters.join(":").toUtf8().constData());
}
break;
}
if(GroupThickening->checkButton1->isChecked())
{
double aThickness = GroupThickening->SpinBox_DX->value();
- if (GroupThickening->checkButton2->isChecked())
- {
- aThickness = -aThickness;
- }
-
- anObj = anotherOper->MakeThickening(anObj, aThickness, /*copy=*/false);
+ bool isInside = GroupThickening->checkButton2->isChecked();
+
+ GEOM::ListOfLong_var anArray = new GEOM::ListOfLong;
+
+ anObj = anotherOper->MakeThickening
+ (anObj, anArray, aThickness, /*copy=*/false, isInside);
+
+ if (!anObj->_is_nil() && !IsPreview())
+ anObj->SetParameters(GroupThickening->SpinBox_DX->text().toUtf8().constData());
}
if (!anObj->_is_nil())
{
return myBaseObjects.count() > 1;
}
+
+//=================================================================================
+// function : getSourceObjects
+// purpose : virtual method to get source objects
+//=================================================================================
+QList<GEOM::GeomObjPtr> GenerationGUI_PrismDlg::getSourceObjects()
+{
+ QList<GEOM::GeomObjPtr> res(myBaseObjects);
+ res << myVec << myPoint1 << myPoint2 ;
+ return res;
+}