fix: 修复 3D NaN 崩溃/样品图不刷新/画布点选失效
- replayShape 段过滤补 Y 轴有限值校验(此前仅校验 X) - inferSashGlyphs bdRect 增加有限值守卫 - WindoorThreed 逐网格有限值防护 + maxDim 守卫, 杜绝 NaN 网格 - CombineCanvas shapePts 过滤非有限点, 修复包围盒污染导致的点选失效 - 组合画布引入 rev 版本号: 原地变异几何后强制 3D 预览重建 (修复尺寸编辑后样品图不变化)
This commit is contained in:
@@ -47,10 +47,12 @@ function shapePts(shape: any): Pt[] {
|
||||
const out: Pt[] = []
|
||||
for (const r of (shape.polygon?.polygon ?? []))
|
||||
for (const seg of r) {
|
||||
if (seg.ps && Number.isFinite(seg.ps.x)) out.push(seg.ps)
|
||||
if (seg.pe && Number.isFinite(seg.pe.x)) out.push(seg.pe)
|
||||
if (seg.ps && Number.isFinite(seg.ps.x) && Number.isFinite(seg.ps.y)) out.push(seg.ps)
|
||||
if (seg.pe && Number.isFinite(seg.pe.x) && Number.isFinite(seg.pe.y)) out.push(seg.pe)
|
||||
}
|
||||
for (const sp of (shape.mm?.sp ?? [])) if (sp.line?.pt) out.push(sp.line.pt)
|
||||
for (const sp of (shape.mm?.sp ?? [])) {
|
||||
if (sp.line?.pt && Number.isFinite(sp.line.pt.x) && Number.isFinite(sp.line.pt.y)) out.push(sp.line.pt)
|
||||
}
|
||||
return out
|
||||
}
|
||||
function translateUid(uid: number, dx: number, dy: number) {
|
||||
|
||||
Reference in New Issue
Block a user