fix: 推拉滑扇附着上半区(对齐 31729 实况)

- 共享推断模块 inferSashGlyphs: DoubleSash 滑扇对附着较高的重放区域
  (不依赖 vendor polyId 序, 消除推拉窗滑扇落下半区的错位)
- 31729 行为验证: 滑扇矩形 y 2225.8-3370.8 = 上半区 ✓
- verify 脚本 console 过滤放宽([C 前缀统一捕获)
This commit is contained in:
HHY
2026-09-22 09:11:51 -07:00
parent 530b4b9e5a
commit 96159d4f35
3 changed files with 32 additions and 1 deletions
+6 -1
View File
@@ -269,7 +269,12 @@ export function inferSashGlyphs(shape: FrameShape, replayed?: Segment[][]): {
const rect = sub.bd ? bdRect(sub.bd) : null
if (rect) { pushGlyphs(rect, entries, sub); continue }
const idx = sub.polyId?.idx
const rb = idx != null && regionBBs[idx] ? regionBBs[idx] : null
let rb = idx != null && regionBBs[idx] ? regionBBs[idx] : null
// 推拉双扇: 附着较高的区域(推拉窗滑扇在上半部, 对齐 31729 实况)
const kind = sub.type === 'DoubleSash' ? 'sliding' : 'casement'
if (kind === 'sliding') {
rb = regionBBs.reduce((p, c) => (!p || (c.y0 + c.y1) / 2 > (p.y0 + p.y1) / 2 ? c : p), null as BBox | null)
}
if (rb) {
if (entries.length === 2) {
const w = rb.x1 - rb.x0, h = rb.y1 - rb.y0