diff --git a/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx b/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx index 9f1baec0..333bc0e7 100644 --- a/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx +++ b/src/components/floor-plan/modal/circuitTrestle/CircuitTrestleSetting.jsx @@ -147,12 +147,17 @@ export default function CircuitTrestleSetting({ id }) { const centerPoints = modules.map((module) => { const { x, y } = module.getCenterPoint() 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 { x, y, width: Math.round(width), height: Math.round(height), - area: Math.round(width) * Math.round(height), + area: specLong * specShort, } })