#include "SMDS_MeshNode.hxx"
#include "SMDS_MeshElement.hxx"
#include "SMDS_ElemIterator.hxx"
-#include "SMDS_VolumeTool.hxx"
#include "SMESHDS_Mesh.hxx"
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();
}
}
static const char* functName[ SMESH::FT_Undefined + 1 ] = {
// If this line doesn't compile, this means that enum FunctorType has changed and
// it's necessary to update this array accordingly (refer to SMESH_Filter.idl)
+ // The order is IMPORTANT !!!
"FT_AspectRatio", "FT_AspectRatio3D", "FT_Warping", "FT_MinimumAngle",
"FT_Taper", "FT_Skew", "FT_Area", "FT_Volume3D", "FT_MaxElementLength2D",
"FT_MaxElementLength3D", "FT_FreeBorders", "FT_FreeEdges", "FT_FreeNodes",
const char* SMESH::FunctorTypeToString(SMESH::FunctorType ft)
{
if ( ft < 0 || ft > SMESH::FT_Undefined )
- return 0;
+ return "FT_Undefined";
return getFunctNames()[ ft ];
}
{
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;