0022540: EDF 2857 GEOM : problem to generate a face

This commit is contained in:
skv 2014-11-07 10:03:52 +03:00
parent 3592a48619
commit a4c91f0893
2 changed files with 23 additions and 14 deletions

View File

@ -106,10 +106,7 @@ void BuildGUI_FaceDlg::Init()
GroupWire->CheckButton1->setChecked( true );
myWires.clear();
TColStd_MapOfInteger aMap;
aMap.Add( GEOM_EDGE );
aMap.Add( GEOM_WIRE );
globalSelection( aMap );
setGlobalSelection();
/* signals and slots connections */
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
@ -123,6 +120,23 @@ void BuildGUI_FaceDlg::Init()
SelectionIntoArgument();
}
//=================================================================================
// function : setGlobalSelection
// purpose :
//=================================================================================
void BuildGUI_FaceDlg::setGlobalSelection()
{
TColStd_MapOfInteger aMap;
aMap.Add(GEOM_EDGE);
aMap.Add(GEOM_WIRE);
aMap.Add(GEOM_FACE);
aMap.Add(GEOM_SHELL);
aMap.Add(GEOM_SOLID);
aMap.Add(GEOM_COMPOUND);
globalSelection(aMap);
}
//=================================================================================
// function : ClickOnOk()
@ -159,7 +173,8 @@ void BuildGUI_FaceDlg::SelectionIntoArgument()
myEditCurrentArgument->setText( "" );
QList<TopAbs_ShapeEnum> types;
types << TopAbs_EDGE << TopAbs_WIRE;
types << TopAbs_EDGE << TopAbs_WIRE << TopAbs_FACE
<< TopAbs_SHELL << TopAbs_SOLID << TopAbs_COMPOUND;
myWires = getSelected( types, -1 );
if ( !myWires.isEmpty() ) {
@ -178,12 +193,8 @@ void BuildGUI_FaceDlg::SetEditCurrentArgument()
QPushButton* send = (QPushButton*)sender();
if ( send != GroupWire->PushButton1 )
return;
TColStd_MapOfInteger aMap;
aMap.Add( GEOM_EDGE );
aMap.Add( GEOM_WIRE );
globalSelection( aMap );
setGlobalSelection();
myEditCurrentArgument = GroupWire->LineEdit1;
myEditCurrentArgument->setFocus();
@ -200,10 +211,7 @@ void BuildGUI_FaceDlg::ActivateThisDialog()
GEOMBase_Skeleton::ActivateThisDialog();
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
TColStd_MapOfInteger aMap;
aMap.Add( GEOM_EDGE );
aMap.Add( GEOM_WIRE );
globalSelection( aMap );
setGlobalSelection();
}

View File

@ -53,6 +53,7 @@ protected:
private:
void Init();
void enterEvent( QEvent* );
void setGlobalSelection();
private:
QList<GEOM::GeomObjPtr> myWires;