dev #949

Merged
ysCha merged 2 commits from dev into prd-deploy 2026-07-02 17:54:22 +09:00
2 changed files with 16 additions and 4 deletions
Showing only changes of commit 5f316195e0 - Show all commits

View File

@ -1072,8 +1072,14 @@ export function useModule() {
// 정상 격자(정확히 30/3mm)도 측정 간격이 축소돼 위반 오판 → 모든 방향 이동 차단(회귀) 발생.
const isTooCloseToOtherModules = (module, otherModules, surface) => {
if (!otherModules || otherModules.length === 0) return false
const gapVer = Number(surface?.trestleDetail?.moduleIntvlVer ?? 0) / 10 // mm → canvas unit
const gapHor = Number(surface?.trestleDetail?.moduleIntvlHor ?? 0) / 10
// [PLACE-CLEARANCE-SWAP 2026-07-02] 스냅 배치와 동일하게 flowDirection 으로 縦/横 간격을 캔버스 축에 매핑.
// 東/西 흐름에선 縦(moduleIntvlVer)이 캔버스 x축, 横(moduleIntvlHor)이 캔버스 y축이라 축이 뒤바뀐다.
// 스왑 없이 세로(캔버스 y) 적재에 항상 moduleIntvlVer 를 요구하면, 스냅이 moduleIntvlHor 로 붙인 정상 배치를 오판 거부한다.
const isEastWest = surface?.direction === 'east' || surface?.direction === 'west'
const intvlVerMm = Number(surface?.trestleDetail?.moduleIntvlVer ?? 0)
const intvlHorMm = Number(surface?.trestleDetail?.moduleIntvlHor ?? 0)
const gapVer = (isEastWest ? intvlHorMm : intvlVerMm) / 10 // 세로(캔버스 y) 적재 요구 간격
const gapHor = (isEastWest ? intvlVerMm : intvlHorMm) / 10 // 가로(캔버스 x) 적재 요구 간격
if (gapVer <= 0 && gapHor <= 0) return false
const EPS = 0.05 // 0.5mm — 좌표 반올림 잔차(±0.02) 흡수, 의미있는 위반은 통과 못함
const bboxOf = (o) => {

View File

@ -303,8 +303,14 @@ export function useModuleBasicSetting(tabNum) {
// ⚠ 간격은 stroke 를 뺀 실제 정점(getCurrentPoints)으로 잰다. getBoundingRect 는 strokeWidth 팽창 → 정상 격자도 위반 오판.
const isTooCloseToOtherModules = (module, otherModules, surface) => {
if (!otherModules || otherModules.length === 0) return false
const gapVer = Number(surface?.trestleDetail?.moduleIntvlVer ?? 0) / 10 // mm → canvas unit
const gapHor = Number(surface?.trestleDetail?.moduleIntvlHor ?? 0) / 10
// [PLACE-CLEARANCE-SWAP 2026-07-02] 스냅 배치(:824-831)와 동일하게 flowDirection 으로 縦/横 간격을 캔버스 축에 매핑.
// 東/西 흐름에선 縦(moduleIntvlVer)이 캔버스 x축, 横(moduleIntvlHor)이 캔버스 y축이라 축이 뒤바뀐다.
// 스왑 없이 세로(캔버스 y) 적재에 항상 moduleIntvlVer 를 요구하면, 스냅이 moduleIntvlHor 로 붙인 정상 배치를 오판 거부한다.
const isEastWest = surface?.direction === 'east' || surface?.direction === 'west'
const intvlVerMm = Number(surface?.trestleDetail?.moduleIntvlVer ?? 0)
const intvlHorMm = Number(surface?.trestleDetail?.moduleIntvlHor ?? 0)
const gapVer = (isEastWest ? intvlHorMm : intvlVerMm) / 10 // 세로(캔버스 y) 적재 요구 간격
const gapHor = (isEastWest ? intvlVerMm : intvlHorMm) / 10 // 가로(캔버스 x) 적재 요구 간격
if (gapVer <= 0 && gapHor <= 0) return false
const EPS = 0.05 // 0.5mm — 좌표 반올림 잔차(±0.02) 흡수
const bboxOf = (o) => {