From 7d1efa9df277427fed5aff32d649908d825bc3c3 Mon Sep 17 00:00:00 2001 From: Roy-043 Date: Tue, 20 Aug 2024 17:09:49 +0200 Subject: [PATCH] BIM: Arch_Survey: Fix concatenate bytes issue The line `t = t.encode("utf8")` returns a bytes object which does not make sense in the context of the rest of the code. It is probably a copy-paste error. To test the bug: 1. open the file attached to this forum post: https://forum.freecad.org/viewtopic.php?t=89012#p770224 2. Make the rectangles visible. 3. Start the Survey command and box select all objects in the 3D view. --- src/Mod/BIM/ArchCommands.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Mod/BIM/ArchCommands.py b/src/Mod/BIM/ArchCommands.py index bc0086583c..048331f581 100644 --- a/src/Mod/BIM/ArchCommands.py +++ b/src/Mod/BIM/ArchCommands.py @@ -870,7 +870,6 @@ def survey(callback=False): else: u = FreeCAD.Units.Quantity(o.Object.Shape.Length,FreeCAD.Units.Length) t = u.getUserPreferred()[0] - t = t.encode("utf8") anno.LabelText = "l " + t FreeCAD.Console.PrintMessage("Object: " + n + ", Element: Whole, Length: " + t + "\n") FreeCAD.SurveyObserver.totalLength += u.Value