mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +05:00
visual
This commit is contained in:
parent
f14a04a837
commit
8187d4f4e8
@ -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);
|
||||
|
@ -1475,7 +1475,7 @@ namespace netgen
|
||||
|
||||
|
||||
|
||||
|
||||
// #define OPENGL
|
||||
#ifdef OPENGL
|
||||
|
||||
/* *********************** Draw Surface Meshing **************** */
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user