From fa570cf92882d1745da26d8a628b5f36cdd85c7c Mon Sep 17 00:00:00 2001 From: hm-thinkbook14p Date: Fri, 30 Oct 2026 00:05:10 +0800 Subject: [PATCH] fix(python): complete pybind defaults and namespace --- python/src/vde_assembly.cpp | 1 + python/src/vde_brep.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/python/src/vde_assembly.cpp b/python/src/vde_assembly.cpp index e687f7589..b957124e6 100644 --- a/python/src/vde_assembly.cpp +++ b/python/src/vde_assembly.cpp @@ -8,6 +8,7 @@ #include "vde/brep/explode_view.h" namespace py = pybind11; +using namespace vde; using namespace vde::brep; void bind_assembly(py::module& m) { diff --git a/python/src/vde_brep.cpp b/python/src/vde_brep.cpp index c711f5788..2744aa94b 100644 --- a/python/src/vde_brep.cpp +++ b/python/src/vde_brep.cpp @@ -210,7 +210,8 @@ make_sphere), boolean operations (union, intersect, diff), and STEP/IGES import. }); // ── BrepModel factory functions ──────────────────── - brep.def("make_box", &make_box, + brep.def("make_box", + [](double w, double h, double d) { return make_box(w, h, d); }, py::arg("w"), py::arg("h"), py::arg("d"), R"pbdoc( Create an axis-aligned box centered at origin. @@ -506,7 +507,8 @@ Example: ... print(b) )pbdoc"); - brep.def("import_step_from_string", &import_step_from_string, + brep.def("import_step_from_string", + [](const std::string& data) { return import_step_from_string(data); }, py::arg("data"), R"pbdoc( Import STEP data from a string (for testing / embedded use).