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.
This commit is contained in:
Roy-043
2024-09-25 08:28:27 +02:00
committed by Yorik van Havre
parent 2ef683e56f
commit 2b51ae9be5

View File

@@ -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]