2011-02-19 03:50:58 +05:00
|
|
|
#include <meshing.hpp>
|
|
|
|
#include <geometry2d.hpp>
|
|
|
|
#include <visual.hpp>
|
2014-10-08 18:46:25 +06:00
|
|
|
#include <inctcl.hpp>
|
2011-01-11 01:18:01 +05:00
|
|
|
|
2011-02-28 19:17:25 +05:00
|
|
|
#include "vsgeom2d.hpp"
|
2011-01-11 01:18:01 +05:00
|
|
|
|
2011-02-28 17:59:27 +05:00
|
|
|
// extern "C" int Ng_CSG_Init (Tcl_Interp * interp);
|
2011-01-11 01:18:01 +05:00
|
|
|
|
|
|
|
namespace netgen
|
|
|
|
{
|
2011-03-04 02:42:20 +05:00
|
|
|
|
|
|
|
|
2013-01-17 18:41:57 +06:00
|
|
|
// extern DLL_HEADER NetgenGeometry * ng_geometry;
|
2011-01-11 01:18:01 +05:00
|
|
|
static VisualSceneGeometry2d vsgeom2d;
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-17 18:41:57 +06:00
|
|
|
|
|
|
|
|
|
|
|
class SplineGeometryVisRegister : public GeometryRegister
|
2011-01-11 01:18:01 +05:00
|
|
|
{
|
|
|
|
public:
|
2022-02-17 20:52:07 +05:00
|
|
|
virtual NetgenGeometry * Load (const filesystem::path & filename) const { return NULL; }
|
2011-01-11 01:18:01 +05:00
|
|
|
virtual VisualScene * GetVisualScene (const NetgenGeometry * geom) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2013-01-17 18:41:57 +06:00
|
|
|
VisualScene * SplineGeometryVisRegister :: GetVisualScene (const NetgenGeometry * geom) const
|
2011-01-11 01:18:01 +05:00
|
|
|
{
|
2013-01-17 18:41:57 +06:00
|
|
|
const SplineGeometry2d * geometry = dynamic_cast<const SplineGeometry2d*> (geom);
|
2011-01-11 01:18:01 +05:00
|
|
|
if (geometry)
|
|
|
|
{
|
|
|
|
vsgeom2d.SetGeometry (geometry);
|
|
|
|
return &vsgeom2d;
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-03-04 03:03:01 +05:00
|
|
|
using namespace netgen;
|
|
|
|
#ifdef WIN32
|
|
|
|
extern "C" __declspec(dllexport) int Ng_geom2d_Init (Tcl_Interp * interp);
|
|
|
|
#else
|
2011-02-28 17:59:27 +05:00
|
|
|
extern "C" int Ng_geom2d_Init (Tcl_Interp * interp);
|
2011-03-04 03:03:01 +05:00
|
|
|
#endif
|
2011-01-11 01:18:01 +05:00
|
|
|
|
2011-02-28 17:59:27 +05:00
|
|
|
int Ng_geom2d_Init (Tcl_Interp * interp)
|
2011-01-11 01:18:01 +05:00
|
|
|
{
|
2013-01-17 18:41:57 +06:00
|
|
|
geometryregister.Append (new SplineGeometryVisRegister);
|
2011-02-28 18:34:54 +05:00
|
|
|
return TCL_OK;
|
2011-01-11 01:18:01 +05:00
|
|
|
}
|