@fmsim/machine 2.0.0-beta.29 → 2.0.0-beta.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fmsim/machine",
3
3
  "description": "Layout View를 구성하는 설비(machine)들과 유닛을 구현한 모듈입니다.",
4
4
  "author": "heartyoh",
5
- "version": "2.0.0-beta.29",
5
+ "version": "2.0.0-beta.30",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
8
8
  "things-scene": true,
@@ -55,5 +55,5 @@
55
55
  "prettier --write"
56
56
  ]
57
57
  },
58
- "gitHead": "27bcf95d9d1e3f6f04194abd3fb08b9778c70923"
58
+ "gitHead": "e411167ccba03a7da574b27730922fd699298dc6"
59
59
  }
@@ -91,9 +91,6 @@ class MCSRealObject3D extends RealObjectGroup {
91
91
  }
92
92
 
93
93
  protected get syncZPosOffset(): number {
94
- // zPos가 명시되면 그 값을 절대 높이로 사용 (다른 컴포넌트와 동일한 의미)
95
- if (this.component.state.zPos != null) return 0
96
-
97
94
  // zPosOverride: 고정 높이 (OHTLine 등)
98
95
  if (this._config.zPosOverride != null) {
99
96
  return this._config.zPosOverride
@@ -83,7 +83,7 @@ export class OHT3D extends RealObjectGroup {
83
83
  metalness: 0.4,
84
84
  })
85
85
 
86
- // ── 1. 하단 그리퍼 바 (캐리어를 집는 가로 바) ──
86
+ // ── 1. 하단 그리퍼 바 (캐리어를 집는 가로 바 — 이동 방향과 직교) ──
87
87
  const gripperBarW = w * 0.7
88
88
  const gripperBarD = h * 0.15
89
89
  const gripperGeo = new THREE.BoxGeometry(gripperBarW, gripperBarH, gripperBarD)
@@ -91,21 +91,21 @@ export class OHT3D extends RealObjectGroup {
91
91
  gripperMesh.position.y = gripperBarH / 2
92
92
  gripperMesh.castShadow = true
93
93
 
94
- // ── 2. 호이스트 암 (좌우 수직 기둥 + 하단 가로연결) ──
94
+ // ── 2. 호이스트 암 (전후 수직 기둥 + 하단 연결 바) ──
95
95
  const armBaseY = gripperBarH
96
96
  const armGeometries: THREE.BufferGeometry[] = []
97
97
 
98
- // 좌우 수직 기둥
99
- for (const xSign of [-1, 1]) {
98
+ // 전후 수직 기둥 (레일 방향 = Z축)
99
+ for (const zSign of [-1, 1]) {
100
100
  const pillar = new THREE.BoxGeometry(armThickness, armH, armThickness)
101
- pillar.translate(xSign * (w * 0.3), armBaseY + armH / 2, 0)
101
+ pillar.translate(0, armBaseY + armH / 2, zSign * (h * 0.3))
102
102
  armGeometries.push(pillar)
103
103
  }
104
104
 
105
- // 하단 가로 연결 바 (그리퍼와 암을 잇는 수평 바)
106
- const crossBarW = w * 0.6 + armThickness
105
+ // 하단 연결 바 (레일 방향으로 연결)
106
+ const crossBarD = h * 0.6 + armThickness
107
107
  const crossBarH = armThickness * 0.6
108
- const crossBar = new THREE.BoxGeometry(crossBarW, crossBarH, armThickness)
108
+ const crossBar = new THREE.BoxGeometry(armThickness, crossBarH, crossBarD)
109
109
  crossBar.translate(0, armBaseY + crossBarH / 2, 0)
110
110
  armGeometries.push(crossBar)
111
111
 
@@ -126,10 +126,10 @@ export class OHT3D extends RealObjectGroup {
126
126
  bodyMesh.castShadow = true
127
127
  bodyMesh.receiveShadow = true
128
128
 
129
- // ── 4. 상단 트롤리 플레이트 (납작하고 넓은 레일 클램프) ──
129
+ // ── 4. 상단 트롤리 플레이트 (레일 방향으로 길게 — Z축) ──
130
130
  const trolleyBaseY = bodyBaseY + bodyH + gap
131
- const trolleyW = w * 1.15
132
- const trolleyD = h * 0.6
131
+ const trolleyW = w * 0.6
132
+ const trolleyD = h * 1.15
133
133
  const trolleyGeo = new THREE.BoxGeometry(trolleyW, trolleyH, trolleyD)
134
134
  const trolleyMat = new THREE.MeshStandardMaterial({
135
135
  color: TROLLEY_COLOR,
@@ -140,16 +140,16 @@ export class OHT3D extends RealObjectGroup {
140
140
  trolleyMesh.position.y = trolleyBaseY + trolleyH / 2
141
141
  trolleyMesh.castShadow = true
142
142
 
143
- // ── 5. 좌우 바퀴 (트롤리 위, 레일을 타는 원통형 바퀴) ──
143
+ // ── 5. 전후 바퀴 (트롤리 위, 레일 방향 = Z축) ──
144
144
  const wheelBaseY = trolleyBaseY + trolleyH
145
145
  const wheelRadius = wheelH / 2
146
- const wheelDepth = h * 0.2
146
+ const wheelDepth = w * 0.2
147
147
  const wheelMeshes: THREE.Mesh[] = []
148
- for (const xSign of [-1, 1]) {
148
+ for (const zSign of [-1, 1]) {
149
149
  const wheelGeo = new THREE.CylinderGeometry(wheelRadius, wheelRadius, wheelDepth, 12)
150
- wheelGeo.rotateX(Math.PI / 2)
150
+ wheelGeo.rotateZ(Math.PI / 2)
151
151
  const wheelMesh = new THREE.Mesh(wheelGeo, trolleyMat)
152
- wheelMesh.position.set(xSign * (trolleyW * 0.35), wheelBaseY + wheelRadius, 0)
152
+ wheelMesh.position.set(0, wheelBaseY + wheelRadius, zSign * (trolleyD * 0.35))
153
153
  wheelMesh.castShadow = true
154
154
  wheelMeshes.push(wheelMesh)
155
155
  }