]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix a regression: Errors of hypothesis definition are not shown in GUI
authoreap <eap@opencascade.com>
Wed, 27 Aug 2014 15:16:07 +0000 (19:16 +0400)
committereap <eap@opencascade.com>
Wed, 27 Aug 2014 15:16:07 +0000 (19:16 +0400)
src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx
src/SMESH_SWIG/StdMeshersBuilder.py
src/StdMeshers/StdMeshers_Projection_2D.cxx

index 379ed1b2ba3bc6467deddd3fab9f7562b03a4871..836c2e3609f2fe2b0a8b0dc9c2f516a54216239f 100644 (file)
@@ -128,7 +128,7 @@ namespace SMESH
       }
       else
       {
-        QObject::tr(QString("SMESH_HYP_%1").arg(theHypStatus).toLatin1().data());
+        aMsg += QObject::tr(QString("SMESH_HYP_%1").arg(theHypStatus).toLatin1().data());
 
         if ( theHypStatus == SMESH::HYP_HIDDEN_ALGO ) { // PAL18501
           CORBA::String_var hypType = theHyp->GetName();
index 0d6a55acbf8d98a54093e5566d24875220cf8562..1496202ffeaaf9884fddc74c4e92c65807e2caac 100644 (file)
@@ -830,12 +830,13 @@ class StdMeshersBuilder_Projection2D(Mesh_Algorithm):
             from salome.smesh.smeshBuilder import AssureGeomPublished
             AssureGeomPublished( self.mesh, geom )
         hyp = self.Hypothesis("ProjectionSource2D", [face,mesh,srcV1,tgtV1,srcV2,tgtV2],
-                              UseExisting=0)
+                              UseExisting=0, toAdd=False)
         # it does not seem to be useful to reuse the existing "SourceFace" hypothesis
                               #UseExisting=UseExisting, CompareMethod=self.CompareSourceFace)
         hyp.SetSourceFace( face )
         hyp.SetSourceMesh( mesh )
         hyp.SetVertexAssociation( srcV1, srcV2, tgtV1, tgtV2 )
+        self.mesh.AddHypothesis(hyp, self.geom)
         return hyp
 
     pass # end of StdMeshersBuilder_Projection2D class
index aef9d82b78a5c5dfae35012aa7e4243884992039..b0118c7199c8020693cc5056f2a5f1ccc69ac7d6 100644 (file)
@@ -139,6 +139,7 @@ bool StdMeshers_Projection_2D::CheckHypothesis(SMESH_Mesh&
            !SMESH_MesherHelper::IsSubShape( edge, _sourceHypo->GetSourceFace() ))
       {
         theStatus = HYP_BAD_PARAMETER;
+        error("Invalid source vertices");
         SCRUTE((edge.IsNull()));
         SCRUTE((SMESH_MesherHelper::IsSubShape( edge, srcMesh )));
         SCRUTE((SMESH_MesherHelper::IsSubShape( edge, _sourceHypo->GetSourceFace() )));
@@ -151,6 +152,7 @@ bool StdMeshers_Projection_2D::CheckHypothesis(SMESH_Mesh&
         if ( edge.IsNull() || !SMESH_MesherHelper::IsSubShape( edge, tgtMesh ))
         {
           theStatus = HYP_BAD_PARAMETER;
+          error("Invalid target vertices");
           SCRUTE((edge.IsNull()));
           SCRUTE((SMESH_MesherHelper::IsSubShape( edge, tgtMesh )));
         }
@@ -159,6 +161,7 @@ bool StdMeshers_Projection_2D::CheckHypothesis(SMESH_Mesh&
                   !SMESH_MesherHelper::IsSubShape( edge, theShape ))
         {
           theStatus = HYP_BAD_PARAMETER;
+          error("Invalid target vertices");
           SCRUTE((SMESH_MesherHelper::IsSubShape( edge, theShape )));
         }
       }
@@ -168,6 +171,7 @@ bool StdMeshers_Projection_2D::CheckHypothesis(SMESH_Mesh&
          ( srcMesh == tgtMesh && theShape == _sourceHypo->GetSourceFace() ))
     {
       theStatus = HYP_BAD_PARAMETER;
+      error("Invalid source face");
       SCRUTE((SMESH_MesherHelper::IsSubShape( _sourceHypo->GetSourceFace(), srcMesh )));
       SCRUTE((srcMesh == tgtMesh));
       SCRUTE(( theShape == _sourceHypo->GetSourceFace() ));