|
|
@@ -2,6 +2,7 @@
|
|
|
import * as THREE from 'three'
|
|
|
import { enhancementLabel } from '../domain/pipeEnhancement.js'
|
|
|
import { displayPipeDiameter, PIPE_PALETTE } from '../domain/pipeVisual.js'
|
|
|
+import { manholeModelMetrics } from '../domain/manholeModel.js'
|
|
|
import { attachSceneFocus } from './sceneInputFocus.js'
|
|
|
import { addDetailedPipeSegment } from './pipeDetailGeometry.js'
|
|
|
import { attachPointPick } from './pointPick.js'
|
|
|
@@ -155,19 +156,22 @@ function buildObject(plan, frame = null) {
|
|
|
})
|
|
|
}
|
|
|
} else if (object.renderKind === 'manhole') {
|
|
|
- const shell = new THREE.Mesh(new THREE.CylinderGeometry(0.85, 0.85, 2.4, 32, 1, true, Math.PI * 0.25, Math.PI * 1.5),
|
|
|
+ // 票 04:尺寸与 Y 偏移全部来自 domain/manholeModel.js 的单源,
|
|
|
+ // 并与管线共用同一个显示倍率(PIPE_DISPLAY.diameterScale),不再手写第二组米数。
|
|
|
+ const model = manholeModelMetrics()
|
|
|
+ const shell = new THREE.Mesh(new THREE.CylinderGeometry(model.shaft.radius, model.shaft.radius, model.shaft.height, 32, 1, true, Math.PI * 0.25, Math.PI * 1.5),
|
|
|
new THREE.MeshStandardMaterial({ color: '#718093', roughness: 0.9, side: THREE.DoubleSide }))
|
|
|
shell.name = 'manhole-shaft'
|
|
|
shell.position.copy(points[0])
|
|
|
- shell.position.y = -0.9
|
|
|
+ shell.position.y = model.shaft.centerY
|
|
|
root.add(shell)
|
|
|
- const base = new THREE.Mesh(new THREE.CylinderGeometry(0.86, 0.86, 0.12, 32), material('#53616f'))
|
|
|
- base.position.copy(points[0]); base.position.y = -2.15
|
|
|
+ const base = new THREE.Mesh(new THREE.CylinderGeometry(model.base.radius, model.base.radius, model.base.height, 32), material('#53616f'))
|
|
|
+ base.position.copy(points[0]); base.position.y = model.base.centerY
|
|
|
root.add(base)
|
|
|
- const cover = new THREE.Mesh(new THREE.CylinderGeometry(0.9, 0.9, 0.12, 32), material(color))
|
|
|
+ const cover = new THREE.Mesh(new THREE.CylinderGeometry(model.cover.radius, model.cover.radius, model.cover.height, 32), material(color))
|
|
|
cover.name = 'manhole-cover'
|
|
|
- cover.position.copy(points[0]); cover.position.y = 0.55
|
|
|
- cover.rotation.x = -0.2
|
|
|
+ cover.position.copy(points[0]); cover.position.y = model.cover.centerY
|
|
|
+ cover.rotation.x = model.cover.tilt
|
|
|
root.add(cover)
|
|
|
} else {
|
|
|
const shape = object.renderKind === 'valve'
|