From 3800bd7fc857533c66cdb3c0fe8370f6e52546e8 Mon Sep 17 00:00:00 2001 From: sudhir Date: Thu, 14 May 2026 15:56:00 +0530 Subject: [PATCH] fix: increase stair opening buffer constraints and set default offset to 0.15 --- packages/core/src/systems/stair/stair-opening-sync.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/systems/stair/stair-opening-sync.ts b/packages/core/src/systems/stair/stair-opening-sync.ts index 6f4c9f7a..239f1caa 100644 --- a/packages/core/src/systems/stair/stair-opening-sync.ts +++ b/packages/core/src/systems/stair/stair-opening-sync.ts @@ -266,7 +266,7 @@ function getStraightFlightOpeningDepth(stair: StairNode, segment: StairSegmentNo 0.2, segment.length / Math.max(segment.stepCount || stair.stepCount || 10, 1), ) - return Math.min(segment.length, Math.max(treadDepth * 6, segment.length * 0.62, 1.8)) + return Math.min(segment.length, Math.max(treadDepth * 10, segment.length * 0.8, 3.0)) } function polygonArea(points: Point2D[]) { @@ -486,7 +486,7 @@ function getStraightOpeningPolygonsForSurface( const riserHeight = (stair.totalRise ?? 2.5) / Math.max(stair.stepCount ?? 10, 1) const targetThreshold = Math.max(riserHeight * 2, STRAIGHT_STAIR_TARGET_THRESHOLD_MIN) - const openingOffset = Math.max(stair.openingOffset ?? 0, 0) + const openingOffset = Math.max(stair.openingOffset ?? 0, 0.15) const openingRects: AxisAlignedRect[] = [] for (let index = 0; index < layouts.length; index += 1) {