From 34b74c20dea1bec53d91101a397fc6428da7032e Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 7 Dec 2006 08:31:36 +0000 Subject: [PATCH] PAL13473 (Build repetitive mesh): use SMESH_subMeshEventListener to track dependence between top and bottom submeshes --- src/StdMeshers/StdMeshers_Penta_3D.cxx | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/StdMeshers/StdMeshers_Penta_3D.cxx b/src/StdMeshers/StdMeshers_Penta_3D.cxx index f615ea97a..f183a80da 100644 --- a/src/StdMeshers/StdMeshers_Penta_3D.cxx +++ b/src/StdMeshers/StdMeshers_Penta_3D.cxx @@ -35,9 +35,12 @@ #include "SMDS_VolumeTool.hxx" #include "SMESHDS_SubMesh.hxx" #include "SMESH_Mesh.hxx" -#include "SMESH_subMesh.hxx" #include "SMESH_MeshEditor.hxx" +#include "SMESH_subMesh.hxx" +#include "SMESH_subMeshEventListener.hxx" +#include +#include #include #include #include @@ -46,14 +49,12 @@ #include #include #include +#include #include #include #include #include #include -#include -#include -#include #include #include @@ -828,6 +829,7 @@ void StdMeshers_Penta_3D::MakeMeshOnFxy1() SMESH_Mesh* pMesh = GetMesh(); SMESHDS_Mesh * meshDS = pMesh->GetMeshDS(); // + SMESH_subMesh *aSubMesh1 = pMesh->GetSubMeshContaining(aFxy1); SMESH_subMesh *aSubMesh0 = pMesh->GetSubMeshContaining(aFxy0); SMESHDS_SubMesh *aSM0 = aSubMesh0->GetSubMeshDS(); // @@ -888,6 +890,16 @@ void StdMeshers_Penta_3D::MakeMeshOnFxy1() } meshDS->SetMeshElementOnShape(face, aFxy1); } + + // update compute state of top face submesh + aSubMesh1->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE ); + + // assure that mesh on the top face will be cleaned when it is cleaned + // on the bottom face + SMESH_subMesh* volSM = pMesh->GetSubMesh( myTool->GetSubShape() ); + volSM->SetEventListener( new SMESH_subMeshEventListener(true), + SMESH_subMeshEventListenerData::MakeData( aSubMesh1 ), + aSubMesh0 ); // translate CLEAN event of aSubMesh0 to aSubMesh1 } //======================================================================= -- 2.39.2