Allowed selection of subfaces in for extruded boss /cut

This commit is contained in:
rnc 2012-03-02 10:53:04 +00:00
parent f9d4ef6d53
commit d5698079fe
2 changed files with 20 additions and 4 deletions

View File

@ -209,12 +209,18 @@ void OperationGUI_ExtrudedFeatureDlg::SetEditCurrentArgument()
myGroup->PushButton2->setDown(false);
myGroup->LineEdit2->setEnabled(false);
globalSelection(); // close local selection
}
else if (send == myGroup->PushButton2) {
myEditCurrentArgument = myGroup->LineEdit2;
myGroup->PushButton1->setDown(false);
myGroup->LineEdit1->setEnabled(false);
globalSelection(); // close local selection to clear it
// localSelection( GEOM::GEOM_Object::_nil(), TopAbs_EDGE );
localSelection( GEOM::GEOM_Object::_nil(), TopAbs_FACE );
}
// enable line edit
@ -244,7 +250,7 @@ void OperationGUI_ExtrudedFeatureDlg::SelectionIntoArgument()
if (myEditCurrentArgument == myGroup->LineEdit2)
{
types.clear();
types << TopAbs_EDGE << TopAbs_WIRE;
types << TopAbs_EDGE << TopAbs_WIRE << TopAbs_FACE;
}
GEOM::GeomObjPtr aSelectedObject = getSelected( types );
@ -374,6 +380,15 @@ bool OperationGUI_ExtrudedFeatureDlg::execute (ObjectList& objects)
return true;
}
//=================================================================================
// function : addSubshapeToStudy
// purpose : virtual method to add new SubObjects if local selection
//=================================================================================
void OperationGUI_ExtrudedFeatureDlg::addSubshapesToStudy()
{
GEOMBase::PublishSubObject( myObject2.get() );
}

View File

@ -61,6 +61,7 @@ protected:
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& );
virtual void addSubshapesToStudy();
private:
void Init();