From 56024f12ad9815b35e7f441385b1d58e4dcace93 Mon Sep 17 00:00:00 2001 From: Roy-043 <70520633+Roy-043@users.noreply.github.com> Date: Sun, 6 Jul 2025 21:24:42 +0200 Subject: [PATCH] BIM: fix default radius for rectangular pipe connector Fixes #22364. The default radius of a connector between rectangular pipes should depend on the Height or Width of the pipe (the max. of the two is used), not on the hidden (and unused) Diameter property. --- src/Mod/BIM/Arch.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Mod/BIM/Arch.py b/src/Mod/BIM/Arch.py index 979ff4c888..a017c96181 100644 --- a/src/Mod/BIM/Arch.py +++ b/src/Mod/BIM/Arch.py @@ -794,7 +794,12 @@ def makePipeConnector(pipes, radius=0, name=None): # Initialize all relevant properties pipeConnector.Pipes = pipes - pipeConnector.Radius = radius if radius else pipes[0].Diameter + if radius: + pipeConnector.Radius = radius + elif pipes[0].ProfileType == "Circle": + pipeConnector.Radius = pipes[0].Diameter + else: + pipeConnector.Radius = max(pipes[0].Height, pipes[0].Width) return pipeConnector @@ -1933,4 +1938,4 @@ def _initializeArchObject( FreeCAD.Console.PrintError(f"Failed to import module '{moduleName}': {e}\n") return None - return obj \ No newline at end of file + return obj