[모듈배치] PCS 진입 시 랙 크기순서 검증 오판 수정 — 모듈 면적을 스펙 치수로 산출

작업내용 :
- validateModuleSizeForRack 내 centerPoints area 산출을
  캔버스 측정치(Math.round(width×height))에서
  모듈 스펙(longAxis×shortAxis, moduleInfo 경유)으로 변경
- 같은 모듈이라도 캔버스 반올림으로 width 가 73/74 로 갈려
  area 가 161 만큼 벌어져 랙 크기순서 위반 오판 → PCS 진입 즉시 에러 유발
- 스펙 치수는 동일 제품이면 항상 동일하므로 diff=0 → 오판 제거
- gap 계산(인접 판정)용 width/height 는 캔버스 측정치 유지 (기하 정확도 보존)
This commit is contained in:
ysCha 2026-07-02 17:52:00 +09:00
parent 5f316195e0
commit 38d04918a2

View File

@ -147,12 +147,17 @@ export default function CircuitTrestleSetting({ id }) {
const centerPoints = modules.map((module) => { const centerPoints = modules.map((module) => {
const { x, y } = module.getCenterPoint() const { x, y } = module.getCenterPoint()
const { width, height } = module const { width, height } = module
// [RACK-AREA-SPEC 2026-07-02] (Math.round(width/height)) (longAxis×shortAxis) .
// width 73/74 area 161 (= ) .
// · area . (gap width/height )
const specLong = Number(module.longAxis ?? module.moduleInfo?.longAxis ?? 0) / 10
const specShort = Number(module.shortAxis ?? module.moduleInfo?.shortAxis ?? 0) / 10
return { return {
x, x,
y, y,
width: Math.round(width), width: Math.round(width),
height: Math.round(height), height: Math.round(height),
area: Math.round(width) * Math.round(height), area: specLong * specShort,
} }
}) })