mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-18 17:00:33 +05:00
Merge master
This commit is contained in:
parent
a0f61bec3e
commit
99a14521fd
@ -242,9 +242,6 @@ namespace netgen
|
||||
ngcore::IVec<2> Project(Point<3> p);
|
||||
};
|
||||
|
||||
void DrawElement(const Mesh & mesh, SurfaceElementIndex sei);
|
||||
void DrawElement(const Mesh & mesh, ElementIndex sei);
|
||||
|
||||
NGGUI_API extern VisualSceneMesh vsmesh;
|
||||
|
||||
|
||||
|
@ -2,10 +2,20 @@
|
||||
|
||||
#include <myadt.hpp>
|
||||
#include <meshing.hpp>
|
||||
// #include <csg.hpp>
|
||||
|
||||
#ifdef STLGEOM
|
||||
#include <stlgeom.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
// #include <parallel.hpp>
|
||||
|
||||
#include <visual.hpp>
|
||||
|
||||
namespace netgen
|
||||
{
|
||||
// extern shared_ptr<Mesh> mesh;
|
||||
extern NetgenGeometry * ng_geometry;
|
||||
|
||||
VisualSceneMesh vsmesh;
|
||||
@ -982,6 +992,10 @@ namespace netgen
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, colors.texture);
|
||||
|
||||
#ifdef STLGEOM
|
||||
STLGeometry * stlgeometry = dynamic_cast<STLGeometry*> (ng_geometry);
|
||||
bool checkvicinity = (stlgeometry != NULL) && stldoctor.showvicinity;
|
||||
#endif
|
||||
glEnable (GL_NORMALIZE);
|
||||
|
||||
glLineWidth (1.0f);
|
||||
@ -1061,6 +1075,13 @@ namespace netgen
|
||||
|
||||
bool drawel = (!el.IsDeleted() && el.IsVisible());
|
||||
|
||||
#ifdef STLGEOM
|
||||
if (checkvicinity)
|
||||
for (int j = 0; j < el.GetNP(); j++)
|
||||
if (!stlgeometry->Vicinity(el.GeomInfoPi(j+1).trignum))
|
||||
drawel = 0;
|
||||
#endif
|
||||
|
||||
if (!drawel)
|
||||
continue;
|
||||
|
||||
@ -1372,6 +1393,11 @@ namespace netgen
|
||||
|
||||
linetimestamp = NextTimeStamp();
|
||||
|
||||
#ifdef STLGEOM
|
||||
STLGeometry * stlgeometry = dynamic_cast<STLGeometry*> (ng_geometry);
|
||||
bool checkvicinity = (stlgeometry != NULL) && stldoctor.showvicinity;
|
||||
#endif
|
||||
|
||||
if (linelist)
|
||||
glDeleteLists (linelist, 1);
|
||||
|
||||
@ -1392,6 +1418,12 @@ namespace netgen
|
||||
|
||||
bool drawel = (!el.IsDeleted() && el.IsVisible());
|
||||
|
||||
#ifdef STLGEOM
|
||||
if (checkvicinity)
|
||||
for (int j = 0; j < el.GetNP(); j++)
|
||||
if (!stlgeometry->Vicinity(el.GeomInfoPi(j+1).trignum))
|
||||
drawel = 0;
|
||||
#endif
|
||||
|
||||
if (!drawel)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user