mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
Merge branch 'import_mesh' into 'master'
import mesh from other file format from python See merge request jschoeberl/netgen!133
This commit is contained in:
commit
0a14f5b5e1
@ -899,7 +899,20 @@ 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)
|
||||
|
Loading…
Reference in New Issue
Block a user