fixing performance issue with Plane-Cylinder check

This commit is contained in:
Joachim Schöberl 2015-10-05 09:48:20 +02:00
parent 3153bc1f0b
commit e2cc34780c
2 changed files with 7 additions and 3 deletions

View File

@ -31,7 +31,8 @@ namespace netgen
prim = aprim;
s1 = s2 = NULL;
maxh = 1e10;
name = NULL;
name = NULL;
num_surfs = prim->GetNSurfaces();
}
Solid :: Solid (optyp aop, Solid * as1, Solid * as2)
@ -42,6 +43,9 @@ namespace netgen
prim = NULL;
name = NULL;
maxh = 1e10;
num_surfs = 0;
if (s1) num_surfs += s1->num_surfs;
if (s2) num_surfs += s2->num_surfs;
}
Solid :: ~Solid ()
@ -1231,8 +1235,7 @@ namespace netgen
Solid * Solid :: RecGetReducedSolid (const BoxSphere<3> & box, INSOLID_TYPE & in) const
{
if (num_surfs <= 2)
{
// checking special case for degenerated plane - cylinder, Dec 2014
int cnt_plane = 0, cnt_cyl = 0;

View File

@ -48,6 +48,7 @@ namespace netgen
optyp op;
bool visited;
double maxh;
int num_surfs;
// static int cntnames;