This commit is contained in:
Joachim Schoeberl 2009-08-24 02:56:22 +00:00
parent f14a04a837
commit 8187d4f4e8
3 changed files with 16 additions and 5 deletions

View File

@ -221,6 +221,16 @@ namespace netgen
static void MeshSurface (CSGeometry & geom, Mesh & mesh) static void MeshSurface (CSGeometry & geom, Mesh & mesh)
{ {
/*
Point3d pmin, pmax;
mesh.GetBox(pmin, pmax);
cout << "box = " << pmin << " - " << pmax << endl;
cout << "localhbox = "
<< mesh.LocalHFunction().GetBoundingBox().PMin() << " - "
<< mesh.LocalHFunction().GetBoundingBox().PMax()
<< endl;
*/
const char * savetask = multithread.task; const char * savetask = multithread.task;
multithread.task = "Surface meshing"; multithread.task = "Surface meshing";
@ -416,12 +426,12 @@ namespace netgen
Meshing2Surfaces meshing(*surf, geom.BoundingBox()); Meshing2Surfaces meshing(*surf, geom.BoundingBox());
meshing.SetStartTime (starttime); meshing.SetStartTime (starttime);
double eps = 1e-8 * geom.MaxSize();
for (PointIndex pi = PointIndex::BASE; pi < noldp+PointIndex::BASE; pi++) for (PointIndex pi = PointIndex::BASE; pi < noldp+PointIndex::BASE; pi++)
{ {
//if(surf->PointOnSurface(mesh[pi])) //if(surf->PointOnSurface(mesh[pi]))
meshing.AddPoint (mesh[pi], pi, NULL, meshing.AddPoint (mesh[pi], pi, NULL,
(surf->PointOnSurface(mesh[pi])!=0)); (surf->PointOnSurface(mesh[pi], eps) != 0));
} }
segments.SetSize (0); segments.SetSize (0);

View File

@ -1475,7 +1475,7 @@ namespace netgen
// #define OPENGL
#ifdef OPENGL #ifdef OPENGL
/* *********************** Draw Surface Meshing **************** */ /* *********************** Draw Surface Meshing **************** */

View File

@ -144,6 +144,7 @@ namespace netgen
BuildFilledList (); BuildFilledList ();
} }
#ifdef PARALLELGL #ifdef PARALLELGL
if (ntasks > 1 && vispar.drawtetsdomain > 0 && vispar.drawtetsdomain < ntasks) if (ntasks > 1 && vispar.drawtetsdomain > 0 && vispar.drawtetsdomain < ntasks)
glCallList (par_filledlists[vispar.drawtetsdomain]); glCallList (par_filledlists[vispar.drawtetsdomain]);
@ -1103,7 +1104,7 @@ namespace netgen
const Point<3> & lp1 = (*mesh) [el[1]]; const Point<3> & lp1 = (*mesh) [el[1]];
const Point<3> & lp2 = (*mesh) [el[2]]; const Point<3> & lp2 = (*mesh) [el[2]];
Vec<3> n = Cross (lp1-lp0, lp2-lp0); Vec<3> n = Cross (lp1-lp0, lp2-lp0).Normalize();
glNormal3dv (n); glNormal3dv (n);
if (vispar.colormeshsize) if (vispar.colormeshsize)