ng_redraw

This commit is contained in:
Joachim Schoeberl 2014-10-12 11:40:12 +00:00
parent 0565fb9cd5
commit 0b58bb76d1
8 changed files with 28 additions and 34 deletions

View File

@ -2,4 +2,4 @@ AM_CPPFLAGS =
METASOURCES = AUTO METASOURCES = AUTO
SUBDIRS = general gprim linalg include meshing visualization interface csg geom2d occ stlgeom SUBDIRS = general gprim linalg include meshing visualization csg geom2d occ stlgeom interface

View File

@ -126,7 +126,7 @@ extern "C" {
//void Ng_GetBCNumBCName (int bcnr, char * name); //void Ng_GetBCNumBCName (int bcnr, char * name);
// Get normal vector of surface element node // Get normal vector of surface element node
DLL_HEADER void Ng_GetNormalVector (int sei, int locpi, double * nv); // DLL_HEADER void Ng_GetNormalVector (int sei, int locpi, double * nv);
DLL_HEADER void Ng_SetPointSearchStartElement(int el); DLL_HEADER void Ng_SetPointSearchStartElement(int el);

View File

@ -11,6 +11,7 @@ libinterface_la_SOURCES = nginterface.cpp nginterface_v2.cpp \
libinterface_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la \ libinterface_la_LIBADD = $(top_builddir)/libsrc/meshing/libmesh.la \
$(top_builddir)/libsrc/visualization/libvisual.la $(top_builddir)/libsrc/visualization/libvisual.la \
$(top_builddir)/libsrc/csg/libcsg.la
# libinterface_la_LDFLAGS = -rdynamic # libinterface_la_LDFLAGS = -rdynamic

View File

@ -607,6 +607,7 @@ char * Ng_GetBCNumBCName (int bcnr)
// strcpy(name,mesh->GetBCName(bcnr).c_str()); // strcpy(name,mesh->GetBCName(bcnr).c_str());
//} //}
/*
void Ng_GetNormalVector (int sei, int locpi, double * nv) void Ng_GetNormalVector (int sei, int locpi, double * nv)
{ {
nv[0] = 0; nv[0] = 0;
@ -643,7 +644,7 @@ void Ng_GetNormalVector (int sei, int locpi, double * nv)
} }
} }
} }
*/
void Ng_SetPointSearchStartElement(const int el) void Ng_SetPointSearchStartElement(const int el)
@ -2132,12 +2133,15 @@ int Ng_Bisect_WithInfo ( const char * refinementfile, double ** qualityloss, int
#endif #endif
{ {
// ref = new RefinementSurfaces(*geometry); // ref = new RefinementSurfaces(*geometry);
/*
// joachim, oct 2014
CSGeometry * geometry = dynamic_cast<CSGeometry*> (ng_geometry.get()); CSGeometry * geometry = dynamic_cast<CSGeometry*> (ng_geometry.get());
if (geometry) if (geometry)
{ {
opt = new MeshOptimize2dSurfaces(*geometry); opt = new MeshOptimize2dSurfaces(*geometry);
ref->Set2dOptimizer(opt); ref->Set2dOptimizer(opt);
} }
*/
} }
if(!mesh->LocalHFunctionGenerated()) if(!mesh->LocalHFunctionGenerated())

View File

@ -9,7 +9,6 @@ METASOURCES = AUTO
if NGGUI if NGGUI
lib_LTLIBRARIES = libvisual.la lib_LTLIBRARIES = libvisual.la
libvisual_la_LIBADD = $(LIBGLU) $(TCL_LIB_SPEC) libvisual_la_LIBADD = $(LIBGLU) $(TCL_LIB_SPEC)
endif endif

View File

@ -217,8 +217,8 @@ namespace netgen
// extern struct Tcl_Interp * hinterp; // extern struct Tcl_Interp * hinterp;

View File

@ -4555,22 +4555,19 @@ namespace netgen
#endif #endif
}
#include "../include/nginterface.h"
void Ng_ClearSolutionData () void Ng_ClearSolutionData ()
{ {
#ifdef OPENGL #ifdef OPENGL
// if (nodisplay) return; // if (nodisplay) return;
vssolution.ClearSolutionData(); netgen::vssolution.ClearSolutionData();
#endif #endif
} }
}
#include "../include/nginterface.h"
// namespace netgen
// {
void Ng_InitSolutionData (Ng_SolutionData * soldata) void Ng_InitSolutionData (Ng_SolutionData * soldata)
{ {
soldata -> name = NULL; soldata -> name = NULL;
@ -4609,3 +4606,17 @@ void Ng_SetSolutionData (Ng_SolutionData * soldata)
} }
namespace netgen
{
extern void Render ();
}
void Ng_Redraw ()
{
#ifdef OPENGL
netgen::vssolution.UpdateSolutionTimeStamp();
netgen::Render();
#endif
}

View File

@ -2751,27 +2751,6 @@ void Ng_SetUserVisualizationObject (netgen::UserVisualizationObject * vis)
namespace netgen
{
extern void Render ();
}
void Ng_Redraw ()
{
#ifdef OPENGL
extern bool nodisplay; // he: global in ngappinit.cpp
if (!nodisplay)
{
netgen::vssolution.UpdateSolutionTimeStamp();
Render();
}
#endif
}
namespace netgen namespace netgen
{ {