std::vector<int> elements;
myNumericalFunctorPtr->GetHistogram(nbIntervals,nbEvents,funValues,elements);
+#ifdef WIN32
+ nbIntervals = CORBA::Short( min( nbEvents.size(), funValues.size() - 1));
+#else
nbIntervals = CORBA::Short( std::min( nbEvents.size(), funValues.size() - 1));
+#endif
SMESH::Histogram_var histogram = new SMESH::Histogram;
if ( nbIntervals > 0 )
{
{
myFilter.SetPredicate( myPredicate->GetPredicate() );
myPredicate->Register();
+ if ( const SMDS_Mesh* aMesh = MeshPtr2SMDSMesh(myMesh))
+ myPredicate->GetPredicate()->SetMesh( aMesh );
TPythonDump()<<this<<".SetPredicate("<<myPredicate<<")";
}
std::list<TPredicateChangeWaiter*>::iterator i = myWaiters.begin();
myMesh = SMESH_Mesh::_duplicate( theMesh );
TPythonDump()<<this<<".SetMesh("<<theMesh<<")";
+
+ if ( myPredicate )
+ if ( const SMDS_Mesh* aMesh = MeshPtr2SMDSMesh(theMesh))
+ myPredicate->GetPredicate()->SetMesh( aMesh );
}
SMESH::long_array*
else
{
SMESH::Predicate_var anObj = myPredicate->_this();
+ // if ( SMESH::Functor_i* fun = SMESH::DownCast<SMESH::Functor_i*>( anObj ))
+ // TPythonDump() << fun << " = " << this << ".GetPredicate()";
return anObj._retn();
}
}
{
std::string name( str + 3 ); // skip "FT_"
const char** functNames = getFunctNames();
- int ft = SMESH::FT_Undefined;
- for ( ; ft >= 0; --ft )
+ int ft = 0;
+ for ( ; ft < SMESH::FT_Undefined; ++ft )
if ( name == ( functNames[ft] + 3 ))
break;