#include "StdMeshersGUI_SubShapeSelectorWdg.h"
// SMESH Includes
-#include <SMESH_Type.h>
+#include "SMESH_Type.h"
#include "SMESHGUI_MeshUtils.h"
-#include <SMESH_Actor.h>
-#include <SMESH_PreviewActorsCollection.h>
-#include <SMESH_ActorUtils.h>
+#include "SMESH_Actor.h"
+#include "SMESH_PreviewActorsCollection.h"
+#include "SMESH_ActorUtils.h"
#include "SMESHGUI_GroupUtils.h"
#include "SMESH_Gen_i.hxx"
#include "SMESHGUI_GEOMGenUtils.h"
+#include "SMESH_LogicalFilter.hxx"
// SVTK Includes
#include <SVTK_ViewWindow.h>
// GEOM Includes
#include <GEOMBase.h>
+#include <GEOM_EdgeFilter.h>
+#include <GEOM_CompoundFilter.h>
// Qt includes
#include <QPushButton>
#include <TopoDS_Shape.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
+#include <StdSelect_TypeOfEdge.hxx>
// SALOME KERNEL includes
#include <SALOMEDS_SObject.hxx>
+
#define SPACING 6
#define MARGIN 0
myEntry = "";
myParamValue = "";
myMainShape.Nullify();
+
+ if ( mySelectionMgr && myFilter )
+ mySelectionMgr->removeFilter( myFilter );
+ delete myFilter; myFilter=0;
+
+ SUIT_SelectionFilter* filter;
+ foreach( filter, myGeomFilters )
+ delete filter;
}
//================================================================================
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode( ActorSelection );
+
+ SalomeApp_Study* study = mySMESHGUI->activeStudy();
+ GEOM_EdgeFilter* edgeFilter = new GEOM_EdgeFilter(study,StdSelect_AnyEdge);
+ GEOM_CompoundFilter* gpoupFilter = new GEOM_CompoundFilter(study);
+ gpoupFilter->addSubType( TopAbs_EDGE );
+ myGeomFilters.append( edgeFilter );
+ myGeomFilters.append( gpoupFilter );
+ myFilter = new SMESH_LogicalFilter( myGeomFilters, SMESH_LogicalFilter::LO_OR );
+ mySelectionMgr->installFilter( myFilter );
+
connect( myAddButton, SIGNAL(clicked()), SLOT(onAdd()));
connect( myRemoveButton, SIGNAL(clicked()), SLOT(onRemove()));
aFatherEntry = aGeomFatherObj->GetStudyEntry();
}
- if ( aFatherEntry != "" && ( aFatherEntry == myEntry || aFatherEntry == aMainFatherEntry ) ) {
+ if ( aFatherEntry != "" && ( aFatherEntry == myEntry || aFatherEntry == aMainFatherEntry ) )
+ {
if ( aGeomObj->GetType() == 37 /*GEOM_GROUP*/ ) { // Selected Group that belongs the main object
GEOMBase::GetShape(aGeomObj, shape);
if ( !shape.IsNull() ) {