BIM: remove switch to profile beam creation based on dimensions

Fixes #28013.

When creating a structure from a profile the code could ignore `self.bmode` (beam-mode) and create a beam even if the user selected the column option in the task panel.

Rounding errors due to the conversion of numerical values read from the input boxes triggered the bug (89mm -> 3.5" -> 88.89999999999999mm).

But beyond that, it is IMO not correct to disregard user input. If the column option is specified, a column should be created irrespective of the dimensions.
This commit is contained in:
Roy-043
2026-03-02 21:17:56 +01:00
committed by GitHub
parent fe25d8d0f7
commit 64a4cee116
+1 -3
View File
@@ -463,9 +463,7 @@ class _CommandStructure:
else:
# metal profile
FreeCADGui.doCommand("p = Arch.makeProfile(" + str(self.Profile) + ")")
if (
abs(self.Length - self.Profile[4]) >= 0.1
) or self.bmode: # forgive rounding errors
if self.bmode:
# horizontal
FreeCADGui.doCommand(
"s = Arch.makeStructure(p,length=" + str(self.Length) + ")"