mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-11 21:50:34 +05:00
use geometry from mesh on export user format
This commit is contained in:
parent
046f473619
commit
043e3403ba
@ -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<const CSGeometry*> (&hgeom);
|
||||
// cout << "write user &hgeom = " << &hgeom << endl;
|
||||
// const CSGeometry & geom = *dynamic_cast<const CSGeometry*> (&hgeom);
|
||||
const CSGeometry & geom = *dynamic_pointer_cast<CSGeometry> (mesh.GetGeometry());
|
||||
|
||||
PrintMessage (1, "Export mesh to file ", filename,
|
||||
", format is ", format);
|
||||
|
@ -159,9 +159,9 @@ extern void DLL_HEADER RegisterUserFormats (Array<const char*> & 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);
|
||||
|
||||
}
|
||||
|
||||
|
@ -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<const char*> names, extensions;
|
||||
|
@ -362,7 +362,7 @@ namespace netgen
|
||||
PrintMessage (1, "Export mesh to file ", filename, ".... Please Wait!");
|
||||
|
||||
// CSGeometry * geometry = dynamic_cast<CSGeometry*> (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;
|
||||
|
@ -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, */ "");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user