From: jfa Date: Mon, 10 Dec 2007 14:10:00 +0000 (+0000) Subject: NPAL18095: Pb. with dump python and mesh group by filter. X-Git-Tag: V3_2_9 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=7e350caa2f1f4cbb2f3d948558c2710d73e76136;hp=c23d4596799c724bd08026c80c0be1e1dcbf503c 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 de4d8d81d..98ae207de 100644 --- a/src/SMESH_I/SMESH_Filter_i.cxx +++ b/src/SMESH_I/SMESH_Filter_i.cxx @@ -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();