mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-13 14:40:35 +05:00
plotting hex7
This commit is contained in:
parent
7d409e6ec4
commit
bbb91b704d
@ -2673,6 +2673,8 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static float hex7col[] = { 1.0f, 0.65f, 0.0f, 1.0f };
|
||||||
|
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, hex7col);
|
||||||
|
|
||||||
for (ElementIndex ei = 0; ei < mesh->GetNE(); ei++)
|
for (ElementIndex ei = 0; ei < mesh->GetNE(); ei++)
|
||||||
{
|
{
|
||||||
|
@ -4059,6 +4059,10 @@ namespace netgen
|
|||||||
for (int iy = 0; iy <= n; iy++)
|
for (int iy = 0; iy <= n; iy++)
|
||||||
for (int iz = 0; iz <= n; iz++, ii++)
|
for (int iz = 0; iz <= n; iz++, ii++)
|
||||||
{
|
{
|
||||||
|
double x = double(ix)/n;
|
||||||
|
double y = double(iy)/n;
|
||||||
|
double z = double(iz)/n;
|
||||||
|
|
||||||
Point<3> ploc;
|
Point<3> ploc;
|
||||||
compress[ii] = ii;
|
compress[ii] = ii;
|
||||||
|
|
||||||
@ -4088,12 +4092,13 @@ namespace netgen
|
|||||||
if (iz == n) ploc = Point<3> (0,0,1-1e-8);
|
if (iz == n) ploc = Point<3> (0,0,1-1e-8);
|
||||||
break;
|
break;
|
||||||
case HEX7:
|
case HEX7:
|
||||||
ploc = Point<3> (double(ix) / n * (1-double(iz)/n*double(iy)/n),
|
{
|
||||||
double(iy) / n,
|
if (iz == n && iy==n)
|
||||||
double(iz)/n);
|
{ y -= 1e-7, z -= 1e-7; }
|
||||||
if (iz == n && iy==n) ploc = Point<3> (0,1-1e-8,1-1e-8);
|
ploc = Point<3> (x * (1-y*z), y, z);
|
||||||
break;
|
// if (iz == n && iy==n) ploc = Point<3> (0,1-1e-8,1-1e-8);
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
cerr << "clip plane trigs not implemented" << endl;
|
cerr << "clip plane trigs not implemented" << endl;
|
||||||
ploc = Point<3> (0,0,0);
|
ploc = Point<3> (0,0,0);
|
||||||
|
Loading…
Reference in New Issue
Block a user