-// 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 : OperationGUI_ArchimedeDlg.cxx
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
double SpecificStep1 = 0.1;
double SpecificStep2 = 0.01;
/* min, max, myStep and decimals for spin boxes & initial values */
- initSpinBox( GroupPoints->SpinBox_DX, 0.001, COORD_MAX, myStep, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
- initSpinBox( GroupPoints->SpinBox_DY, 0.001, COORD_MAX, SpecificStep1, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
- initSpinBox( GroupPoints->SpinBox_DZ, 0.001, COORD_MAX, SpecificStep2, 3 ); // VSR: TODO: DBL_DIGITS_DISPLAY
+ initSpinBox( GroupPoints->SpinBox_DX, 0.001, COORD_MAX, myStep, "weight_precision" );
+ initSpinBox( GroupPoints->SpinBox_DY, 0.001, COORD_MAX, SpecificStep1, "density_precision" );
+ initSpinBox( GroupPoints->SpinBox_DZ, 0.001, COORD_MAX, SpecificStep2, "parametric_precision" );
GroupPoints->SpinBox_DX->setValue( 100.0 );
GroupPoints->SpinBox_DY->setValue( 1.0 );
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) );
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
- this, SLOT( SelectionIntoArgument() ) );
+ this, SLOT( SelectionIntoArgument() ) );
initName( tr( "GEOM_ARCHIMEDE" ) );
void OperationGUI_ArchimedeDlg::SetDoubleSpinBoxStep( double step )
{
GroupPoints->SpinBox_DX->setSingleStep(step);
- GroupPoints->SpinBox_DY->setSingleStep(step);
- GroupPoints->SpinBox_DZ->setSingleStep(step);
+
+ // san: Commented so as not to override specific step settings
+ //GroupPoints->SpinBox_DY->setSingleStep(step);
+ //GroupPoints->SpinBox_DZ->setSingleStep(step);
}
//=================================================================================
if (aSelList.Extent() != 1)
return;
- Standard_Boolean testResult = Standard_False;
- myShape = GEOMBase::ConvertIOinGEOMObject(aSelList.First(), testResult);
+ myShape = GEOMBase::ConvertIOinGEOMObject( aSelList.First() );
- if (!testResult || myShape->_is_nil() || !GEOMBase::IsShape(myShape)) {
+ if ( !GEOMBase::IsShape(myShape) ) {
myShape = GEOM::GEOM_Object::_nil();
return;
}
GEOMBase_Skeleton::ActivateThisDialog();
globalSelection( GEOM_ALLSHAPES );
connect( myGeomGUI->getApp()->selectionMgr(),
- SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
+ SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
}
//=================================================================================
bool OperationGUI_ArchimedeDlg::execute( ObjectList& objects )
{
- GEOM::GEOM_Object_var anObj;
-
double aWeight = GroupPoints->SpinBox_DX->value();
double aWaterDensity = GroupPoints->SpinBox_DY->value();
double aMeshDeflection = GroupPoints->SpinBox_DZ->value();
- anObj = GEOM::GEOM_ILocalOperations::_narrow(
- getOperation() )->MakeArchimede( myShape, aWeight, aWaterDensity, aMeshDeflection );
+ GEOM::GEOM_ILocalOperations_var anOper = GEOM::GEOM_ILocalOperations::_narrow(getOperation());
+ GEOM::GEOM_Object_var anObj = anOper->MakeArchimede( myShape, aWeight, aWaterDensity, aMeshDeflection );
if ( !anObj->_is_nil() )
{
aParameters << GroupPoints->SpinBox_DX->text();
aParameters << GroupPoints->SpinBox_DY->text();
aParameters << GroupPoints->SpinBox_DZ->text();
- anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+ anObj->SetParameters(aParameters.join(":").toLatin1().constData());
}
objects.push_back( anObj._retn() );
}