mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-27 13:20:34 +05:00
IMP 22635: EDF 8345 - Creation of group based on groups
Bug: MAJORITY mode works wrong with triangles IMP 22877: EDF 10054 SMESH: Add a new filter "BelongToSmeshGroup" for Create Groupe Bug: Invalid Python dump
This commit is contained in:
parent
5ac2bd91a8
commit
d547f440f8
@ -3718,7 +3718,7 @@ void SMESHGUI_FilterDlg::onSelectionDone()
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SMESH::FT_BelongToMeshGroup: // get a group name and IOR
|
case SMESH::FT_BelongToMeshGroup: // get a group Name and Entry
|
||||||
{
|
{
|
||||||
SMESH::SMESH_GroupBase_var grp = SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(anIO);
|
SMESH::SMESH_GroupBase_var grp = SMESH::IObjectToInterface<SMESH::SMESH_GroupBase>(anIO);
|
||||||
if ( !grp->_is_nil() )
|
if ( !grp->_is_nil() )
|
||||||
@ -3732,13 +3732,8 @@ void SMESHGUI_FilterDlg::onSelectionDone()
|
|||||||
if ( !myGroup->_is_nil() && myGroup->IsInDependency( grp ))
|
if ( !myGroup->_is_nil() && myGroup->IsInDependency( grp ))
|
||||||
return; // avoid cyclic dependencies between Groups on Filter
|
return; // avoid cyclic dependencies between Groups on Filter
|
||||||
|
|
||||||
SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>
|
|
||||||
( SUIT_Session::session()->activeApplication() );
|
|
||||||
if( !app ) return;
|
|
||||||
CORBA::String_var IOR = app->orb()->object_to_string( grp );
|
|
||||||
|
|
||||||
myTable->SetThreshold(aRow, SMESH::toQStr( grp->GetName() ));
|
myTable->SetThreshold(aRow, SMESH::toQStr( grp->GetName() ));
|
||||||
myTable->SetID (aRow, IOR.in() );
|
myTable->SetID (aRow, anIO->getEntry() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default: // get a GEOM object
|
default: // get a GEOM object
|
||||||
@ -3747,7 +3742,7 @@ void SMESHGUI_FilterDlg::onSelectionDone()
|
|||||||
if (!anObj->_is_nil())
|
if (!anObj->_is_nil())
|
||||||
{
|
{
|
||||||
myTable->SetThreshold(aRow, GEOMBase::GetName(anObj));
|
myTable->SetThreshold(aRow, GEOMBase::GetName(anObj));
|
||||||
myTable->SetID(aRow, anIO->getEntry());
|
myTable->SetID (aRow, anIO->getEntry());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -306,6 +306,8 @@ namespace {
|
|||||||
// - FT_EntityType = 36
|
// - FT_EntityType = 36
|
||||||
// v 7.3.0: FT_Undefined == 46, new items:
|
// v 7.3.0: FT_Undefined == 46, new items:
|
||||||
// - FT_ConnectedElements = 39
|
// - FT_ConnectedElements = 39
|
||||||
|
// v 7.6.0: FT_Undefined == 47, new items:
|
||||||
|
// - FT_BelongToMeshGroup = 22
|
||||||
//
|
//
|
||||||
// It's necessary to continue recording this history and to fill
|
// It's necessary to continue recording this history and to fill
|
||||||
// undef2newItems (see below) accordingly.
|
// undef2newItems (see below) accordingly.
|
||||||
@ -326,6 +328,7 @@ namespace {
|
|||||||
undef2newItems[ 44 ].push_back( 37 );
|
undef2newItems[ 44 ].push_back( 37 );
|
||||||
undef2newItems[ 45 ].push_back( 36 );
|
undef2newItems[ 45 ].push_back( 36 );
|
||||||
undef2newItems[ 46 ].push_back( 39 );
|
undef2newItems[ 46 ].push_back( 39 );
|
||||||
|
undef2newItems[ 47 ].push_back( 22 );
|
||||||
|
|
||||||
ASSERT( undef2newItems.rbegin()->first == SMESH::FT_Undefined );
|
ASSERT( undef2newItems.rbegin()->first == SMESH::FT_Undefined );
|
||||||
}
|
}
|
||||||
|
@ -764,7 +764,7 @@ void BelongToMeshGroup_i::SetGroupID( const char* theID ) // IOR or StoreName
|
|||||||
CORBA::Object_var obj = SMESH_Gen_i::GetORB()->string_to_object( myID.c_str() );
|
CORBA::Object_var obj = SMESH_Gen_i::GetORB()->string_to_object( myID.c_str() );
|
||||||
SetGroup( SMESH::SMESH_GroupBase::_narrow( obj ));
|
SetGroup( SMESH::SMESH_GroupBase::_narrow( obj ));
|
||||||
}
|
}
|
||||||
else if ( strncmp( ":0", myID.c_str(), 2 ) == 0 ) // transient mode + GUI
|
else if ( strncmp( "0:", myID.c_str(), 2 ) == 0 ) // transient mode + GUI
|
||||||
{
|
{
|
||||||
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
||||||
SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy();
|
SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy();
|
||||||
|
@ -1615,7 +1615,7 @@ namespace // functions making checks according to SMESH::NB_COMMON_NODES_ENUM
|
|||||||
bool isMajorityOfNodesCommon(int nbChecked, int nbCommon, int nbNodes, int nbCorners,
|
bool isMajorityOfNodesCommon(int nbChecked, int nbCommon, int nbNodes, int nbCorners,
|
||||||
bool & toStopChecking )
|
bool & toStopChecking )
|
||||||
{
|
{
|
||||||
return nbCommon >= nbNodes / 2;
|
return nbCommon >= (nbNodes+1) / 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -757,6 +757,13 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen):
|
|||||||
raise ValueError, "Group type mismatches Element type"
|
raise ValueError, "Group type mismatches Element type"
|
||||||
aCriterion.ThresholdStr = aThreshold.GetName()
|
aCriterion.ThresholdStr = aThreshold.GetName()
|
||||||
aCriterion.ThresholdID = salome.orb.object_to_string( aThreshold )
|
aCriterion.ThresholdID = salome.orb.object_to_string( aThreshold )
|
||||||
|
study = self.GetCurrentStudy()
|
||||||
|
if study:
|
||||||
|
so = study.FindObjectIOR( aCriterion.ThresholdID )
|
||||||
|
if so:
|
||||||
|
entry = so.GetID()
|
||||||
|
if entry:
|
||||||
|
aCriterion.ThresholdID = entry
|
||||||
else:
|
else:
|
||||||
raise TypeError, "The Threshold should be a Mesh Group"
|
raise TypeError, "The Threshold should be a Mesh Group"
|
||||||
elif CritType == FT_RangeOfIds:
|
elif CritType == FT_RangeOfIds:
|
||||||
|
Loading…
Reference in New Issue
Block a user