From 9ee947b73047edd71767492b93c8056e155479f9 Mon Sep 17 00:00:00 2001 From: Ryan Schultz Date: Sat, 22 Mar 2025 09:53:15 -0500 Subject: [PATCH] a better implementation for #3731 - to round to the nearest foot. --- src/bonsai/bonsai/bim/module/drawing/helper.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/drawing/helper.py b/src/bonsai/bonsai/bim/module/drawing/helper.py index eb63b05a05..b1706cffa7 100644 --- a/src/bonsai/bonsai/bim/module/drawing/helper.py +++ b/src/bonsai/bonsai/bim/module/drawing/helper.py @@ -202,6 +202,7 @@ def format_distance( base = int(precision) decInches = value * toInches + decFeet = decInches/12 # Separate ft and inches # Unless Inches are the specified Length Unit or unit_fraction is False @@ -272,8 +273,8 @@ def format_distance( tx_dist += str(frac) + "/" + str(base) if add_inches or frac: tx_dist += '"' - if precision == "12": - tx_dist = str(feet) + "'" + if precision == "12" and unit_system == "IMPERIAL": + tx_dist = str(round(decFeet)) + "'" else: fmt = "%1.3f" sq_feet = round(value * toInches / inPerFoot, 4)