Skip to content

Commit c2c4e31

Browse files
committed
new version and new loader
1 parent de1fc14 commit c2c4e31

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

cmake/PolyfemPythonDownloadExternal.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ endfunction()
2727
function(polyfem_python_download_polyfem)
2828
polyfem_python_download_project(polyfem
2929
GIT_REPOSITORY https://github.com/polyfem/polyfem.git
30-
GIT_TAG 1f40d1fd2d45871d47197fe92edc65280864bd31
30+
GIT_TAG 121302910fad10bc7001b1f72e9ce1e04c577a6e
3131
)
3232
endfunction()
3333

src/binding.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,23 @@ PYBIND11_MODULE(polyfempy, m) {
9797
},
9898
"Loads a mesh from the 'mesh' field of the json and 'bc_tag' if any bc tags")
9999

100-
.def("load_mesh_from_path", [](polyfem::State &s, const std::string &path) {
100+
.def("load_mesh_from_path", [](polyfem::State &s, const std::string &path, const bool normalize_mesh, const double vismesh_rel_area, const int n_refs, const double boundary_id_threshold) {
101101
init_globals(s);
102102
py::scoped_ostream_redirect output;
103103
s.args["mesh"] = path;
104+
s.args["normalize_mesh"] = normalize_mesh;
105+
s.args["n_refs"] = n_refs;
106+
s.args["boundary_id_threshold"] = boundary_id_threshold;
107+
s.args["vismesh_rel_area"] = vismesh_rel_area;
104108
s.load_mesh();
105109
},
106110
"Loads a mesh from the path and 'bc_tag' from the json if any bc tags",
107-
py::arg("path"))
111+
py::arg("path"),
112+
py::arg("normalize_mesh") = bool(false),
113+
py::arg("vismesh_rel_area") = double(0.00001),
114+
py::arg("n_refs") = int(0),
115+
py::arg("boundary_id_threshold") = double(-1))
116+
108117
.def("load_mesh_from_path_and_tags", [](polyfem::State &s, const std::string &path, const std::string &bc_tag) {
109118
init_globals(s);
110119
py::scoped_ostream_redirect output;

0 commit comments

Comments
 (0)