#define SMESHFILTERSSELECTION_EXPORT
#endif
-enum MeshObjectType {
- HYPOTHESIS,
- ALGORITHM,
- MESH,
- SUBMESH,
- MESHorSUBMESH,
- SUBMESH_VERTEX,
- SUBMESH_EDGE,
- SUBMESH_FACE,
- SUBMESH_SOLID,
- SUBMESH_COMPOUND,
- GROUP,
- GROUP_NODE,
- GROUP_EDGE,
- GROUP_FACE,
- GROUP_VOLUME,
- GROUP_0D,
- GROUP_BALL,
- COMPONENT,
- IDSOURCE
+namespace SMESH{
+ enum MeshObjectType {
+ HYPOTHESIS,
+ ALGORITHM,
+ MESH,
+ SUBMESH,
+ MESHorSUBMESH,
+ SUBMESH_VERTEX,
+ SUBMESH_EDGE,
+ SUBMESH_FACE,
+ SUBMESH_SOLID,
+ SUBMESH_COMPOUND,
+ GROUP,
+ GROUP_NODE,
+ GROUP_EDGE,
+ GROUP_FACE,
+ GROUP_VOLUME,
+ GROUP_0D,
+ GROUP_BALL,
+ COMPONENT,
+ IDSOURCE
+ };
};
-
#endif
#include <SALOMEconfig.h>
#include CORBA_CLIENT_HEADER(SMESH_Gen)
-SMESH_TypeFilter::SMESH_TypeFilter (MeshObjectType theType)
+SMESH_TypeFilter::SMESH_TypeFilter (SMESH::MeshObjectType theType)
{
myType = theType;
}
switch (myType)
{
- case HYPOTHESIS:
+ case SMESH::HYPOTHESIS:
{
if (aLevel == 2 && (objFather->Tag() == SMESH::Tag_HypothesisRoot))
// hypo definition
Ok = true;
break;
}
- case ALGORITHM:
+ case SMESH::ALGORITHM:
{
if (aLevel == 2 && (objFather->Tag() == SMESH::Tag_AlgorithmsRoot))
// algo definition
Ok = true;
break;
}
- case MESH:
+ case SMESH::MESH:
{
if (aLevel == 1 && (obj->Tag() >= SMESH::Tag_FirstMeshRoot))
Ok = true;
break;
}
- case SUBMESH:
+ case SMESH::SUBMESH:
{
// see SMESH_Gen_i.cxx for tag numbers
if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstSubMesh &&
Ok = true;
break;
}
- case MESHorSUBMESH:
+ case SMESH::MESHorSUBMESH:
{
if (aLevel == 1 && (obj->Tag() >= SMESH::Tag_FirstMeshRoot))
Ok = true; // mesh
Ok = true;
break;
}
- case SUBMESH_VERTEX: // Label "SubMeshes on vertexes"
+ case SMESH::SUBMESH_VERTEX: // Label "SubMeshes on vertexes"
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnVertex))
Ok = true;
break;
}
- case SUBMESH_EDGE:
+ case SMESH::SUBMESH_EDGE:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnEdge))
Ok = true;
break;
}
- case SUBMESH_FACE:
+ case SMESH::SUBMESH_FACE:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnFace))
Ok = true;
break;
}
- case SUBMESH_SOLID:
+ case SMESH::SUBMESH_SOLID:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnSolid))
Ok = true;
break;
}
- case SUBMESH_COMPOUND:
+ case SMESH::SUBMESH_COMPOUND:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_SubMeshOnCompound))
Ok = true;
break;
}
- case GROUP:
+ case SMESH::GROUP:
{
if (aLevel == 3 && (objFather->Tag() >= SMESH::Tag_FirstGroup))
Ok = true;
break;
}
- case GROUP_NODE:
+ case SMESH::GROUP_NODE:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_NodeGroups))
Ok = true;
break;
}
- case GROUP_EDGE:
+ case SMESH::GROUP_EDGE:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_EdgeGroups))
Ok = true;
break;
}
- case GROUP_FACE:
+ case SMESH::GROUP_FACE:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_FaceGroups))
Ok = true;
break;
}
- case GROUP_VOLUME:
+ case SMESH::GROUP_VOLUME:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_VolumeGroups))
Ok = true;
break;
}
- case GROUP_0D:
+ case SMESH::GROUP_0D:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_0DElementsGroups))
Ok = true;
break;
}
- case GROUP_BALL:
+ case SMESH::GROUP_BALL:
{
if (aLevel == 3 && (objFather->Tag() == SMESH::Tag_BallElementsGroups))
Ok = true;
break;
}
- case IDSOURCE:
+ case SMESH::IDSOURCE:
{
- Ok = ( SMESH_TypeFilter(MESHorSUBMESH).isOk( theDataOwner ) ||
- SMESH_TypeFilter(GROUP) .isOk( theDataOwner ));
+ Ok = ( SMESH_TypeFilter(SMESH::MESHorSUBMESH).isOk( theDataOwner ) ||
+ SMESH_TypeFilter(SMESH::GROUP) .isOk( theDataOwner ));
break;
}
}
return Ok;
}
-MeshObjectType SMESH_TypeFilter::type() const
+SMESH::MeshObjectType SMESH_TypeFilter::type() const
{
return myType;
}
class SMESHFILTERSSELECTION_EXPORT SMESH_TypeFilter : public SUIT_SelectionFilter
{
public:
- SMESH_TypeFilter (MeshObjectType theType);
+ SMESH_TypeFilter (SMESH::MeshObjectType theType);
~SMESH_TypeFilter();
virtual bool isOk (const SUIT_DataOwner*) const;
- MeshObjectType type() const;
+ SMESH::MeshObjectType type() const;
protected:
- MeshObjectType myType;
+ SMESH::MeshObjectType myType;
};
#endif
bool CheckOIType(const Handle(SALOME_InteractiveObject) & theIO,
- MeshObjectType theType,
+ SMESH::MeshObjectType theType,
const QString theInTypeName,
QString & theOutTypeName)
{
QString aTypeName;
if (
- CheckOIType ( theIO, HYPOTHESIS, "Hypothesis", aTypeName ) ||
- CheckOIType ( theIO, ALGORITHM, "Algorithm", aTypeName ) ||
- CheckOIType ( theIO, MESH, "Mesh", aTypeName ) ||
- CheckOIType ( theIO, SUBMESH, "SubMesh", aTypeName ) ||
- CheckOIType ( theIO, GROUP, "Group", aTypeName )
+ CheckOIType ( theIO, SMESH::HYPOTHESIS, "Hypothesis", aTypeName ) ||
+ CheckOIType ( theIO, SMESH::ALGORITHM, "Algorithm", aTypeName ) ||
+ CheckOIType ( theIO, SMESH::MESH, "Mesh", aTypeName ) ||
+ CheckOIType ( theIO, SMESH::SUBMESH, "SubMesh", aTypeName ) ||
+ CheckOIType ( theIO, SMESH::GROUP, "Group", aTypeName )
)
return aTypeName;
QString OB = "'ObjectBrowser'",
View = "'" + SVTK_Viewer::Type() + "'",
pat = "'%1'",
- mesh = pat.arg( SMESHGUI_Selection::typeName( MESH ) ),
- group = pat.arg( SMESHGUI_Selection::typeName( GROUP ) ),
- hypo = pat.arg( SMESHGUI_Selection::typeName( HYPOTHESIS ) ),
- algo = pat.arg( SMESHGUI_Selection::typeName( ALGORITHM ) ),
+ mesh = pat.arg( SMESHGUI_Selection::typeName( SMESH::MESH ) ),
+ group = pat.arg( SMESHGUI_Selection::typeName( SMESH::GROUP ) ),
+ hypo = pat.arg( SMESHGUI_Selection::typeName( SMESH::HYPOTHESIS ) ),
+ algo = pat.arg( SMESHGUI_Selection::typeName( SMESH::ALGORITHM ) ),
elems = QString( "'%1' '%2' '%3' '%4' '%5' '%6'" ).
- arg( SMESHGUI_Selection::typeName( SUBMESH_VERTEX ) ).
- arg( SMESHGUI_Selection::typeName( SUBMESH_EDGE ) ).
- arg( SMESHGUI_Selection::typeName( SUBMESH_FACE ) ).
- arg( SMESHGUI_Selection::typeName( SUBMESH_SOLID ) ).
- arg( SMESHGUI_Selection::typeName( SUBMESH_COMPOUND ) ).
- arg( SMESHGUI_Selection::typeName( SUBMESH ) ),
+ arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_VERTEX ) ).
+ arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_EDGE ) ).
+ arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_FACE ) ).
+ arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_SOLID ) ).
+ arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH_COMPOUND ) ).
+ arg( SMESHGUI_Selection::typeName( SMESH::SUBMESH ) ),
subMesh = elems,
mesh_part = mesh + " " + subMesh + " " + group,
mesh_group = mesh + " " + group,
// check type to prevent renaming of inappropriate objects
int aType = SMESHGUI_Selection::type(qPrintable(entry), SMESH::GetActiveStudyDocument());
- if (aType == MESH || aType == GROUP ||
- aType == SUBMESH || aType == SUBMESH_COMPOUND ||
- aType == SUBMESH_SOLID || aType == SUBMESH_FACE ||
- aType == SUBMESH_EDGE || aType == SUBMESH_VERTEX ||
- aType == HYPOTHESIS || aType == ALGORITHM)
+ if (aType == SMESH::MESH || aType == SMESH::GROUP ||
+ aType == SMESH::SUBMESH || aType == SMESH::SUBMESH_COMPOUND ||
+ aType == SMESH::SUBMESH_SOLID || aType == SMESH::SUBMESH_FACE ||
+ aType == SMESH::SUBMESH_EDGE || aType == SMESH::SUBMESH_VERTEX ||
+ aType == SMESH::HYPOTHESIS || aType == SMESH::ALGORITHM)
return true;
return false;
aName = anAttr;
// check type to prevent renaming of inappropriate objects
int aType = SMESHGUI_Selection::type( qPrintable(entry), SMESH::GetActiveStudyDocument() );
- if (aType == MESH || aType == GROUP ||
- aType == SUBMESH || aType == SUBMESH_COMPOUND ||
- aType == SUBMESH_SOLID || aType == SUBMESH_FACE ||
- aType == SUBMESH_EDGE || aType == SUBMESH_VERTEX ||
- aType == HYPOTHESIS || aType == ALGORITHM) {
+ if (aType == SMESH::MESH || aType == SMESH::GROUP ||
+ aType == SMESH::SUBMESH || aType == SMESH::SUBMESH_COMPOUND ||
+ aType == SMESH::SUBMESH_SOLID || aType == SMESH::SUBMESH_FACE ||
+ aType == SMESH::SUBMESH_EDGE || aType == SMESH::SUBMESH_VERTEX ||
+ aType == SMESH::HYPOTHESIS || aType == SMESH::ALGORITHM) {
if ( !name.isEmpty() ) {
SMESHGUI::GetSMESHGen()->SetName(obj->GetIOR().c_str(), qPrintable(name) );
myMesh = SMESH::SMESH_Mesh::_nil();
- myMeshFilter = new SMESH_TypeFilter (MESH);
+ myMeshFilter = new SMESH_TypeFilter (SMESH::MESH);
myMeshArray = new SMESH::mesh_array();
SUIT_SelectionFilter* SMESHGUI_ConvToQuadOp::createFilter( const int theId ) const
{
if ( theId == 0 )
- return new SMESH_TypeFilter( MESHorSUBMESH );
+ return new SMESH_TypeFilter( SMESH::MESHorSUBMESH );
else
return 0;
}
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
// Selection filter
- myIdSourceFilter = new SMESH_TypeFilter( IDSOURCE );
+ myIdSourceFilter = new SMESH_TypeFilter( SMESH::IDSOURCE );
myHelpFileName = "copy_mesh_page.html";
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
// set selection mode
- mySelectionMgr->installFilter(new SMESH_TypeFilter(GROUP));
+ mySelectionMgr->installFilter(new SMESH_TypeFilter(SMESH::GROUP));
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
onSelectionDone();
setEnabled(true);
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
- mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
+ mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP));
}
//=================================================================================
: LightApp_Dialog( parent == 0 ? desktop() : parent, "", modal, allowResize, flags )
{
int pr = prefix( "SMESH" );
- typeName( pr + MESH ) = tr( "DLG_MESH" );
- typeName( pr + HYPOTHESIS ) = tr( "DLG_HYPO" );
- typeName( pr + ALGORITHM ) = tr( "DLG_ALGO" );
+ typeName( pr + SMESH::MESH ) = tr( "DLG_MESH" );
+ typeName( pr + SMESH::HYPOTHESIS ) = tr( "DLG_HYPO" );
+ typeName( pr + SMESH::ALGORITHM ) = tr( "DLG_ALGO" );
setButtonText(1, tr("SMESH_BUT_APPLY_AND_CLOSE")); //rename OK to Apply and Close
if ( flags & Close )
setButtonPosition( Right, Close );
myGroups3.clear();
// Set selection mode
- mySelectionMgr->installFilter(new SMESH_TypeFilter(GROUP));
+ mySelectionMgr->installFilter(new SMESH_TypeFilter(SMESH::GROUP));
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
// Set selection mode
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
- mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
+ mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP));
}
}
mySMESHGUI->SetActiveDialogBox(this);
// Costruction of the logical filter for the elements: mesh/sub-mesh/group
- SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
- SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (GROUP);
+ SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
+ SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (SMESH::GROUP);
QList<SUIT_SelectionFilter*> aListOfFilters;
if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
if (aSmeshGroupFilter) aListOfFilters.append(aSmeshGroupFilter);
myElementsFilter = new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR);
- //myPathMeshFilter = new SMESH_TypeFilter (MESH);
- myPathMeshFilter = new SMESH_TypeFilter(MESHorSUBMESH);
+ //myPathMeshFilter = new SMESH_TypeFilter (SMESH::MESH);
+ myPathMeshFilter = new SMESH_TypeFilter(SMESH::MESHorSUBMESH);
myHelpFileName = "extrusion_along_path_page.html";
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(NodeSelection);
- SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter(MESHorSUBMESH);
- SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter(GROUP);
+ SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter(SMESH::MESHorSUBMESH);
+ SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter(SMESH::GROUP);
SMESH_NumberFilter* aVertexFilter = new SMESH_NumberFilter ("GEOM", TopAbs_SHAPE,
-1, TopAbs_VERTEX);
QList<SUIT_SelectionFilter*> aListOfFilters;
// Costruction of the logical filter for the elements: mesh/sub-mesh/group
QList<SUIT_SelectionFilter*> aListOfFilters;
- aListOfFilters.append(new SMESH_TypeFilter (MESH));
- aListOfFilters.append(new SMESH_TypeFilter (SUBMESH_VERTEX));
- aListOfFilters.append(new SMESH_TypeFilter (GROUP_NODE));
+ aListOfFilters.append(new SMESH_TypeFilter (SMESH::MESH));
+ aListOfFilters.append(new SMESH_TypeFilter (SMESH::SUBMESH_VERTEX));
+ aListOfFilters.append(new SMESH_TypeFilter (SMESH::GROUP_NODE));
myMeshOrSubMeshOrGroupFilter0D =
new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR, /*takeOwnership=*/true);
- aListOfFilters[0] = new SMESH_TypeFilter (MESH);
- aListOfFilters[1] = new SMESH_TypeFilter (SUBMESH_EDGE);
- aListOfFilters[2] = new SMESH_TypeFilter (GROUP_EDGE);
+ aListOfFilters[0] = new SMESH_TypeFilter (SMESH::MESH);
+ aListOfFilters[1] = new SMESH_TypeFilter (SMESH::SUBMESH_EDGE);
+ aListOfFilters[2] = new SMESH_TypeFilter (SMESH::GROUP_EDGE);
myMeshOrSubMeshOrGroupFilter1D =
new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR, /*takeOwnership=*/true);
- aListOfFilters[0] = new SMESH_TypeFilter (MESH);
- aListOfFilters[1] = new SMESH_TypeFilter (SUBMESH_FACE);
- aListOfFilters[2] = new SMESH_TypeFilter (GROUP_FACE);
+ aListOfFilters[0] = new SMESH_TypeFilter (SMESH::MESH);
+ aListOfFilters[1] = new SMESH_TypeFilter (SMESH::SUBMESH_FACE);
+ aListOfFilters[2] = new SMESH_TypeFilter (SMESH::GROUP_FACE);
myMeshOrSubMeshOrGroupFilter2D =
new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR, /*takeOwnership=*/true);
myHelpFileName = "find_element_by_point_page.html";
QList<SUIT_SelectionFilter*> filters;
- filters.append( new SMESH_TypeFilter( MESH ) );
- filters.append( new SMESH_TypeFilter( GROUP ) );
+ filters.append( new SMESH_TypeFilter( SMESH::MESH ) );
+ filters.append( new SMESH_TypeFilter( SMESH::GROUP ) );
myFilter = new SMESH_LogicalFilter( filters, SMESH_LogicalFilter::LO_OR );
myPreview = new SMESH::MeshPreviewStruct();
mySMESHGUI->SetState(800);
mySelectionMode = grpNoSelection;
- myMeshFilter = new SMESH_TypeFilter(MESH);
+ myMeshFilter = new SMESH_TypeFilter(SMESH::MESH);
mySubMeshFilter = new SMESH_LogicalFilter(QList<SUIT_SelectionFilter*>(),
SMESH_LogicalFilter::LO_OR,
/*takeOwnership=*/true);
SMESH_TypeFilter* f = 0;
switch (myTypeId) {
- case grpNodeSelection: f = new SMESH_TypeFilter(SUBMESH); break;
- case grpEdgeSelection: f = new SMESH_TypeFilter(SUBMESH_EDGE); break;
- case grpFaceSelection: f = new SMESH_TypeFilter(SUBMESH_FACE); break;
- case grpVolumeSelection: f = new SMESH_TypeFilter(SUBMESH_SOLID); break;
- default: f = new SMESH_TypeFilter(SUBMESH);
+ case grpNodeSelection: f = new SMESH_TypeFilter(SMESH::SUBMESH); break;
+ case grpEdgeSelection: f = new SMESH_TypeFilter(SMESH::SUBMESH_EDGE); break;
+ case grpFaceSelection: f = new SMESH_TypeFilter(SMESH::SUBMESH_FACE); break;
+ case grpVolumeSelection: f = new SMESH_TypeFilter(SMESH::SUBMESH_SOLID); break;
+ default: f = new SMESH_TypeFilter(SMESH::SUBMESH);
}
QList<SUIT_SelectionFilter*> filtList;
filtList.append( f );
- filtList.append( new SMESH_TypeFilter(SUBMESH_COMPOUND));
+ filtList.append( new SMESH_TypeFilter(SMESH::SUBMESH_COMPOUND));
mySubMeshFilter->setFilters( filtList );
mySelectionMgr->installFilter( mySubMeshFilter );
SMESH_TypeFilter* f = 0;
switch (myTypeId) {
- case grpNodeSelection: f = new SMESH_TypeFilter(GROUP_NODE); break;
- case grpBallSelection: f = new SMESH_TypeFilter(GROUP_BALL); break;
- case grpEdgeSelection: f = new SMESH_TypeFilter(GROUP_EDGE); break;
- case grpFaceSelection: f = new SMESH_TypeFilter(GROUP_FACE); break;
- case grpVolumeSelection: f = new SMESH_TypeFilter(GROUP_VOLUME); break;
- default: f = new SMESH_TypeFilter(GROUP);
+ case grpNodeSelection: f = new SMESH_TypeFilter(SMESH::GROUP_NODE); break;
+ case grpBallSelection: f = new SMESH_TypeFilter(SMESH::GROUP_BALL); break;
+ case grpEdgeSelection: f = new SMESH_TypeFilter(SMESH::GROUP_EDGE); break;
+ case grpFaceSelection: f = new SMESH_TypeFilter(SMESH::GROUP_FACE); break;
+ case grpVolumeSelection: f = new SMESH_TypeFilter(SMESH::GROUP_VOLUME); break;
+ default: f = new SMESH_TypeFilter(SMESH::GROUP);
}
QList<SUIT_SelectionFilter*> filtList;
filtList.append( f );
if ( theId == _ELEM_GEOM || theId == _NODE_GEOM )
return new GEOM_SelectionFilter( (SalomeApp_Study*)study(), true );
else if ( theId == _MESH )
- return new SMESH_TypeFilter( MESH );
+ return new SMESH_TypeFilter( SMESH::MESH );
else
return ( SUIT_SelectionFilter*) 0;
}
// set selection mode
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
- mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
+ mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP));
}
/*!
setEnabled(true);
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
- mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
+ mySelectionMgr->installFilter(new SMESH_TypeFilter (SMESH::GROUP));
}
/*!
SMESHGUI_Make2DFrom3DOp::SMESHGUI_Make2DFrom3DOp()
: SMESHGUI_SelectionOp(),
- myMeshFilter(MESH),
- myGroupFilter(GROUP)
+ myMeshFilter(SMESH::MESH),
+ myGroupFilter(SMESH::GROUP)
{
}
connect( mySecondTgt, SIGNAL( textEdited( QString ) ), this, SLOT( secondEdited() ) );
QList<SUIT_SelectionFilter*> filters;
- filters.append( new SMESH_TypeFilter( MESHorSUBMESH ) );
- filters.append( new SMESH_TypeFilter( GROUP ) );
+ filters.append( new SMESH_TypeFilter( SMESH::MESHorSUBMESH ) );
+ filters.append( new SMESH_TypeFilter( SMESH::GROUP ) );
myFilter = new SMESH_LogicalFilter( filters, SMESH_LogicalFilter::LO_OR );
mySecondTgt->setEnabled( mySecond->checkedId() != OriginTgt );
connect( mySource, SIGNAL( textEdited( QString ) ), this, SLOT( sourceEdited() ) );
QList<SUIT_SelectionFilter*> filters;
- filters.append( new SMESH_TypeFilter( MESHorSUBMESH ) );
- filters.append( new SMESH_TypeFilter( GROUP ) );
+ filters.append( new SMESH_TypeFilter( SMESH::MESHorSUBMESH ) );
+ filters.append( new SMESH_TypeFilter( SMESH::GROUP ) );
myFilter = new SMESH_LogicalFilter( filters, SMESH_LogicalFilter::LO_OR );
clear();
SMESH::UpdateView();
// Costruction of the logical filter
- SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
- SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (GROUP);
+ SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
+ SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (SMESH::GROUP);
QList<SUIT_SelectionFilter*> aListOfFilters;
if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
return new GEOM_SelectionFilter( (SalomeApp_Study*)study(), true );
}
else if ( theId == SMESHGUI_MeshDlg::Obj && !myToCreate )
- return new SMESH_TypeFilter( MESHorSUBMESH );
+ return new SMESH_TypeFilter( SMESH::MESHorSUBMESH );
else if ( theId == SMESHGUI_MeshDlg::Mesh )
- return new SMESH_TypeFilter( MESH );
+ return new SMESH_TypeFilter( SMESH::MESH );
else
return 0;
}
if (mySubmeshChk->isChecked()) {
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
- mySelectionMgr->installFilter(new SMESH_TypeFilter(SUBMESH));
+ mySelectionMgr->installFilter(new SMESH_TypeFilter(SMESH::SUBMESH));
}
else if (myGroupChk->isChecked()) {
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->SetSelectionMode(ActorSelection);
- mySelectionMgr->installFilter(new SMESH_TypeFilter(GROUP));
+ mySelectionMgr->installFilter(new SMESH_TypeFilter(SMESH::GROUP));
}
if (entityType()) {
myMesh = SMESH::SMESH_Mesh::_nil();
- myMeshFilter = new SMESH_TypeFilter (MESH);
+ myMeshFilter = new SMESH_TypeFilter (SMESH::MESH);
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
case EObject:
{
QList<SUIT_SelectionFilter*> filters;
- filters.append( new SMESH_TypeFilter( MESH ));
- filters.append( new SMESH_TypeFilter( SUBMESH_FACE ));
- filters.append( new SMESH_TypeFilter( GROUP_FACE ));
+ filters.append( new SMESH_TypeFilter( SMESH::MESH ));
+ filters.append( new SMESH_TypeFilter( SMESH::SUBMESH_FACE ));
+ filters.append( new SMESH_TypeFilter( SMESH::GROUP_FACE ));
return new SMESH_LogicalFilter( filters, SMESH_LogicalFilter::LO_OR );
}
case EPoint:
{
QList<SUIT_SelectionFilter*> filters;
- filters.append( new SMESH_TypeFilter( IDSOURCE ));
+ filters.append( new SMESH_TypeFilter( SMESH::IDSOURCE ));
filters.append( new SMESH_NumberFilter( "GEOM",TopAbs_VERTEX, 1, TopAbs_VERTEX ));
return new SMESH_LogicalFilter( filters, SMESH_LogicalFilter::LO_OR );
}
case EFace:
case EDirection:
{
- return new SMESH_TypeFilter( IDSOURCE );
+ return new SMESH_TypeFilter( SMESH::IDSOURCE );
}
}
return NULL;
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
// Costruction of the logical filter
- SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
- SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (GROUP);
+ SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
+ SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (SMESH::GROUP);
QList<SUIT_SelectionFilter*> aListOfFilters;
if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
// Costruction of the logical filter
- SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
- SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (GROUP);
+ SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
+ SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (SMESH::GROUP);
QList<SUIT_SelectionFilter*> aListOfFilters;
if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
// Costruction of the logical filter
- SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
- SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (GROUP);
+ SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
+ SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (SMESH::GROUP);
QList<SUIT_SelectionFilter*> aListOfFilters;
if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
return -1;
if( objComponent->GetIOR()==obj->GetIOR() )
- return COMPONENT;
+ return SMESH::COMPONENT;
int aLevel = obj->Depth() - objComponent->Depth(),
aFTag = objFather->Tag(),
{
case 1:
if (anOTag >= SMESH::Tag_FirstMeshRoot)
- res = MESH;
+ res = SMESH::MESH;
break;
case 2:
switch (aFTag)
{
case SMESH::Tag_HypothesisRoot:
- res = HYPOTHESIS;
+ res = SMESH::HYPOTHESIS;
break;
case SMESH::Tag_AlgorithmsRoot:
- res = ALGORITHM;
+ res = SMESH::ALGORITHM;
break;
}
break;
switch (aFTag)
{
case SMESH::Tag_SubMeshOnVertex:
- res = SUBMESH_VERTEX;
+ res = SMESH::SUBMESH_VERTEX;
break;
case SMESH::Tag_SubMeshOnEdge:
- res = SUBMESH_EDGE;
+ res = SMESH::SUBMESH_EDGE;
break;
case SMESH::Tag_SubMeshOnFace:
- res = SUBMESH_FACE;
+ res = SMESH::SUBMESH_FACE;
break;
case SMESH::Tag_SubMeshOnSolid:
- res = SUBMESH_SOLID;
+ res = SMESH::SUBMESH_SOLID;
break;
case SMESH::Tag_SubMeshOnCompound:
- res = SUBMESH_COMPOUND;
+ res = SMESH::SUBMESH_COMPOUND;
break;
default:
if (aFTag >= SMESH::Tag_FirstGroup)
- res = GROUP;
+ res = SMESH::GROUP;
else
- res = SUBMESH;
+ res = SMESH::SUBMESH;
}
break;
}
{
switch( t )
{
- case HYPOTHESIS:
+ case SMESH::HYPOTHESIS:
return "Hypothesis";
- case ALGORITHM:
+ case SMESH::ALGORITHM:
return "Algorithm";
- case MESH:
+ case SMESH::MESH:
return "Mesh";
- case SUBMESH:
+ case SMESH::SUBMESH:
return "SubMesh";
- case MESHorSUBMESH:
+ case SMESH::MESHorSUBMESH:
return "Mesh or submesh";
- case SUBMESH_VERTEX:
+ case SMESH::SUBMESH_VERTEX:
return "Mesh vertex";
- case SUBMESH_EDGE:
+ case SMESH::SUBMESH_EDGE:
return "Mesh edge";
- case SUBMESH_FACE:
+ case SMESH::SUBMESH_FACE:
return "Mesh face";
- case SUBMESH_SOLID:
+ case SMESH::SUBMESH_SOLID:
return "Mesh solid";
- case SUBMESH_COMPOUND:
+ case SMESH::SUBMESH_COMPOUND:
return "Mesh compound";
- case GROUP:
+ case SMESH::GROUP:
return "Group";
- case COMPONENT:
+ case SMESH::COMPONENT:
return "Component";
default:
return "Unknown";
// Costruction of the logical filter for the elements: mesh/sub-mesh/group
QList<SUIT_SelectionFilter*> aListOfFilters;
- aListOfFilters << new SMESH_TypeFilter(MESHorSUBMESH) << new SMESH_TypeFilter(GROUP);
+ aListOfFilters << new SMESH_TypeFilter(SMESH::MESHorSUBMESH) << new SMESH_TypeFilter(SMESH::GROUP);
myMeshOrSubMeshOrGroupFilter =
new SMESH_LogicalFilter (aListOfFilters, SMESH_LogicalFilter::LO_OR);
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
// Costruction of the logical filter
- SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
- SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (GROUP);
+ SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
+ SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (SMESH::GROUP);
QList<SUIT_SelectionFilter*> aListOfFilters;
if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
// Costruction of the logical filter
- SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
- SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (GROUP);
+ SMESH_TypeFilter* aMeshOrSubMeshFilter = new SMESH_TypeFilter (SMESH::MESHorSUBMESH);
+ SMESH_TypeFilter* aSmeshGroupFilter = new SMESH_TypeFilter (SMESH::GROUP);
QList<SUIT_SelectionFilter*> aListOfFilters;
if (aMeshOrSubMeshFilter) aListOfFilters.append(aMeshOrSubMeshFilter);
//================================================================================
StdMeshersGUI_ObjectReferenceParamWdg::StdMeshersGUI_ObjectReferenceParamWdg
-( MeshObjectType objType, QWidget* parent, bool multiSelection )
+( SMESH::MeshObjectType objType, QWidget* parent, bool multiSelection )
: QWidget( parent ), myMultiSelection( multiSelection )
{
myFilter = new SMESH_TypeFilter( objType );
QWidget* parent,
bool multiSelection=false,
bool stretch=true);
- StdMeshersGUI_ObjectReferenceParamWdg( MeshObjectType objType,
+ StdMeshersGUI_ObjectReferenceParamWdg( SMESH::MeshObjectType objType,
QWidget* parent,
bool multiSelection=false);
~StdMeshersGUI_ObjectReferenceParamWdg();
customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 1 ),
h->GetSourceEdge()));
item.myName = tr( "SMESH_SOURCE_MESH" ); p.append( item );
- customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( MESH ),
+ customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::MESH ),
h->GetSourceMesh()));
item.myName = tr( "SMESH_SOURCE_VERTEX" ); p.append( item );
customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 0 ),
customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 2 ),
h->GetSourceFace()));
item.myName = tr( "SMESH_SOURCE_MESH" ); p.append( item );
- customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( MESH ),
+ customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::MESH ),
h->GetSourceMesh()));
item.myName = tr( "SMESH_SOURCE_VERTEX1" ); p.append( item );
customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 0 ),
customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 3, TopAbs_FACE, 6, true ),
h->GetSource3DShape()));
item.myName = tr( "SMESH_SOURCE_MESH" ); p.append( item );
- customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( MESH ),
+ customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::MESH ),
h->GetSourceMesh()));
item.myName = tr( "SMESH_SOURCE_VERTEX1" ); p.append( item );
customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 0 ),
h->GetCopySourceMesh(toCopyMesh, toCopyGroups);
item.myName = tr( "SMESH_SOURCE_EDGES" ); p.append( item );
- customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( GROUP_EDGE ),
+ customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::GROUP_EDGE ),
groupEntries));
item.myName = tr( "SMESH_COPY_MESH" ); p.append( item );
h->GetCopySourceMesh(toCopyMesh, toCopyGroups);
item.myName = tr( "SMESH_SOURCE_FACES" ); p.append( item );
- customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( GROUP_FACE ),
+ customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::GROUP_FACE ),
groupEntries));
item.myName = tr( "SMESH_COPY_MESH" ); p.append( item );