Salome HOME
Another fix like previous one.
[modules/smesh.git] / src / SMESH_I / SMESH_Filter_i.cxx
index b6cde44c68776ac9070eb5bde0332285738eeac2..40742a667a47a06723cd0b38c872cde6f903f473 100644 (file)
@@ -533,7 +533,7 @@ static TopoDS_Shape getShapeByID (const char* theID)
 
 static char* getShapeNameByID (const char* theID)
 {
-  char* aName = "";
+  char* aName = (char*)"";
 
   if (theID != 0 && theID != "") {
     SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
@@ -1995,7 +1995,7 @@ FilterLibrary_ptr FilterManager_i::LoadLibrary( const char* aFileName )
 {
   SMESH::FilterLibrary_i* aServant = new SMESH::FilterLibrary_i( aFileName );
   SMESH::FilterLibrary_var anObj = aServant->_this();
-  TPythonDump()<<aServant<<" = "<<this<<".LoadLibrary("<<aFileName<<")";
+  TPythonDump()<<aServant<<" = "<<this<<".LoadLibrary('"<<aFileName<<"')";
   return anObj._retn();
 }
 
@@ -2380,9 +2380,10 @@ CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria
       TPythonDump pd;
       pd << "aCriterion = SMESH.Filter.Criterion(" << aCriterion << "," << aCompare
          << "," << aThreshold << ",'" << aThresholdStr;
-      if (aThresholdID)
-       pd << "',salome.ObjectToID(" << aThresholdID
-          << ")," << aUnary << "," << aBinary << "," << aTolerance
+      if (aThresholdID && strlen(aThresholdID))
+       //pd << "',salome.ObjectToID(" << aThresholdID
+        pd << "','" << aThresholdID
+          << "'," << aUnary << "," << aBinary << "," << aTolerance
           << "," << aTypeOfElem << "," << aPrecision << ")";
       else
        pd << "',''," << aUnary << "," << aBinary << "," << aTolerance
@@ -2515,7 +2516,7 @@ CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria
         {
           SMESH::ElemGeomType_ptr tmpPred = aFilterMgr->CreateElemGeomType();
           tmpPred->SetElementType( aTypeOfElem );
-          tmpPred->SetGeometryType( (GeometryType)(aThreshold + 0.5) );
+          tmpPred->SetGeometryType( (GeometryType)(int)(aThreshold + 0.5) );
           aPredicate = tmpPred;
           break;
         }