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)
{
/*
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;
multithread.task = "Surface meshing";
@ -416,12 +426,12 @@ namespace netgen
Meshing2Surfaces meshing(*surf, geom.BoundingBox());
meshing.SetStartTime (starttime);
double eps = 1e-8 * geom.MaxSize();
for (PointIndex pi = PointIndex::BASE; pi < noldp+PointIndex::BASE; pi++)
{
//if(surf->PointOnSurface(mesh[pi]))
meshing.AddPoint (mesh[pi], pi, NULL,
(surf->PointOnSurface(mesh[pi])!=0));
(surf->PointOnSurface(mesh[pi], eps) != 0));
}
segments.SetSize (0);

View File

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

View File

@ -144,6 +144,7 @@ namespace netgen
BuildFilledList ();
}
#ifdef PARALLELGL
if (ntasks > 1 && vispar.drawtetsdomain > 0 && vispar.drawtetsdomain < ntasks)
glCallList (par_filledlists[vispar.drawtetsdomain]);
@ -1097,13 +1098,13 @@ namespace netgen
}
else // not high order
{
glBegin (GL_TRIANGLES);
glBegin (GL_TRIANGLES);
const Point<3> & lp0 = (*mesh) [el[0]];
const Point<3> & lp1 = (*mesh) [el[1]];
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);
if (vispar.colormeshsize)