]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
NPAL18095: Pb. with dump python and mesh group by filter. V3_2_9 V3_2_9rc3
authorjfa <jfa@opencascade.com>
Mon, 10 Dec 2007 14:10:00 +0000 (14:10 +0000)
committerjfa <jfa@opencascade.com>
Mon, 10 Dec 2007 14:10:00 +0000 (14:10 +0000)
src/SMESH_I/SMESH_Filter_i.cxx

index de4d8d81d4795c658eb6ad90885710dfb82080e2..98ae207dec57ab53a1f73e58128b6a82c681138d 100644 (file)
@@ -2052,10 +2052,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();