mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 17:20:04 +00:00
stair generation - fix bug with extended top nib with zero first tread run
`s0 = V_(custom_first_last_tread_run[0] or tread_run, tread_rise) + td_vector` was assuming `0` means "no custom first tread run", not it means actually "zero first tread run", so could should be adjusted before - https://files.catbox.moe/5ovqnh.mp4 after - https://files.catbox.moe/srorl2.mp4
This commit is contained in:
@@ -1423,6 +1423,7 @@ class Model(bonsai.core.tool.Model):
|
|||||||
nosing_overlap = max(nosing_length, 0)
|
nosing_overlap = max(nosing_length, 0)
|
||||||
nosing_tread_gap = -min(nosing_length, 0)
|
nosing_tread_gap = -min(nosing_length, 0)
|
||||||
nosing_overlap_offset = -V_(nosing_overlap, 0)
|
nosing_overlap_offset = -V_(nosing_overlap, 0)
|
||||||
|
first_tread_run = custom_first_last_tread_run[0] if custom_first_last_tread_run[0] is not None else tread_run
|
||||||
|
|
||||||
# ============ DEBUG LOGGING START ============
|
# ============ DEBUG LOGGING START ============
|
||||||
print("\n" + "=" * 80)
|
print("\n" + "=" * 80)
|
||||||
@@ -1639,7 +1640,7 @@ class Model(bonsai.core.tool.Model):
|
|||||||
# s0 is just a sampled point from the bottom line
|
# s0 is just a sampled point from the bottom line
|
||||||
# we stick to the third point as the first point
|
# we stick to the third point as the first point
|
||||||
# is affected by customized tread run
|
# is affected by customized tread run
|
||||||
s0 = V_(custom_first_last_tread_run[0] or tread_run, tread_rise) + td_vector
|
s0 = V_(first_tread_run, tread_rise) + td_vector
|
||||||
# comes from y = stair_tan * x + b
|
# comes from y = stair_tan * x + b
|
||||||
b = s0.y - stair_tan * s0.x
|
b = s0.y - stair_tan * s0.x
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user