mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-28 07:50:32 +05:00
Managing group during reload mesh
This commit is contained in:
parent
224dbbb87e
commit
f8ea158a33
@ -1115,12 +1115,28 @@ namespace
|
||||
}
|
||||
|
||||
SMESH::SMESH_Mesh_var aMeshByIO = SMESH::GetMeshByIO(anIObject);
|
||||
|
||||
SMESH::SelectionProxy aMesh = SMESH::SelectionProxy(aMeshItem);
|
||||
SMESH::MedInfo anInfo = aMesh.medFileInfo();
|
||||
if (!anInfo.isValid())
|
||||
continue;
|
||||
|
||||
SMESH::ListOfGroups aGroups = *aMeshByIO->GetGroups();
|
||||
for (int i = 0; i < aGroups.length(); ++i)
|
||||
{
|
||||
auto X = aGroups[i];
|
||||
_PTR(SObject) aGroupSObject = SMESH::FindSObject(X);
|
||||
SMESH_Actor* anActor = SMESH::FindActorByEntry(aGroupSObject->GetID().c_str());
|
||||
SMESH::smIdType_array aMeshInfo = *X->GetMeshInfo();
|
||||
|
||||
if (anActor)
|
||||
{
|
||||
vtkTypeBool isVisib = anActor->GetVisibility();
|
||||
SMESH::UpdateView(!isVisib ? SMESH::eDisplay : SMESH::eErase, aGroupSObject->GetID().c_str());
|
||||
}
|
||||
else
|
||||
SMESH::UpdateView(SMESH::eErase, aGroupSObject->GetID().c_str());
|
||||
}
|
||||
|
||||
SMESH::mesh_array_var aMeshes = new SMESH::mesh_array;
|
||||
{
|
||||
// re-import mesh
|
||||
@ -1138,7 +1154,7 @@ namespace
|
||||
anApp->browseObjects(anEntryList);
|
||||
}
|
||||
|
||||
SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(aMeshItem);\
|
||||
SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(aMeshItem);
|
||||
QString aMeshName = anIObject->getName();
|
||||
aMeshList.append(QPair< SMESH::SMESH_IDSource_var, QString >(aMeshItem, aMeshName));
|
||||
|
||||
|
@ -1603,6 +1603,7 @@ SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromMED( const char*
|
||||
|
||||
SMESH::mesh_array* SMESH_Gen_i::ReloadMeshesFromMED(const char* theFileName, SMESH::SMESH_Mesh_ptr sourceMesh, SMESH::DriverMED_ReadStatus& theStatus)
|
||||
{
|
||||
SMESH::ListOfGroups anOldGroups = *sourceMesh->GetGroups();
|
||||
checkFileReadable(theFileName);
|
||||
|
||||
#ifdef WIN32
|
||||
@ -1663,7 +1664,13 @@ SMESH::mesh_array* SMESH_Gen_i::ReloadMeshesFromMED(const char* theFileName, SME
|
||||
if (status1 > theStatus)
|
||||
theStatus = status1;
|
||||
|
||||
for (int i = 0; i < anOldGroups.length(); ++i)
|
||||
{
|
||||
//auto X = anOldGroups[i];
|
||||
sourceMesh->RemoveGroup(anOldGroups[i]);
|
||||
}
|
||||
aResult[i++] = SMESH::SMESH_Mesh::_duplicate(sourceMesh);
|
||||
|
||||
meshServant->GetImpl().GetMeshDS()->Modified();
|
||||
}
|
||||
if (!aStudyBuilder->_is_nil())
|
||||
|
Loading…
Reference in New Issue
Block a user