diff --git a/src/Mod/BIM/ArchWindow.py b/src/Mod/BIM/ArchWindow.py index 84ba0d9fd4..361811cb14 100644 --- a/src/Mod/BIM/ArchWindow.py +++ b/src/Mod/BIM/ArchWindow.py @@ -639,6 +639,19 @@ class _Window(ArchComponent.Component): widths = host.OverrideWidth elif host.Width: widths = [host.Width.Value] + + # TODO Below codes copied and adopted from ArchWall.py. + # Consider adding a variable to store the layer's + # thickness as deduced, so the figure there could be + # used directly without re-calculated here below. + if hasattr(host,"Material"): + if host.Material: + if hasattr(host.Material,"Materials"): + thicknesses = [abs(t) for t in host.Material.Thicknesses] + totalThk = sum(thicknesses) + # Append totalThk to widths, find max below + widths.append(totalThk) + if widths: width = max(widths) # +100mm to ensure subtract is through at the moment