2017-05-08 19:42:49 +05:00
|
|
|
#include <mystdlib.h>
|
|
|
|
#include <inctcl.hpp>
|
|
|
|
#include <meshing.hpp>
|
2021-02-18 15:37:05 +05:00
|
|
|
#include <core/ngcore_api.hpp>
|
2017-05-08 19:42:49 +05:00
|
|
|
|
2017-05-10 22:34:42 +05:00
|
|
|
namespace netgen
|
|
|
|
{
|
2021-02-18 15:37:05 +05:00
|
|
|
NGCORE_API_EXPORT Flags parameters;
|
2017-05-08 19:42:49 +05:00
|
|
|
}
|
|
|
|
|
2021-02-18 15:37:05 +05:00
|
|
|
NGCORE_API_EXPORT bool nodisplay = false;
|
2017-05-08 19:42:49 +05:00
|
|
|
|
|
|
|
extern "C" int Ng_Init (Tcl_Interp * interp);
|
|
|
|
extern "C" int Ng_Vis_Init (Tcl_Interp * interp);
|
|
|
|
extern "C" void Ng_TclCmd(string);
|
|
|
|
|
2017-05-10 22:34:42 +05:00
|
|
|
// tcl package dynamic load
|
2021-02-18 15:37:05 +05:00
|
|
|
extern "C" int NGCORE_API_EXPORT Gui_Init (Tcl_Interp * interp)
|
2017-05-10 22:34:42 +05:00
|
|
|
{
|
|
|
|
if (Ng_Init(interp) == TCL_ERROR) {
|
|
|
|
cerr << "Problem in Ng_Init: " << endl;
|
|
|
|
cout << "result = " << Tcl_GetStringResult (interp) << endl;
|
|
|
|
return TCL_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!nodisplay && Ng_Vis_Init(interp) == TCL_ERROR) {
|
|
|
|
cerr << "Problem in Ng_Vis_Init: " << endl;
|
|
|
|
cout << "result = " << Tcl_GetStringResult (interp) << endl;
|
|
|
|
return TCL_ERROR;
|
|
|
|
}
|
2017-05-08 19:42:49 +05:00
|
|
|
|
2017-05-10 22:34:42 +05:00
|
|
|
return TCL_OK;
|
2017-05-08 19:42:49 +05:00
|
|
|
}
|