From 2b51ae9be5fc354ff9054e0cf2f331ddd48645d7 Mon Sep 17 00:00:00 2001 From: Roy-043 Date: Wed, 25 Sep 2024 08:28:27 +0200 Subject: [PATCH] Draft: ShapeString Fuse caused single face string to lose fill The `faces.concatenate` function can return a Face or a Compound. The code did not take that into account. --- src/Mod/Draft/draftobjects/shapestring.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Mod/Draft/draftobjects/shapestring.py b/src/Mod/Draft/draftobjects/shapestring.py index 3a13b6343a..ef624bb9e9 100644 --- a/src/Mod/Draft/draftobjects/shapestring.py +++ b/src/Mod/Draft/draftobjects/shapestring.py @@ -159,6 +159,10 @@ class ShapeString(DraftObject): if fill and obj.Fuse: ss_shape = shapes[0].fuse(shapes[1:]) ss_shape = faces.concatenate(ss_shape) + # Concatenate returns a Face or a Compound. We always + # need a Compound as we use ss_shape.SubShapes later. + if ss_shape.ShapeType == "Face": + ss_shape = Part.Compound([ss_shape]) else: ss_shape = Part.Compound(shapes) cap_char = Part.makeWireString("M", obj.FontFile, obj.Size, obj.Tracking)[0]