From bee39a08f40691fe9df024ef47a69df242088684 Mon Sep 17 00:00:00 2001 From: jfa Date: Thu, 6 Dec 2007 11:23:55 +0000 Subject: [PATCH] NPAL18095: Pb. with dump python and mesh group by filter. --- src/SMESH_I/SMESH_Filter_i.cxx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/SMESH_I/SMESH_Filter_i.cxx b/src/SMESH_I/SMESH_Filter_i.cxx index 77305f346..bfb52b218 100644 --- a/src/SMESH_I/SMESH_Filter_i.cxx +++ b/src/SMESH_I/SMESH_Filter_i.cxx @@ -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(); -- 2.39.2