From 00bd895f4432dd67f39c9f4e5066bfdc2f337a24 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 6 Sep 2018 16:12:29 +0300 Subject: [PATCH] Regression revealed after restoring mesh data destruction at study closing --- src/SMESH/SMESH_MeshEditor.cxx | 4 ++-- src/SMESH/SMESH_subMesh.cxx | 2 ++ src/SMESH_SWIG/smeshBuilder.py | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index 67d0c6069..ceaeb1acb 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -6771,8 +6771,8 @@ SMESH_MeshEditor::PGroupIDs SMESH_MeshEditor::Offset( TIDSortedElemSet & theElem meshDS->RemoveFreeElement( eIt->next(), 0 ); } - offsetMesh->Modified(); - offsetMesh->CompactMesh(); // make IDs start from 1 + // offsetMesh->Modified(); + // offsetMesh->CompactMesh(); // make IDs start from 1 // source elements for each generated one SMESH_SequenceOfElemPtr srcElems, srcNodes; diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index a3b12c77e..7bab8d9e7 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -1683,6 +1683,8 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event) else updateDependantsState( SUBMESH_COMPUTED ); } + // let algo clear its data gathered while algo->Compute() + algo->CheckHypothesis((*_father), _subShape, hyp_status); } break; case COMPUTE_CANCELED: // nothing to do diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py index b4c07b9f4..d0bb913c1 100755 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -303,6 +303,8 @@ def AssureGeomPublished(mesh, geom, name=''): """ Private method. Add geom (sub-shape of the main shape) into the study if not yet there """ + if not mesh.smeshpyD.IsEnablePublish(): + return if not isinstance( geom, geomBuilder.GEOM._objref_GEOM_Object ): return if not geom.GetStudyEntry(): -- 2.39.2