X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSMESH_I%2FSMESH_Filter_i.cxx;h=bfb52b21802a22e640e09a1d0ed9d5beb3f3811f;hb=refs%2Ftags%2FV4_1_0rc2;hp=77305f346de429113a11b7cd2768eb382a09e9ee;hpb=e913c3429b8f45e35a5cfc97adb8b68e86ccd56a;p=modules%2Fsmesh.git 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();