]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
PAL13473 (Build repetitive mesh):
authoreap <eap@opencascade.com>
Fri, 8 Dec 2006 14:48:16 +0000 (14:48 +0000)
committereap <eap@opencascade.com>
Fri, 8 Dec 2006 14:48:16 +0000 (14:48 +0000)
in CheckHypothesis(), check that src shape is not equal to
target one in the same mesh

src/StdMeshers/StdMeshers_Projection_1D.cxx
src/StdMeshers/StdMeshers_Projection_2D.cxx

index bde70d3950a11fb030a22225e968db9cc7a327b6..f487d83925d2e2a668e548eba35647bae3906c2e 100644 (file)
@@ -132,11 +132,24 @@ bool StdMeshers_Projection_1D::CheckHypothesis(SMESH_Mesh&
            !TAssocTool::IsSubShape( _sourceHypo->GetTargetVertex(), aShape )  ||
            !TAssocTool::IsSubShape( _sourceHypo->GetSourceVertex(),
                                     _sourceHypo->GetSourceEdge() ))
+      {
         aStatus = SMESH_Hypothesis::HYP_BAD_PARAMETER;
+        SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetSourceVertex(), srcMesh )));
+        SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetTargetVertex(), tgtMesh )));
+        SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetTargetVertex(), aShape ) ));
+        SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetSourceVertex(),
+                                        _sourceHypo->GetSourceEdge() )));
+      }
     }
     // check source edge
-    if ( !TAssocTool::IsSubShape( _sourceHypo->GetSourceEdge(), srcMesh ))
-      aStatus = SMESH_Hypothesis::HYP_BAD_PARAMETER;
+    if ( !TAssocTool::IsSubShape( _sourceHypo->GetSourceEdge(), srcMesh ) ||
+         ( srcMesh == tgtMesh && aShape == _sourceHypo->GetSourceEdge() ))
+    {
+      aStatus = HYP_BAD_PARAMETER;
+      SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetSourceEdge(), srcMesh )));
+      SCRUTE((srcMesh == tgtMesh));
+      SCRUTE(( aShape == _sourceHypo->GetSourceEdge() ));
+    }
   }
   else
   {
index 36f4a3b5448da2131cb68cadb8826ef968a5e7e7..b7b3ff3e61004ecf2fc68d354e14ee3d2cb644c1 100644 (file)
@@ -133,10 +133,10 @@ bool StdMeshers_Projection_2D::CheckHypothesis(SMESH_Mesh&
            !TAssocTool::IsSubShape( edge, srcMesh ) ||
            !TAssocTool::IsSubShape( edge, _sourceHypo->GetSourceFace() ))
       {
+        theStatus = HYP_BAD_PARAMETER;
         SCRUTE((edge.IsNull()));
         SCRUTE((TAssocTool::IsSubShape( edge, srcMesh )));
         SCRUTE((TAssocTool::IsSubShape( edge, _sourceHypo->GetSourceFace() )));
-        theStatus = HYP_BAD_PARAMETER;
       }
       else
       {
@@ -147,17 +147,21 @@ bool StdMeshers_Projection_2D::CheckHypothesis(SMESH_Mesh&
              !TAssocTool::IsSubShape( edge, tgtMesh ) ||
              !TAssocTool::IsSubShape( edge, theShape ))
         {
+          theStatus = HYP_BAD_PARAMETER;
           SCRUTE((edge.IsNull()));
           SCRUTE((TAssocTool::IsSubShape( edge, tgtMesh )));
           SCRUTE((TAssocTool::IsSubShape( edge, theShape )));
-          theStatus = HYP_BAD_PARAMETER;
         }
       }
     }
     // check a source face
-    if ( !TAssocTool::IsSubShape( _sourceHypo->GetSourceFace(), srcMesh )) {
-      MESSAGE("Bad source face"); 
+    if ( !TAssocTool::IsSubShape( _sourceHypo->GetSourceFace(), srcMesh ) ||
+         ( srcMesh == tgtMesh && theShape == _sourceHypo->GetSourceFace() ))
+    {
       theStatus = HYP_BAD_PARAMETER;
+      SCRUTE((TAssocTool::IsSubShape( _sourceHypo->GetSourceFace(), srcMesh )));
+      SCRUTE((srcMesh == tgtMesh));
+      SCRUTE(( theShape == _sourceHypo->GetSourceFace() ));
     }
   }
   else