X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FRepairGUI%2FRepairGUI_RemoveExtraEdgesDlg.cxx;h=16c05ad481cd0a0eac364c86413e6c30349022fb;hb=418a6b7ea1b96f58e55056d75484f8454a5eac71;hp=850926fe63390ac799b15212a3670efce6bce2db;hpb=392885c1a8d50369708bbe5e6b44033ed8b8ba51;p=modules%2Fgeom.git diff --git a/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx b/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx index 850926fe6..16c05ad48 100644 --- a/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx +++ b/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx @@ -22,7 +22,7 @@ // GEOM RepairGUI : GUI for Geometry component // File : RepairGUI_RemoveExtraEdgesDlg.cxx // Author : Michael Zorin, Open CASCADE S.A.S. -// + #include "RepairGUI_RemoveExtraEdgesDlg.h" #include @@ -63,12 +63,15 @@ RepairGUI_RemoveExtraEdgesDlg::RepairGUI_RemoveExtraEdgesDlg( GeometryGUI* theGe mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); mainFrame()->RadioButton3->close(); - GroupPoints = new DlgRef_1Sel( centralWidget() ); + GroupPoints = new DlgRef_1Sel1Check( centralWidget() ); + GroupPoints->GroupBox1->setTitle( tr( "GEOM_REMOVE_EXTRA_EDGES" ) ); GroupPoints->TextLabel1->setText( tr( "GEOM_SELECTED_SHAPE" ) ); GroupPoints->PushButton1->setIcon( image1 ); GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->CheckButton1->setText( tr( "GEOM_RMEE_UNION_FACES" ) ); + QVBoxLayout* layout = new QVBoxLayout( centralWidget() ); layout->setMargin( 0 ); layout->setSpacing( 6 ); layout->addWidget( GroupPoints ); @@ -101,6 +104,8 @@ void RepairGUI_RemoveExtraEdgesDlg::Init() myOkObject = false; + GroupPoints->CheckButton1->setChecked( false ); + activateSelection(); mainFrame()->GroupBoxPublish->show(); @@ -116,6 +121,7 @@ void RepairGUI_RemoveExtraEdgesDlg::Init() this, SLOT( SelectionIntoArgument() ) ); initName( tr( "REMOVE_EXTRA_EDGES_NEW_OBJ_NAME" ) ); + resize(100,100); } @@ -278,11 +284,15 @@ bool RepairGUI_RemoveExtraEdgesDlg::isValid( QString& msg ) bool RepairGUI_RemoveExtraEdgesDlg::execute( ObjectList& objects ) { GEOM::GEOM_Object_var anObj; - - anObj = GEOM::GEOM_IBlocksOperations::_narrow( getOperation() )->RemoveExtraEdges( myObject ); - - if ( !anObj->_is_nil() ) - objects.push_back( anObj._retn() ); + + int nbFacesOptimum = -1; // -1 means do not union faces + if (GroupPoints->CheckButton1->isChecked()) + nbFacesOptimum = 0; // 0 means union all faces, that possible + GEOM::GEOM_IBlocksOperations_var anOper = GEOM::GEOM_IBlocksOperations::_narrow(getOperation()); + anObj = anOper->RemoveExtraEdges(myObject, nbFacesOptimum); + + if (!anObj->_is_nil()) + objects.push_back(anObj._retn()); return true; }