{
const TopoDS_Shape& S = anExplorer.Current();
SMESH_subMesh* subMesh = _father->GetSubMesh( S );
- theComputeCost += subMesh->GetComputeCost();
+ if ( subMesh->GetComputeState() != NOT_READY )
+ theComputeCost += subMesh->GetComputeCost();
if ( subMesh == this )
{
aBuilder.Add( aCompound, S );
while ( smIt->more() )
{
SMESH_subMesh* sm = smIt->next();
- if ( sm->IsEmpty() )
+ if ( sm->GetComputeState() != NOT_READY &&
+ sm->IsEmpty() )
theComputeCost += sm->GetComputeCost();
}
}