diff --git a/libsrc/visualization/vsmesh.cpp b/libsrc/visualization/vsmesh.cpp index f8439bcb..272c95c9 100644 --- a/libsrc/visualization/vsmesh.cpp +++ b/libsrc/visualization/vsmesh.cpp @@ -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++) { diff --git a/libsrc/visualization/vssolution.cpp b/libsrc/visualization/vssolution.cpp index 332aa1f3..79512557 100644 --- a/libsrc/visualization/vssolution.cpp +++ b/libsrc/visualization/vssolution.cpp @@ -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); - break; - + { + 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);