From: jfa Date: Thu, 6 Dec 2007 11:23:55 +0000 (+0000) Subject: NPAL18095: Pb. with dump python and mesh group by filter. X-Git-Tag: V4_1_0rc2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bee39a08f40691fe9df024ef47a69df242088684;p=modules%2Fsmesh.git NPAL18095: Pb. with dump python and mesh group by filter. --- 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();