From e05b8960d76909f6fc9aa787f53d53161fcd2b12 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Thu, 1 Sep 2022 15:10:14 +0200 Subject: [PATCH] if list with 1 element in glue -> return that element else opencascade returns empty shape --- libsrc/occ/python_occ_shapes.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libsrc/occ/python_occ_shapes.cpp b/libsrc/occ/python_occ_shapes.cpp index 8d0d2821..432ec531 100644 --- a/libsrc/occ/python_occ_shapes.cpp +++ b/libsrc/occ/python_occ_shapes.cpp @@ -2035,6 +2035,8 @@ tangents : Dict[int, gp_Vec2d] m.def("Glue", [] (const std::vector shapes) -> TopoDS_Shape { + if(shapes.size() == 1) + return shapes[0]; BOPAlgo_Builder builder; for (auto & s : shapes) {