mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-07 10:27:28 +05:00
0021339: EDF 1928 SMESH: Create group of 0D elements
This commit is contained in:
parent
5d017835af
commit
b75ee995ab
@ -103,15 +103,16 @@
|
|||||||
enum grpSelectionMode {
|
enum grpSelectionMode {
|
||||||
grpNoSelection = -1,
|
grpNoSelection = -1,
|
||||||
grpNodeSelection = 0,
|
grpNodeSelection = 0,
|
||||||
grpBallSelection = 1,
|
grp0DSelection = 1,
|
||||||
grpEdgeSelection = 2,
|
grpBallSelection = 2,
|
||||||
grpFaceSelection = 3,
|
grpEdgeSelection = 3,
|
||||||
grpVolumeSelection = 4,
|
grpFaceSelection = 4,
|
||||||
grpSubMeshSelection = 5,
|
grpVolumeSelection = 5,
|
||||||
grpGroupSelection = 6,
|
grpSubMeshSelection = 6,
|
||||||
grpMeshSelection = 7,
|
grpGroupSelection = 7,
|
||||||
grpGeomSelection = 8,
|
grpMeshSelection = 8,
|
||||||
grpAllSelection = 9,
|
grpGeomSelection = 9,
|
||||||
|
grpAllSelection = 10,
|
||||||
};
|
};
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -214,6 +215,7 @@ void SMESHGUI_GroupDlg::initDialog( bool create)
|
|||||||
|
|
||||||
QStringList types;
|
QStringList types;
|
||||||
types.append( tr( "MESH_NODE" ) );
|
types.append( tr( "MESH_NODE" ) );
|
||||||
|
types.append( tr( "SMESH_ELEM0D" ) );
|
||||||
types.append( tr( "SMESH_BALL_ELEM" ) );
|
types.append( tr( "SMESH_BALL_ELEM" ) );
|
||||||
types.append( tr( "SMESH_EDGE" ) );
|
types.append( tr( "SMESH_EDGE" ) );
|
||||||
types.append( tr( "SMESH_FACE" ) );
|
types.append( tr( "SMESH_FACE" ) );
|
||||||
@ -601,11 +603,12 @@ void SMESHGUI_GroupDlg::init (SMESH::SMESH_GroupBase_ptr theGroup,
|
|||||||
|
|
||||||
int aType = 0;
|
int aType = 0;
|
||||||
switch(theGroup->GetType()) {
|
switch(theGroup->GetType()) {
|
||||||
case SMESH::NODE: aType = 0; break;
|
case SMESH::NODE: aType = grpNodeSelection; break;
|
||||||
case SMESH::BALL: aType = 1; break;
|
case SMESH::ELEM0D: aType = grp0DSelection; break;
|
||||||
case SMESH::EDGE: aType = 2; break;
|
case SMESH::BALL: aType = grpBallSelection; break;
|
||||||
case SMESH::FACE: aType = 3; break;
|
case SMESH::EDGE: aType = grpEdgeSelection; break;
|
||||||
case SMESH::VOLUME: aType = 4; break;
|
case SMESH::FACE: aType = grpFaceSelection; break;
|
||||||
|
case SMESH::VOLUME: aType = grpVolumeSelection; break;
|
||||||
}
|
}
|
||||||
myTypeGroup->button(aType)->setChecked(true);
|
myTypeGroup->button(aType)->setChecked(true);
|
||||||
|
|
||||||
@ -825,6 +828,9 @@ void SMESHGUI_GroupDlg::setSelectionMode (int theMode)
|
|||||||
case grpBallSelection:
|
case grpBallSelection:
|
||||||
if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : BallSelection);
|
if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : BallSelection);
|
||||||
break;
|
break;
|
||||||
|
case grp0DSelection:
|
||||||
|
if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : Elem0DSelection);
|
||||||
|
break;
|
||||||
case grpFaceSelection:
|
case grpFaceSelection:
|
||||||
if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : FaceSelection);
|
if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : FaceSelection);
|
||||||
break;
|
break;
|
||||||
@ -855,10 +861,11 @@ void SMESHGUI_GroupDlg::setSelectionMode (int theMode)
|
|||||||
|
|
||||||
SMESH_TypeFilter* f = 0;
|
SMESH_TypeFilter* f = 0;
|
||||||
switch (myTypeId) {
|
switch (myTypeId) {
|
||||||
case grpNodeSelection: f = new SMESH_TypeFilter(SMESH::GROUP_NODE); break;
|
case grpNodeSelection: f = new SMESH_TypeFilter(SMESH::GROUP_NODE); break;
|
||||||
case grpBallSelection: f = new SMESH_TypeFilter(SMESH::GROUP_BALL); break;
|
case grp0DSelection: f = new SMESH_TypeFilter(SMESH::GROUP_0D); break;
|
||||||
case grpEdgeSelection: f = new SMESH_TypeFilter(SMESH::GROUP_EDGE); break;
|
case grpBallSelection: f = new SMESH_TypeFilter(SMESH::GROUP_BALL); break;
|
||||||
case grpFaceSelection: f = new SMESH_TypeFilter(SMESH::GROUP_FACE); 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;
|
case grpVolumeSelection: f = new SMESH_TypeFilter(SMESH::GROUP_VOLUME); break;
|
||||||
default: f = new SMESH_TypeFilter(SMESH::GROUP);
|
default: f = new SMESH_TypeFilter(SMESH::GROUP);
|
||||||
}
|
}
|
||||||
@ -901,10 +908,11 @@ bool SMESHGUI_GroupDlg::onApply()
|
|||||||
|
|
||||||
SMESH::ElementType aType = SMESH::ALL;
|
SMESH::ElementType aType = SMESH::ALL;
|
||||||
switch (myTypeId) {
|
switch (myTypeId) {
|
||||||
case grpNodeSelection: aType = SMESH::NODE; break;
|
case grpNodeSelection: aType = SMESH::NODE; break;
|
||||||
case grpBallSelection: aType = SMESH::BALL; break;
|
case grp0DSelection: aType = SMESH::ELEM0D; break;
|
||||||
case grpEdgeSelection: aType = SMESH::EDGE; break;
|
case grpBallSelection: aType = SMESH::BALL; break;
|
||||||
case grpFaceSelection: aType = SMESH::FACE; break;
|
case grpEdgeSelection: aType = SMESH::EDGE; break;
|
||||||
|
case grpFaceSelection: aType = SMESH::FACE; break;
|
||||||
case grpVolumeSelection: aType = SMESH::VOLUME; break;
|
case grpVolumeSelection: aType = SMESH::VOLUME; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1144,21 +1152,22 @@ bool SMESHGUI_GroupDlg::onApply()
|
|||||||
if ( aMeshGroupSO )
|
if ( aMeshGroupSO )
|
||||||
if(SMESH_Actor *anActor = SMESH::FindActorByEntry(aMeshGroupSO->GetID().c_str())) {
|
if(SMESH_Actor *anActor = SMESH::FindActorByEntry(aMeshGroupSO->GetID().c_str())) {
|
||||||
anActor->setName(myName->text().toLatin1().data());
|
anActor->setName(myName->text().toLatin1().data());
|
||||||
QColor c;
|
QColor c;
|
||||||
int delta;
|
int delta;
|
||||||
switch ( myTypeId ) {
|
switch ( myTypeId ) {
|
||||||
case grpNodeSelection: anActor->SetNodeColor( aColor.R, aColor.G, aColor.B ); break;
|
case grpNodeSelection: anActor->SetNodeColor( aColor.R, aColor.G, aColor.B ); break;
|
||||||
|
case grp0DSelection: anActor->Set0DColor ( aColor.R, aColor.G, aColor.B ); break;
|
||||||
case grpBallSelection: anActor->SetBallColor( aColor.R, aColor.G, aColor.B ); break;
|
case grpBallSelection: anActor->SetBallColor( aColor.R, aColor.G, aColor.B ); break;
|
||||||
case grpEdgeSelection: anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B ); break;
|
case grpEdgeSelection: anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B ); break;
|
||||||
case grpVolumeSelection:
|
case grpVolumeSelection:
|
||||||
SMESH::GetColor("SMESH", "volume_color", c , delta, "255,0,170|-100");
|
SMESH::GetColor("SMESH", "volume_color", c , delta, "255,0,170|-100");
|
||||||
anActor->SetVolumeColor( aColor.R, aColor.G, aColor.B, delta ); break;
|
anActor->SetVolumeColor( aColor.R, aColor.G, aColor.B, delta ); break;
|
||||||
break;
|
break;
|
||||||
case grpFaceSelection:
|
case grpFaceSelection:
|
||||||
default:
|
default:
|
||||||
SMESH::GetColor("SMESH", "fill_color", c , delta, "0,170,255|-100");
|
SMESH::GetColor("SMESH", "fill_color", c , delta, "0,170,255|-100");
|
||||||
anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B, delta ); break;
|
anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B, delta ); break;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1691,10 +1700,11 @@ void SMESHGUI_GroupDlg::setFilters()
|
|||||||
SMESH::ElementType aType = SMESH::ALL;
|
SMESH::ElementType aType = SMESH::ALL;
|
||||||
switch ( myTypeId )
|
switch ( myTypeId )
|
||||||
{
|
{
|
||||||
case grpNodeSelection: aType = SMESH::NODE; break;
|
case grpNodeSelection: aType = SMESH::NODE; break;
|
||||||
case grpBallSelection: aType = SMESH::BALL; break;
|
case grp0DSelection: aType = SMESH::ELEM0D; break;
|
||||||
case grpEdgeSelection: aType = SMESH::EDGE; break;
|
case grpBallSelection: aType = SMESH::BALL; break;
|
||||||
case grpFaceSelection: aType = SMESH::FACE; break;
|
case grpEdgeSelection: aType = SMESH::EDGE; break;
|
||||||
|
case grpFaceSelection: aType = SMESH::FACE; break;
|
||||||
case grpVolumeSelection: aType = SMESH::VOLUME; break;
|
case grpVolumeSelection: aType = SMESH::VOLUME; break;
|
||||||
default: return;
|
default: return;
|
||||||
}
|
}
|
||||||
@ -1783,6 +1793,10 @@ void SMESHGUI_GroupDlg::onAdd()
|
|||||||
aType = SMESH::BALL;
|
aType = SMESH::BALL;
|
||||||
mySelector->SetSelectionMode(BallSelection);
|
mySelector->SetSelectionMode(BallSelection);
|
||||||
break;
|
break;
|
||||||
|
case grp0DSelection:
|
||||||
|
aType = SMESH::ELEM0D;
|
||||||
|
mySelector->SetSelectionMode(Elem0DSelection);
|
||||||
|
break;
|
||||||
case grpEdgeSelection:
|
case grpEdgeSelection:
|
||||||
aType = SMESH::EDGE;
|
aType = SMESH::EDGE;
|
||||||
mySelector->SetSelectionMode(EdgeSelection);
|
mySelector->SetSelectionMode(EdgeSelection);
|
||||||
@ -2022,10 +2036,11 @@ void SMESHGUI_GroupDlg::onRemove()
|
|||||||
|
|
||||||
SMESH::ElementType aType = SMESH::ALL;
|
SMESH::ElementType aType = SMESH::ALL;
|
||||||
switch(myTypeId) {
|
switch(myTypeId) {
|
||||||
case grpNodeSelection: aType = SMESH::NODE; break;
|
case grpNodeSelection: aType = SMESH::NODE; break;
|
||||||
case grpBallSelection: aType = SMESH::BALL; break;
|
case grp0DSelection: aType = SMESH::ELEM0D; break;
|
||||||
case grpEdgeSelection: aType = SMESH::EDGE; break;
|
case grpBallSelection: aType = SMESH::BALL; break;
|
||||||
case grpFaceSelection: aType = SMESH::FACE; break;
|
case grpEdgeSelection: aType = SMESH::EDGE; break;
|
||||||
|
case grpFaceSelection: aType = SMESH::FACE; break;
|
||||||
case grpVolumeSelection: aType = SMESH::VOLUME; break;
|
case grpVolumeSelection: aType = SMESH::VOLUME; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2583,11 +2598,12 @@ void SMESHGUI_GroupDlg::setShowEntityMode()
|
|||||||
if (!myStoredShownEntity)
|
if (!myStoredShownEntity)
|
||||||
myStoredShownEntity = actor->GetEntityMode();
|
myStoredShownEntity = actor->GetEntityMode();
|
||||||
switch ( myTypeId ) {
|
switch ( myTypeId ) {
|
||||||
case grpNodeSelection: restoreShowEntityMode(); break;
|
case grpNodeSelection: restoreShowEntityMode(); break;
|
||||||
case grpBallSelection: actor->SetEntityMode( SMESH_Actor::eBallElem ); break;
|
case grp0DSelection: actor->SetEntityMode( SMESH_Actor::e0DElements ); break;
|
||||||
case grpEdgeSelection: actor->SetEntityMode( SMESH_Actor::eEdges ); break;
|
case grpBallSelection: actor->SetEntityMode( SMESH_Actor::eBallElem ); break;
|
||||||
case grpFaceSelection: actor->SetEntityMode( SMESH_Actor::eFaces ); break;
|
case grpEdgeSelection: actor->SetEntityMode( SMESH_Actor::eEdges ); break;
|
||||||
case grpVolumeSelection: actor->SetEntityMode( SMESH_Actor::eVolumes ); break;
|
case grpFaceSelection: actor->SetEntityMode( SMESH_Actor::eFaces ); break;
|
||||||
|
case grpVolumeSelection: actor->SetEntityMode( SMESH_Actor::eVolumes ); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4827,6 +4827,14 @@ Please select valid object and try again</translation>
|
|||||||
<source>NODES_TLT</source>
|
<source>NODES_TLT</source>
|
||||||
<translation>Filter for Nodes</translation>
|
<translation>Filter for Nodes</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ELEM0D_TLT</source>
|
||||||
|
<translation>Filter for 0D Elements</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>BALL_TLT</source>
|
||||||
|
<translation>Filter for Balls</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SELECTION</source>
|
<source>SELECTION</source>
|
||||||
<translation>Initial Selection</translation>
|
<translation>Initial Selection</translation>
|
||||||
@ -5099,6 +5107,10 @@ Please check input data and try again</translation>
|
|||||||
<source>BALLS</source>
|
<source>BALLS</source>
|
||||||
<translation>Balls</translation>
|
<translation>Balls</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ELEM0D</source>
|
||||||
|
<translation>0D Elements</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>EDGES</source>
|
<source>EDGES</source>
|
||||||
<translation>Edges</translation>
|
<translation>Edges</translation>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user