diff --git a/libsrc/interface/writeuser.cpp b/libsrc/interface/writeuser.cpp index b4659b53..99a88dde 100644 --- a/libsrc/interface/writeuser.cpp +++ b/libsrc/interface/writeuser.cpp @@ -58,10 +58,11 @@ namespace netgen bool WriteUserFormat (const string & format, const Mesh & mesh, - const NetgenGeometry & hgeom, const string & filename) { - const CSGeometry & geom = *dynamic_cast (&hgeom); + // cout << "write user &hgeom = " << &hgeom << endl; + // const CSGeometry & geom = *dynamic_cast (&hgeom); + const CSGeometry & geom = *dynamic_pointer_cast (mesh.GetGeometry()); PrintMessage (1, "Export mesh to file ", filename, ", format is ", format); diff --git a/libsrc/interface/writeuser.hpp b/libsrc/interface/writeuser.hpp index 04bdeeb0..5ceda0ba 100644 --- a/libsrc/interface/writeuser.hpp +++ b/libsrc/interface/writeuser.hpp @@ -159,9 +159,9 @@ extern void DLL_HEADER RegisterUserFormats (Array & names, extern bool DLL_HEADER WriteUserFormat (const string & format, - const Mesh & mesh, - const NetgenGeometry & geom, - const string & filename); + const Mesh & mesh, + // const NetgenGeometry & geom, + const string & filename); } diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index bd7a31da..aaed8073 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -509,7 +509,7 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) .def("Export", [] (Mesh & self, string filename, string format) { - if (WriteUserFormat (format, self, *self.GetGeometry(), filename)) + if (WriteUserFormat (format, self, /* *self.GetGeometry(), */ filename)) { string err = string ("nothing known about format")+format; Array names, extensions; diff --git a/ng/ngpkg.cpp b/ng/ngpkg.cpp index a649a7a2..5d29d8f3 100644 --- a/ng/ngpkg.cpp +++ b/ng/ngpkg.cpp @@ -362,7 +362,7 @@ namespace netgen PrintMessage (1, "Export mesh to file ", filename, ".... Please Wait!"); // CSGeometry * geometry = dynamic_cast (ng_geometry); - if (WriteUserFormat (filetype, *mesh, *ng_geometry, filename)) + if (WriteUserFormat (filetype, *mesh, /* *ng_geometry, */ filename)) { ostringstream ost; ost << "Sorry, nothing known about file format " << filetype << endl; diff --git a/nglib/nglib.cpp b/nglib/nglib.cpp index e12910df..5fea184c 100644 --- a/nglib/nglib.cpp +++ b/nglib/nglib.cpp @@ -1250,6 +1250,6 @@ void Ng_InitSolutionData (Ng_SolutionData * soldata) { ; } #include <../interface/writeuser.hpp> void MyDummyToForceLinkingLibInterface(Mesh &mesh, NetgenGeometry &geom) { - netgen::WriteUserFormat("", mesh, geom, ""); + netgen::WriteUserFormat("", mesh, /* geom, */ ""); }