Compare commits

...

3 Commits

Author SHA1 Message Date
fd7ab22754 Merge pull request 'dev' (#948) from dev into dev-deploy
Reviewed-on: #948
2026-07-02 17:54:00 +09:00
38d04918a2 [모듈배치] PCS 진입 시 랙 크기순서 검증 오판 수정 — 모듈 면적을 스펙 치수로 산출
작업내용 :
- validateModuleSizeForRack 내 centerPoints area 산출을
  캔버스 측정치(Math.round(width×height))에서
  모듈 스펙(longAxis×shortAxis, moduleInfo 경유)으로 변경
- 같은 모듈이라도 캔버스 반올림으로 width 가 73/74 로 갈려
  area 가 161 만큼 벌어져 랙 크기순서 위반 오판 → PCS 진입 즉시 에러 유발
- 스펙 치수는 동일 제품이면 항상 동일하므로 diff=0 → 오판 제거
- gap 계산(인접 판정)용 width/height 는 캔버스 측정치 유지 (기하 정확도 보존)
2026-07-02 17:52:00 +09:00
5f316195e0 [2332] 東/西 흐름 手動배치·이동 게이트 縦/横 간격 축 스왑 누락 수정
작업내용 :
- isTooCloseToOtherModules(배치·이동 게이트)가 flowDirection 에 무관하게
  항상 moduleIntvlVer=세로간격, moduleIntvlHor=가로간격으로 고정해
  東/西 흐름 설치면에서 스냅이 横(3mm)으로 붙인 정상 배치를
  縦(7mm) 기준으로 오판 거부하던 버그 수정
- 스냅 배치 로직(:824-831)과 동일하게 direction east/west 일 때
  gapVer=moduleIntvlHor, gapHor=moduleIntvlVer 로 스왑 적용
- useModuleBasicSetting.js(手動배치), useModule.js(이동) 동기 수정
2026-07-02 17:48:56 +09:00
3 changed files with 22 additions and 5 deletions

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,
} }
}) })

View File

@ -1072,8 +1072,14 @@ export function useModule() {
// 정상 격자(정확히 30/3mm)도 측정 간격이 축소돼 위반 오판 → 모든 방향 이동 차단(회귀) 발생. // 정상 격자(정확히 30/3mm)도 측정 간격이 축소돼 위반 오판 → 모든 방향 이동 차단(회귀) 발생.
const isTooCloseToOtherModules = (module, otherModules, surface) => { const isTooCloseToOtherModules = (module, otherModules, surface) => {
if (!otherModules || otherModules.length === 0) return false if (!otherModules || otherModules.length === 0) return false
const gapVer = Number(surface?.trestleDetail?.moduleIntvlVer ?? 0) / 10 // mm → canvas unit // [PLACE-CLEARANCE-SWAP 2026-07-02] 스냅 배치와 동일하게 flowDirection 으로 縦/横 간격을 캔버스 축에 매핑.
const gapHor = Number(surface?.trestleDetail?.moduleIntvlHor ?? 0) / 10 // 東/西 흐름에선 縦(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 if (gapVer <= 0 && gapHor <= 0) return false
const EPS = 0.05 // 0.5mm — 좌표 반올림 잔차(±0.02) 흡수, 의미있는 위반은 통과 못함 const EPS = 0.05 // 0.5mm — 좌표 반올림 잔차(±0.02) 흡수, 의미있는 위반은 통과 못함
const bboxOf = (o) => { const bboxOf = (o) => {

View File

@ -303,8 +303,14 @@ export function useModuleBasicSetting(tabNum) {
// ⚠ 간격은 stroke 를 뺀 실제 정점(getCurrentPoints)으로 잰다. getBoundingRect 는 strokeWidth 팽창 → 정상 격자도 위반 오판. // ⚠ 간격은 stroke 를 뺀 실제 정점(getCurrentPoints)으로 잰다. getBoundingRect 는 strokeWidth 팽창 → 정상 격자도 위반 오판.
const isTooCloseToOtherModules = (module, otherModules, surface) => { const isTooCloseToOtherModules = (module, otherModules, surface) => {
if (!otherModules || otherModules.length === 0) return false if (!otherModules || otherModules.length === 0) return false
const gapVer = Number(surface?.trestleDetail?.moduleIntvlVer ?? 0) / 10 // mm → canvas unit // [PLACE-CLEARANCE-SWAP 2026-07-02] 스냅 배치(:824-831)와 동일하게 flowDirection 으로 縦/横 간격을 캔버스 축에 매핑.
const gapHor = Number(surface?.trestleDetail?.moduleIntvlHor ?? 0) / 10 // 東/西 흐름에선 縦(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 if (gapVer <= 0 && gapHor <= 0) return false
const EPS = 0.05 // 0.5mm — 좌표 반올림 잔차(±0.02) 흡수 const EPS = 0.05 // 0.5mm — 좌표 반올림 잔차(±0.02) 흡수
const bboxOf = (o) => { const bboxOf = (o) => {