mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +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++)
|
||||
{
|
||||
|
@ -4059,6 +4059,10 @@ namespace netgen
|
||||
for (int iy = 0; iy <= n; iy++)
|
||||
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;
|
||||
compress[ii] = ii;
|
||||
|
||||
@ -4088,12 +4092,13 @@ namespace netgen
|
||||
if (iz == n) ploc = Point<3> (0,0,1-1e-8);
|
||||
break;
|
||||
case HEX7:
|
||||
ploc = Point<3> (double(ix) / n * (1-double(iz)/n*double(iy)/n),
|
||||
double(iy) / n,
|
||||
double(iz)/n);
|
||||
if (iz == n && iy==n) ploc = Point<3> (0,1-1e-8,1-1e-8);
|
||||
{
|
||||
if (iz == n && iy==n)
|
||||
{ y -= 1e-7, z -= 1e-7; }
|
||||
ploc = Point<3> (x * (1-y*z), y, z);
|
||||
// if (iz == n && iy==n) ploc = Point<3> (0,1-1e-8,1-1e-8);
|
||||
break;
|
||||
|
||||
}
|
||||
default:
|
||||
cerr << "clip plane trigs not implemented" << endl;
|
||||
ploc = Point<3> (0,0,0);
|
||||
|
Loading…
Reference in New Issue
Block a user