error message when CSG visualization fails

This commit is contained in:
Joachim Schoeberl 2010-03-18 16:00:34 +00:00
parent 3161463e94
commit d8728ec8fc

View File

@ -974,6 +974,8 @@ namespace netgen
{ {
PrintMessage (1, "Calc Triangle Approximation"); PrintMessage (1, "Calc Triangle Approximation");
try
{
// FindIdenticSurfaces (1e-6); // FindIdenticSurfaces (1e-6);
int ntlo = GetNTopLevelObjects(); int ntlo = GetNTopLevelObjects();
@ -1073,7 +1075,18 @@ namespace netgen
tams->RemoveUnusedPoints (); tams->RemoveUnusedPoints ();
PrintMessage (2, "Object ", i, " has ", tams->GetNT(), " triangles"); PrintMessage (2, "Object ", i, " has ", tams->GetNT(), " triangles");
} }
}
catch (exception)
{
cerr << "*************************************************************" << endl
<< "**** out of memory problem in CSG visualization ****" << endl
<< "**** Restart netgen, and disable ****" << endl
<< "**** 'Draw Geometry' in Geometry -> CSG Options ****" << endl
<< "**** before loading the geometry ****" << endl
<< "**** meshing will still work ! ****" << endl
<< "*************************************************************" << endl;
exit(1);
}
Change(); Change();
} }