using namespace std;
+//#include <vtkDebugLeaks.h>
+
+
//=============================================================================
/*!
* Constructor
_segmentation = _nbSegments = 10;
SMDS_Mesh::_meshList.clear();
MESSAGE(SMDS_Mesh::_meshList.size());
- _counters = new counters(100);
+ //_counters = new counters(100);
#ifdef WITH_SMESH_CANCEL_COMPUTE
_compute_canceled = false;
_sm_current = NULL;
#endif
+ //vtkDebugLeaks::SetExitError(0);
}
//=============================================================================
SMESH_Gen::~SMESH_Gen()
{
MESSAGE("SMESH_Gen::~SMESH_Gen");
+ std::map < int, StudyContextStruct * >::iterator i_sc = _mapStudyContext.begin();
+ for ( ; i_sc != _mapStudyContext.end(); ++i_sc )
+ {
+ delete i_sc->second->myDocument;
+ delete i_sc->second;
+ }
}
//=============================================================================
.And( SMESH_HypoFilter::IsMoreLocalThan( algoShape, aMesh ));
if ( SMESH_Algo* subAlgo = (SMESH_Algo*) aMesh.GetHypothesis( aSubShape, filter, true )) {
+ if ( ! subAlgo->NeedDiscreteBoundary() ) continue;
SMESH_Hypothesis::Hypothesis_Status status;
if ( subAlgo->CheckHypothesis( aMesh, aSubShape, status ))
// mesh a lower smToCompute starting from vertices
// fix quadratic mesh by bending iternal links near concave boundary
if ( aShape.IsSame( aMesh.GetShapeToMesh() ) &&
- !aShapesId ) // not preview
+ !aShapesId && // not preview
+ ret ) // everything is OK
{
SMESH_MesherHelper aHelper( aMesh );
if ( aHelper.IsQuadraticMesh() != SMESH_MesherHelper::LINEAR )
}
else
{
- bool isGlobal = (aMesh.IsMainShape( aSubMesh->GetSubShape() ));
- int dim = algo->GetDim();
+ bool isGlobal = (aMesh.IsMainShape( aSubMesh->GetSubShape() ));
+ int dim = algo->GetDim();
int aMaxGlobIgnoDim = ( aGlobIgnoAlgo ? aGlobIgnoAlgo->GetDim() : -1 );
+ bool isNeededDim = ( aGlobIgnoAlgo ? aGlobIgnoAlgo->NeedLowerHyps( dim ) : false );
- if ( dim < aMaxGlobIgnoDim &&
- ( isGlobal || !aGlobIgnoAlgo->SupportSubmeshes() ))
+ if (( dim < aMaxGlobIgnoDim && !isNeededDim ) &&
+ ( isGlobal || !aGlobIgnoAlgo->SupportSubmeshes() ))
{
// algo is hidden by a global algo
theErrors.push_back( SMESH_Gen::TAlgoStateError() );
set<SMESH_subMesh*>& aCheckedMap,
list< SMESH_Gen::TAlgoStateError > & theErrors)
{
- if ( aSubMesh->GetSubShape().ShapeType() == TopAbs_VERTEX ||
- aCheckedMap.count( aSubMesh ))
+ switch ( aSubMesh->GetSubShape().ShapeType() )
+ {
+ case TopAbs_EDGE:
+ case TopAbs_FACE:
+ case TopAbs_SOLID: break; // check this submesh, it can be meshed
+ default:
+ return true; // not meshable submesh
+ }
+ if ( aCheckedMap.count( aSubMesh ))
return true;
//MESSAGE("=====checkMissing");