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 ); GroupWire->CheckButton1->setChecked( true );
myWires.clear(); myWires.clear();
TColStd_MapOfInteger aMap; setGlobalSelection();
aMap.Add( GEOM_EDGE );
aMap.Add( GEOM_WIRE );
globalSelection( aMap );
/* signals and slots connections */ /* signals and slots connections */
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
@ -123,6 +120,23 @@ void BuildGUI_FaceDlg::Init()
SelectionIntoArgument(); 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() // function : ClickOnOk()
@ -159,7 +173,8 @@ void BuildGUI_FaceDlg::SelectionIntoArgument()
myEditCurrentArgument->setText( "" ); myEditCurrentArgument->setText( "" );
QList<TopAbs_ShapeEnum> types; 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 ); myWires = getSelected( types, -1 );
if ( !myWires.isEmpty() ) { if ( !myWires.isEmpty() ) {
@ -179,11 +194,7 @@ void BuildGUI_FaceDlg::SetEditCurrentArgument()
if ( send != GroupWire->PushButton1 ) if ( send != GroupWire->PushButton1 )
return; return;
TColStd_MapOfInteger aMap; setGlobalSelection();
aMap.Add( GEOM_EDGE );
aMap.Add( GEOM_WIRE );
globalSelection( aMap );
myEditCurrentArgument = GroupWire->LineEdit1; myEditCurrentArgument = GroupWire->LineEdit1;
myEditCurrentArgument->setFocus(); myEditCurrentArgument->setFocus();
@ -200,10 +211,7 @@ void BuildGUI_FaceDlg::ActivateThisDialog()
GEOMBase_Skeleton::ActivateThisDialog(); GEOMBase_Skeleton::ActivateThisDialog();
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(), connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
TColStd_MapOfInteger aMap; setGlobalSelection();
aMap.Add( GEOM_EDGE );
aMap.Add( GEOM_WIRE );
globalSelection( aMap );
} }

View File

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