if list with 1 element in glue -> return that element

else opencascade returns empty shape
This commit is contained in:
Christopher Lackner 2022-09-01 15:10:14 +02:00
parent 78dfd10475
commit e05b8960d7

View File

@ -2035,6 +2035,8 @@ tangents : Dict[int, gp_Vec2d]
m.def("Glue", [] (const std::vector<TopoDS_Shape> shapes) -> TopoDS_Shape m.def("Glue", [] (const std::vector<TopoDS_Shape> shapes) -> TopoDS_Shape
{ {
if(shapes.size() == 1)
return shapes[0];
BOPAlgo_Builder builder; BOPAlgo_Builder builder;
for (auto & s : shapes) for (auto & s : shapes)
{ {