Fix breaking old stair generation tests after f52aafd

Before f52aafd default `(0,0)` meant that there are no custom tread runs, but after the change it actually means that runs for first and last treads are 0. So default value should be adjusted.
Added explicit `None` value for clarity.
This commit is contained in:
Andrej730
2025-11-05 17:57:55 +05:00
parent 5d1f28c3cb
commit 3617d119cb
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -608,16 +608,18 @@ class BIMStairProperties(PropertyGroup):
}
stair_kwargs.update(generic_props)
non_si_units_props = self.non_si_units_props
# If locked, use tread_run for both first and last treads
if self.custom_tread_lock:
stair_kwargs["custom_first_last_tread_run"] = (self.tread_run, self.tread_run)
non_si_units_props += ("custom_first_last_tread_run",)
stair_kwargs["custom_first_last_tread_run"] = (None, None)
else:
stair_kwargs["custom_first_last_tread_run"] = self.custom_first_last_tread_run
if not convert_to_project_units:
return stair_kwargs
stair_kwargs = tool.Model.convert_data_to_project_units(stair_kwargs, self.non_si_units_props)
stair_kwargs = tool.Model.convert_data_to_project_units(stair_kwargs, non_si_units_props)
return stair_kwargs
def get_props_kwargs_for_ifc_export(self, convert_to_project_units=False, stair_type=None):
+1 -1
View File
@@ -1398,7 +1398,7 @@ class Model(bonsai.core.tool.Model):
has_top_nib=None,
top_slab_depth=None,
base_slab_depth=None,
custom_first_last_tread_run=(0, 0),
custom_first_last_tread_run: Union[tuple[float, float], tuple[None, None]] = (None, None),
nosing_length=0,
# CONCRETE GENERIC STAIR ARGUMENTS
nosing_depth=0,