]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
NPAL18095: Pb. with dump python and mesh group by filter. V4_1_0rc2
authorjfa <jfa@opencascade.com>
Thu, 6 Dec 2007 11:23:55 +0000 (11:23 +0000)
committerjfa <jfa@opencascade.com>
Thu, 6 Dec 2007 11:23:55 +0000 (11:23 +0000)
src/SMESH_I/SMESH_Filter_i.cxx

index 77305f346de429113a11b7cd2768eb382a09e9ee..bfb52b21802a22e640e09a1d0ed9d5beb3f3811f 100644 (file)
@@ -2056,10 +2056,18 @@ CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria
     ElementType aTypeOfElem   = theCriteria[ i ].TypeOfElement;
     long        aPrecision    = theCriteria[ i ].Precision;
 
-    TPythonDump() << "aCriterion = SMESH.Filter.Criterion(" << aCriterion << "," << aCompare
-                  << "," << aThreshold << ",'" << aThresholdStr << "',salome.ObjectToID("
-                  << aThresholdID << ")," << aUnary << "," << aBinary << "," << aTolerance
-                  << "," << aTypeOfElem << "," << aPrecision << ")";
+    {
+      TPythonDump pd;
+      pd << "aCriterion = SMESH.Filter.Criterion(" << aCriterion << "," << aCompare
+         << "," << aThreshold << ",'" << aThresholdStr;
+      if (strlen(aThresholdID) > 0)
+        pd << "',salome.ObjectToID(" << aThresholdID
+           << ")," << aUnary << "," << aBinary << "," << aTolerance
+           << "," << aTypeOfElem << "," << aPrecision << ")";
+      else
+        pd << "',''," << aUnary << "," << aBinary << "," << aTolerance
+           << "," << aTypeOfElem << "," << aPrecision << ")";
+    }
 
     SMESH::Predicate_ptr aPredicate = SMESH::Predicate::_nil();
     SMESH::NumericalFunctor_ptr aFunctor = SMESH::NumericalFunctor::_nil();