-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 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
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// GEOM GEOMGUI : GUI for Geometry component
// File : TransformationGUI_MultiRotationDlg.cxx
// Author : Damien COQUERET, Open CASCADE S.A.S.
initSpinBox(GroupPoints->SpinBox_DX, 1, 999, SpecificStep2);
GroupPoints->SpinBox_DX->setValue(myNbTimes1);
- initSpinBox(GroupDimensions->SpinBox_DX1, COORD_MIN, COORD_MAX, SpecificStep1, 10); // VSR: TODO: DBL_DIGITS_DISPLAY
+ initSpinBox(GroupDimensions->SpinBox_DX1, COORD_MIN, COORD_MAX, SpecificStep1, "angle_precision" );
initSpinBox(GroupDimensions->SpinBox_DY1, 1, 999, SpecificStep2);
- initSpinBox(GroupDimensions->SpinBox_DX2, COORD_MIN, COORD_MAX, step, 10); // VSR: TODO: DBL_DIGITS_DISPLAY
+ initSpinBox(GroupDimensions->SpinBox_DX2, COORD_MIN, COORD_MAX, step,"length_precision" );
initSpinBox(GroupDimensions->SpinBox_DY2, 1, 999, SpecificStep2);
GroupDimensions->SpinBox_DX1->setValue(myAng);
GroupDimensions->SpinBox_DY1->setValue(myNbTimes1);
myBase = myVector = GEOM::GEOM_Object::_nil();
+ mainFrame()->GroupBoxPublish->show();
+
// signals and slots connections
connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk()));
connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
//=================================================================================
void TransformationGUI_MultiRotationDlg::SetDoubleSpinBoxStep (double step)
{
- GroupPoints->SpinBox_DX->setSingleStep((int)step);
- GroupDimensions->SpinBox_DX1->setSingleStep(step);
- GroupDimensions->SpinBox_DY1->setSingleStep((int)step);
GroupDimensions->SpinBox_DX2->setSingleStep(step);
- GroupDimensions->SpinBox_DY2->setSingleStep((int)step);
+
+ // san: Commented so as not to override specific step settings
+ //GroupPoints->SpinBox_DX->setSingleStep((int)step);
+ //GroupDimensions->SpinBox_DX1->setSingleStep(step);
+ //GroupDimensions->SpinBox_DY1->setSingleStep((int)step);
+ //GroupDimensions->SpinBox_DY2->setSingleStep((int)step);
}
//=================================================================================
//Find SubShape Object in Father
GEOM::GEOM_Object_var aFindedObject = findObjectInFather(aSelectedObject, aName);
- if (aFindedObject == GEOM::GEOM_Object::_nil()) { // Object not found in study
+ if (aFindedObject->_is_nil()) { // Object not found in study
GEOM::GEOM_IShapesOperations_var aShapesOp =
getGeomEngine()->GetIShapesOperations(getStudyId());
myVector = aShapesOp->GetSubShape(aSelectedObject, anIndex);
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
- this, SLOT( SelectionIntoArgument() ) );
+ this, SLOT( SelectionIntoArgument() ) );
ConstructorsClicked( getConstructorId() );
}
GEOM::GEOM_Object_var anObj;
QStringList aParameters;
+ GEOM::GEOM_ITransformOperations_var anOper = GEOM::GEOM_ITransformOperations::_narrow(getOperation());
+
switch (getConstructorId()) {
case 0:
if (!CORBA::is_nil(myBase) && !CORBA::is_nil(myVector)) {
- anObj = GEOM::GEOM_ITransformOperations::_narrow(getOperation())->
- MultiRotate1D(myBase, myVector, myNbTimes1);
+ anObj = anOper->MultiRotate1D(myBase, myVector, myNbTimes1);
if(!IsPreview())
aParameters<<GroupPoints->SpinBox_DX->text();
res = true;
break;
case 1:
if (!CORBA::is_nil(myBase) && !CORBA::is_nil(myVector)) {
- anObj = GEOM::GEOM_ITransformOperations::_narrow(getOperation())->
- MultiRotate2D(myBase, myVector, myAng, myNbTimes1, myStep, myNbTimes2);
+ anObj = anOper->MultiRotate2D(myBase, myVector, myAng, myNbTimes1, myStep, myNbTimes2);
if(!IsPreview()) {
aParameters<<GroupDimensions->SpinBox_DX1->text();
aParameters<<GroupDimensions->SpinBox_DY1->text();
if (!anObj->_is_nil()) {
if(!IsPreview())
- anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+ anObj->SetParameters(aParameters.join(":").toLatin1().constData());
objects.push_back(anObj._retn());
}
}
addSubshapesToFather(objMap);
}
+
+//=================================================================================
+// function : restoreSubShapes
+// purpose :
+//=================================================================================
+void TransformationGUI_MultiRotationDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
+ SALOMEDS::SObject_ptr theSObject)
+{
+ if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
+ // we pass here the first operation argument (object) through the list of arguments
+ // because the rotation operation place its arguments in the data structure in another order,
+ // and we need to point the first argument directly
+ GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO;
+ anArgs->length(1);
+ anArgs[0] = myBase;
+ getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
+ /*theFindMethod=*/GEOM::FSM_Transformed,
+ /*theInheritFirstArg=*/true,
+ mainFrame()->CheckBoxAddPrefix->isChecked());
+ }
+}