From 9bfa6616ba8a2e4c8aeb91baff956d6c0fc06e55 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 18 Jul 2014 20:23:31 +0400 Subject: [PATCH] 52456: Propagation does not work --- src/StdMeshers/StdMeshers_Propagation.cxx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/StdMeshers/StdMeshers_Propagation.cxx b/src/StdMeshers/StdMeshers_Propagation.cxx index 730bc5a52..dc71428c8 100644 --- a/src/StdMeshers/StdMeshers_Propagation.cxx +++ b/src/StdMeshers/StdMeshers_Propagation.cxx @@ -210,13 +210,15 @@ namespace { * \brief Returns a local 1D hypothesis used for theEdge */ const SMESH_Hypothesis* getLocal1DHyp (SMESH_Mesh& theMesh, - const TopoDS_Shape& theEdge) + const TopoDS_Shape& theEdge, + TopoDS_Shape* theSssignedTo=0) { static SMESH_HypoFilter hypo; hypo.Init( hypo.HasDim( 1 )). AndNot ( hypo.IsAlgo() ). - AndNot ( hypo.IsAssignedTo( theMesh.GetMeshDS()->ShapeToMesh() )); - return theMesh.GetHypothesis( theEdge, hypo, true ); + AndNot ( hypo.IsAssignedTo( theMesh.GetShapeToMesh() )); + + return theMesh.GetHypothesis( theEdge, hypo, true, theSssignedTo ); } //============================================================================= /*! @@ -258,6 +260,10 @@ namespace { SMESH_Mesh* mesh = theMainSubMesh->GetFather(); + TopoDS_Shape shapeOfHyp1D; // shape to which an hyp being propagated is assigned + const SMESH_Hypothesis* hyp1D = getLocal1DHyp( *mesh, theMainEdge, &shapeOfHyp1D ); + SMESH_HypoFilter moreLocalCheck( SMESH_HypoFilter::IsMoreLocalThan( shapeOfHyp1D, *mesh )); + PropagationMgrData* chainData = getData( theMainSubMesh ); chainData->SetState( HAS_PROPAG_HYP ); @@ -355,7 +361,8 @@ namespace { if ( oppData->State() == WAIT_PROPAG_HYP ) // ... anOppE is not in any chain { oppData->SetSource( theMainSubMesh ); - if ( !getLocal1DHyp( *mesh, anOppE )) // ... no 1d hyp on anOppE + if ( ! (hyp1D = getLocal1DHyp( *mesh, anOppE, &shapeOfHyp1D )) || //...no 1d hyp on anOppE + ! (moreLocalCheck.IsOk( hyp1D, shapeOfHyp1D ))) // ... or hyp1D is "more global" { oppData->myForward = data->myForward; if ( edges[ edgeIndex ].Orientation() == anOppE.Orientation() ) -- 2.39.2