]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
52456: Propagation does not work
authoreap <eap@opencascade.com>
Fri, 18 Jul 2014 16:23:31 +0000 (20:23 +0400)
committereap <eap@opencascade.com>
Fri, 18 Jul 2014 16:23:31 +0000 (20:23 +0400)
src/StdMeshers/StdMeshers_Propagation.cxx

index 730bc5a52e11d78fe6ddae8575aa3e35673ce270..dc71428c8e1a143e795bc8adb9ee1ece09a16ad2 100644 (file)
@@ -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() )