import mesh from other file format from python

This commit is contained in:
Christopher Lackner 2019-02-13 22:39:31 +01:00
parent 350aaf4b7a
commit eaf08e5c6f

View File

@ -898,8 +898,21 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
}))
;
m.def("ImportMesh", [](const string& filename)
{
auto mesh = make_shared<Mesh>();
ReadFile(*mesh, filename);
return mesh;
}, py::arg("filename"),
R"delimiter(Import mesh from other file format, supported file formats are:
Neutral format (*.mesh, *.emt)
Surface file (*.surf)
Universal format (*.unv)
Olaf format (*.emt)
Tet format (*.tet)
Pro/ENGINEER format (*.fnf)
)delimiter");
py::enum_<MESHING_STEP>(m,"MeshingStep")
.value("MESHEDGES",MESHCONST_MESHEDGES)
.value("MESHSURFACE",MESHCONST_OPTSURFACE)