mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
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:
@@ -608,16 +608,18 @@ class BIMStairProperties(PropertyGroup):
|
|||||||
}
|
}
|
||||||
stair_kwargs.update(generic_props)
|
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 locked, use tread_run for both first and last treads
|
||||||
if self.custom_tread_lock:
|
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:
|
else:
|
||||||
stair_kwargs["custom_first_last_tread_run"] = self.custom_first_last_tread_run
|
stair_kwargs["custom_first_last_tread_run"] = self.custom_first_last_tread_run
|
||||||
|
|
||||||
if not convert_to_project_units:
|
if not convert_to_project_units:
|
||||||
return stair_kwargs
|
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
|
return stair_kwargs
|
||||||
|
|
||||||
def get_props_kwargs_for_ifc_export(self, convert_to_project_units=False, stair_type=None):
|
def get_props_kwargs_for_ifc_export(self, convert_to_project_units=False, stair_type=None):
|
||||||
|
|||||||
@@ -1398,7 +1398,7 @@ class Model(bonsai.core.tool.Model):
|
|||||||
has_top_nib=None,
|
has_top_nib=None,
|
||||||
top_slab_depth=None,
|
top_slab_depth=None,
|
||||||
base_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,
|
nosing_length=0,
|
||||||
# CONCRETE GENERIC STAIR ARGUMENTS
|
# CONCRETE GENERIC STAIR ARGUMENTS
|
||||||
nosing_depth=0,
|
nosing_depth=0,
|
||||||
|
|||||||
Reference in New Issue
Block a user