// TRUE to construct a modal dialog.
//=================================================================================
GenerationGUI_FillingDlg::GenerationGUI_FillingDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
- bool modal, Qt::WindowFlags fl )
+ bool modal, Qt::WindowFlags fl )
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
{
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_FILLING" ) ) );
GroupPoints->TextLabel5->setText( tr( "GEOM_FILLING_MAX_DEG" ) );
GroupPoints->TextLabel6->setText( tr( "GEOM_FILLING_TOL_3D" ) );
GroupPoints->CheckBox1->setText( tr( "GEOM_FILLING_APPROX" ) );
+ GroupPoints->CheckBox2->setText( tr( "GEOM_FILLING_USEORI" ) );
GroupPoints->PushButton1->setIcon( image1 );
GroupPoints->LineEdit1->setReadOnly( true );
myTol3D = 0.0001;
myTol2D = 0.0001;
myNbIter = 0;
+ myIsUseOri = false;
myIsApprox = false;
myOkCompound = false;
connect( GroupPoints->SpinBox4, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
connect( GroupPoints->SpinBox5, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
- connect( GroupPoints->CheckBox1, SIGNAL( stateChanged( int ) ), this, SLOT( ApproxChanged() ) );
+ connect( GroupPoints->CheckBox1, SIGNAL( stateChanged( int ) ),
+ this, SLOT( ApproxChanged() ) );
+
+ connect( GroupPoints->CheckBox2, SIGNAL( stateChanged( int ) ),
+ this, SLOT( UseOriChanged() ) );
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), this, SLOT( SetDoubleSpinBoxStep( double ) ) );
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
- SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
+ SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
initName( tr( "GEOM_FILLING" ) );
resize(100,100);
if (GEOMBase::GetShape(aSelectedObject, S) && S.ShapeType() == TopAbs_COMPOUND) {
// myCompound should be a compound of edges
for (TopoDS_Iterator it (S); it.More(); it.Next())
- if (it.Value().ShapeType() != TopAbs_EDGE)
+ if ( it.Value().ShapeType() != TopAbs_EDGE &&
+ it.Value().ShapeType() != TopAbs_WIRE )
return;
myCompound = aSelectedObject;
myOkCompound = true;
{
GEOMBase_Skeleton::ActivateThisDialog();
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
- SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
+ SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
globalSelection( GEOM_COMPOUND );
displayPreview();
}
displayPreview();
}
+//=================================================================================
+// function : UseOriChanged()
+// purpose :
+//=================================================================================
+void GenerationGUI_FillingDlg::UseOriChanged()
+{
+ myIsUseOri = GroupPoints->CheckBox2->isChecked();
+ displayPreview();
+}
+
//=================================================================================
// function : ApproxChanged()
// purpose :
displayPreview();
}
+
//=================================================================================
// function : createOperation
// purpose :
//=================================================================================
bool GenerationGUI_FillingDlg::execute( ObjectList& objects )
{
- GEOM::GEOM_Object_var anObj;
-
- anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation() )->MakeFilling(
- myCompound, myMinDeg, myMaxDeg, myTol2D, myTol3D, myNbIter, myIsApprox );
+ GEOM::GEOM_I3DPrimOperations_var anOper =
+ GEOM::GEOM_I3DPrimOperations::_narrow(getOperation());
+ GEOM::GEOM_Object_var anObj =
+ anOper->MakeFilling( myCompound, myMinDeg, myMaxDeg, myTol2D, myTol3D,
+ myNbIter, myIsUseOri, myIsApprox );
if ( !anObj->_is_nil() )
{
if ( !IsPreview() )
aParameters << GroupPoints->SpinBox3->text();
aParameters << GroupPoints->SpinBox4->text();
aParameters << GroupPoints->SpinBox5->text();
- anObj->SetParameters(GeometryGUI::JoinObjectParameters(aParameters));
+ anObj->SetParameters(aParameters.join(":").toLatin1().constData());
}
objects.push_back( anObj._retn() );
}