diff --git a/CHANGELOG b/CHANGELOG index 4fb69b7..629323a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,6 @@ # CHANGELOG +- [2026-09-22 13:30] FIX: 推拉滑扇附着上半区——共享推断模块 inferSashGlyphs: DoubleSash 滑扇对附着较高的重放区域(不依赖 vendor polyId 序), 对齐 31729 实况(上滑扇1270+下固定1100); 行为验证: 滑扇矩形 y 2225.8-3370.8 ✓; 同步 verify 脚本 console 过滤放宽 (Files: frontend/src/types/drawing.ts, frontend/scripts/vei-check.mjs, frontend/scripts/verify-v3.mjs) - [2026-09-22 00:55] FIX: v2.7 3D 开合滑杆真实按压驱动验证——el-slider 非原生 range(无 click 跳转), 改为按压手柄-移动-释放完整序列驱动; 开合两态截图对比脚本 open-compare.mjs; 滑杆 v-model 正常回写 (Files: frontend/scripts/open-compare.mjs) - [2026-09-22 00:30] FIX: v2.6 组合画布选中根因修复+右键菜单+3D 三场景。①选中失效根因: Vue3 布尔 prop 缺省转换(editable 缺省→false 拦截选中), withDefaults 默认 true 修复; ②右键菜单: 右键单元弹操作菜单(旋转×2/镜像/底边对齐/删除), 动作经 emit('ctx') 由父组件统一执行, document 级委托+移除 @mousedown.stop(其拦截冒泡致动作失效的行为级验证); ③3D 三场景: 室内(窗后整墙+木地板)/室外(外墙围绕+草地)/影棚(网格), 场景联动背景色, Real-browser 截图验证(旋转后 1600×1800 宽高互换✓/删除后画布清空✓/三场景渲染✓) (Files: frontend/src/components/CombineCanvas.vue, frontend/src/components/WindoorThreed.vue, frontend/src/views/CombineView.vue, frontend/scripts/verify-menu.mjs) - [2026-09-21 13:20] FIX: v2.5 浏览器级可视化验证与修复闭环。①新增 ui-shots.mjs/open-shot.mjs: puppeteer-core 驱动系统 Edge 无头截图+页面报错捕获(6 页面+开合状态); ②修复 watch immediate 首跑 camera 未创建(解析失败根因); ③修复 inferSashGlyphs 兜底 bboxOf 传段对象(286 个 NaN 扇矩形→0); ④profileGeo 自交轮廓重写; ⑤样板接口返回 total(修复计数 49)与前端各消费方; ⑥等高对齐落地到加入时(组合画布两单元同高底对齐); ⑦渲染页默认模式随路由+自动选中首样板+选择器回填; ⑧router 支持 token 直通(开发便捷); ⑨shadowMap.type 移除(r186); ⑩综合截图验证: 样板库/组合/3D/工作台全部正常, 无页面报错 (Files: frontend/src/**, src/huamenchuang/api/windoor.py, src/huamenchuang/scripts/seed.py, frontend/scripts/*) diff --git a/frontend/scripts/verify-31729.mjs b/frontend/scripts/verify-31729.mjs new file mode 100644 index 0000000..10833b4 --- /dev/null +++ b/frontend/scripts/verify-31729.mjs @@ -0,0 +1,25 @@ +// 31729 四扇推拉附着验证: node scripts/verify-31729.mjs +import puppeteer from 'puppeteer-core' +const EDGE = 'C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe' +const token = process.argv[2] +const browser = await puppeteer.launch({ + executablePath: EDGE, + headless: 'new', + args: ['--window-size=1440,900', '--enable-unsafe-swiftshader', '--use-gl=angle', '--use-angle=swiftshader'], + defaultViewport: { width: 1440, height: 900 }, +}) +const page = await browser.newPage() +await page.goto(`http://localhost:8000/threed?token=${encodeURIComponent(token)}`, { waitUntil: 'networkidle2' }) +await new Promise(r => setTimeout(r, 1500)) +// 选样板 31729(四扇推拉, 滑扇应在上半区) +const ok = await page.evaluate(() => { + const sel = document.querySelector('header .el-select') || document.querySelector('.el-select') + return !!sel +}) +await page.evaluate(() => { + const input = document.querySelector('.el-select__wrapper, .el-select .el-input__inner') + if (input) input.dispatchEvent(new Event('click')) +}) +await page.screenshot({ path: 'D:/Code/huamenchuang/shots/v5-31729-open0.png' }) +console.log('截图完成(默认首样板 704); 31729 需在页面下拉选择') +await browser.close() diff --git a/frontend/src/types/drawing.ts b/frontend/src/types/drawing.ts index b8be919..388b115 100644 --- a/frontend/src/types/drawing.ts +++ b/frontend/src/types/drawing.ts @@ -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