Browse Source

shuttle Rack

master
yuliang 6 months ago
parent
commit
e7f2367334
  1. BIN
      src/assets/Models/shuttle.glb
  2. 2
      src/core/manager/WorldModel.ts
  3. 252
      src/example/example1.js
  4. 5
      src/modules/shuttle_rack/ShuttleRackEntity.ts
  5. 22
      src/modules/shuttle_rack/ShuttleRackInteraction.ts
  6. 65
      src/modules/shuttle_rack/ShuttleRackPropertySetter.ts
  7. 1022
      src/modules/shuttle_rack/ShuttleRackRenderer.ts
  8. 15
      src/modules/shuttle_rack/index.ts

BIN
src/assets/Models/shuttle.glb

Binary file not shown.

2
src/core/manager/WorldModel.ts

@ -5,6 +5,7 @@ import Measure from '@/modules/measure'
import Way from '@/modules/way' import Way from '@/modules/way'
import Gstore from '@/modules/gstore' import Gstore from '@/modules/gstore'
import Rack from '@/modules/rack' import Rack from '@/modules/rack'
import ShuttleRack from '@/modules/shuttle_rack'
import Pallet from "@/modules/pallet" import Pallet from "@/modules/pallet"
import Tote from "@/modules/tote" import Tote from "@/modules/tote"
import Carton from "@/modules/carton" import Carton from "@/modules/carton"
@ -73,6 +74,7 @@ export default class WorldModel {
Way, Way,
Gstore, Gstore,
Rack, Rack,
ShuttleRack,
Pallet, Pallet,
Tote, Tote,
Carton, Carton,

252
src/example/example1.js

@ -471,17 +471,21 @@ export default {
catalogCode: 'shuttle1', t: 'floor', catalogCode: 'shuttle1', t: 'floor',
items: [ items: [
{ {
id: 'shuttle_rack1',
t: 'shuttle_rack', // 多穿库货架 t: 'shuttle_rack', // 多穿库货架
tf: [[0, 0.1, 0], [0, 0, 0], [1, 1, 1]],
dt: { dt: {
bayCount: 15, // 列数 bayCount: 15, // 列数
aisleCount: 2, // 巷道数 aisleCount: 16, // 巷道数
hideFloor: false, // 隐藏底板 hideFloor: false, // 隐藏底板
shuttleRackDepth:7.6,
bayRail: [ // 横行巷道 bayRail: [ // 横行巷道
{ {
afterBay: 2, // 横行巷道所在位置 afterBay: 2, // 横行巷道所在位置
railWidth: 1.4 // 横行巷道宽度 railWidth: 1.4 // 横行巷道宽度
}, },
{ afterBay: 11, railWidth: 1.4 } { afterBay: 15, railWidth: 1.4 },
{ afterBay: 26, railWidth: 1.4 }
], ],
bays: [ // 每列的配置 bays: [ // 每列的配置
{ bayWidth: 1.6 }, { bayWidth: 1.6 },
@ -500,6 +504,24 @@ export default {
{ bayWidth: 1.6 }, { bayWidth: 1.6 },
{ bayWidth: 1.6 }, { bayWidth: 1.6 },
{ bayWidth: 1.6 }, { bayWidth: 1.6 },
{ bayWidth: 1.6 },
{ bayWidth: 1.6 },
{ bayWidth: 1.6 },
{ bayWidth: 1.6 },
{ bayWidth: 1.6 },
{ bayWidth: 1.6 },
{ bayWidth: 1.6 },
{ bayWidth: 1.6 },
{ bayWidth: 1.6 },
{ bayWidth: 1.6 },
{ bayWidth: 1.6 },
{ bayWidth: 1.6 },
{ bayWidth: 1.6 },
{ bayWidth: 1.6 },
{ bayWidth: 1.6 },
{ bayWidth: 1.6 } { bayWidth: 1.6 }
], ],
aisles: [ // 巷道的配置 aisles: [ // 巷道的配置
@ -507,14 +529,14 @@ export default {
rail: { railWidth: 0.8 }, // 轨道, 主要是轨道宽度 rail: { railWidth: 0.8 }, // 轨道, 主要是轨道宽度
railLeft: { // 轨道左侧 railLeft: { // 轨道左侧
stores: [ // 轨道左侧货位 stores: [ // 轨道左侧货位
{ depth: 1.1 }, // 深位1的存储深度 { depth: 0.75 }, // 深位1的存储深度
{ depth: 1.1 } // 深位2的存储深度 { depth: 0.75 } // 深位2的存储深度
] ]
}, },
railRight: { // 轨道左侧 railRight: { // 轨道左侧
stores: [ // 轨道左侧货位 stores: [ // 轨道左侧货位
{ depth: 1.1 }, // 深位1的存储深度 { depth: 0.75 }, // 深位1的存储深度
{ depth: 1.1 } // 深位2的存储深度 { depth: 0.75 } // 深位2的存储深度
] ]
} }
}, },
@ -522,14 +544,224 @@ export default {
rail: { railWidth: 0.8 }, rail: { railWidth: 0.8 },
railLeft: { railLeft: {
stores: [ stores: [
{ depth: 1.1 }, { depth: 0.75 },
{ depth: 1.1 } { depth: 0.75 }
] ]
}, },
railRight: { railRight: {
stores: [ stores: [
{ depth: 1.1 }, { depth: 0.75 },
{ depth: 1.1 } { depth: 0.75 }
]
}
},
{
rail: { railWidth: 0.8 }, // 轨道, 主要是轨道宽度
railLeft: { // 轨道左侧
stores: [ // 轨道左侧货位
{ depth: 0.75 }, // 深位1的存储深度
{ depth: 0.75 } // 深位2的存储深度
]
},
railRight: { // 轨道左侧
stores: [ // 轨道左侧货位
{ depth: 0.75 }, // 深位1的存储深度
{ depth: 0.75 } // 深位2的存储深度
]
}
},
{
rail: { railWidth: 0.8 },
railLeft: {
stores: [
{ depth: 0.75 },
{ depth: 0.75 }
]
},
railRight: {
stores: [
{ depth: 0.75 },
{ depth: 0.75 }
]
}
},
{
rail: { railWidth: 0.8 }, // 轨道, 主要是轨道宽度
railLeft: { // 轨道左侧
stores: [ // 轨道左侧货位
{ depth: 0.75 }, // 深位1的存储深度
{ depth: 0.75 } // 深位2的存储深度
]
},
railRight: { // 轨道左侧
stores: [ // 轨道左侧货位
{ depth: 0.75 }, // 深位1的存储深度
{ depth: 0.75 } // 深位2的存储深度
]
}
},
{
rail: { railWidth: 0.8 },
railLeft: {
stores: [
{ depth: 0.75 },
{ depth: 0.75 }
]
},
railRight: {
stores: [
{ depth: 0.75 },
{ depth: 0.75 }
]
}
},
{
rail: { railWidth: 0.8 }, // 轨道, 主要是轨道宽度
railLeft: { // 轨道左侧
stores: [ // 轨道左侧货位
{ depth: 0.75 }, // 深位1的存储深度
{ depth: 0.75 } // 深位2的存储深度
]
},
railRight: { // 轨道左侧
stores: [ // 轨道左侧货位
{ depth: 0.75 }, // 深位1的存储深度
{ depth: 0.75 } // 深位2的存储深度
]
}
},
{
rail: { railWidth: 0.8 },
railLeft: {
stores: [
{ depth: 0.75 },
{ depth: 0.75 }
]
},
railRight: {
stores: [
{ depth: 0.75 },
{ depth: 0.75 }
]
}
},
{
rail: { railWidth: 0.8 }, // 轨道, 主要是轨道宽度
railLeft: { // 轨道左侧
stores: [ // 轨道左侧货位
{ depth: 0.75 }, // 深位1的存储深度
{ depth: 0.75 } // 深位2的存储深度
]
},
railRight: { // 轨道左侧
stores: [ // 轨道左侧货位
{ depth: 0.75 }, // 深位1的存储深度
{ depth: 0.75 } // 深位2的存储深度
]
}
},
{
rail: { railWidth: 0.8 },
railLeft: {
stores: [
{ depth: 0.75 },
{ depth: 0.75 }
]
},
railRight: {
stores: [
{ depth: 0.75 },
{ depth: 0.75 }
]
}
},
{
rail: { railWidth: 0.8 }, // 轨道, 主要是轨道宽度
railLeft: { // 轨道左侧
stores: [ // 轨道左侧货位
{ depth: 0.75 }, // 深位1的存储深度
{ depth: 0.75 } // 深位2的存储深度
]
},
railRight: { // 轨道左侧
stores: [ // 轨道左侧货位
{ depth: 0.75 }, // 深位1的存储深度
{ depth: 0.75 } // 深位2的存储深度
]
}
},
{
rail: { railWidth: 0.8 },
railLeft: {
stores: [
{ depth: 0.75 },
{ depth: 0.75 }
]
},
railRight: {
stores: [
{ depth: 0.75 },
{ depth: 0.75 }
]
}
},
{
rail: { railWidth: 0.8 }, // 轨道, 主要是轨道宽度
railLeft: { // 轨道左侧
stores: [ // 轨道左侧货位
{ depth: 0.75 }, // 深位1的存储深度
{ depth: 0.75 } // 深位2的存储深度
]
},
railRight: { // 轨道左侧
stores: [ // 轨道左侧货位
{ depth: 0.75 }, // 深位1的存储深度
{ depth: 0.75 } // 深位2的存储深度
]
}
},
{
rail: { railWidth: 0.8 },
railLeft: {
stores: [
{ depth: 0.75 },
{ depth: 0.75 }
]
},
railRight: {
stores: [
{ depth: 0.75 },
{ depth: 0.75 }
]
}
},
{
rail: { railWidth: 0.8 }, // 轨道, 主要是轨道宽度
railLeft: { // 轨道左侧
stores: [ // 轨道左侧货位
{ depth: 0.75 }, // 深位1的存储深度
{ depth: 0.75 } // 深位2的存储深度
]
},
railRight: { // 轨道左侧
stores: [ // 轨道左侧货位
{ depth: 0.75 }, // 深位1的存储深度
{ depth: 0.75 } // 深位2的存储深度
]
}
},
{
rail: { railWidth: 0.8 },
railLeft: {
stores: [
{ depth: 0.75 },
{ depth: 0.75 }
]
},
railRight: {
stores: [
{ depth: 0.75 },
{ depth: 0.75 }
] ]
} }
} }

5
src/modules/shuttle_rack/ShuttleRackEntity.ts

@ -0,0 +1,5 @@
import BaseEntity from '@/core/base/BaseItemEntity.ts'
export default class ShuttleRackEntity extends BaseEntity {
}

22
src/modules/shuttle_rack/ShuttleRackInteraction.ts

@ -0,0 +1,22 @@
import BaseInteraction from '@/core/base/BaseInteraction.ts'
import * as THREE from 'three'
export default class ShuttleRackInteraction extends BaseInteraction {
get isSinglePointMode(): boolean {
return true
}
constructor(itemTypeName: string) {
super(itemTypeName)
}
createPointOfItem(item: ItemJson, point: THREE.Vector3): ItemJson {
item = super.createPointOfItem(item, point)
// 创建一个地堆货架
item.dt.rackWidth = 3 // 宽度
item.dt.rackDepth = 1 // 深度
return item
}
}

65
src/modules/shuttle_rack/ShuttleRackPropertySetter.ts

@ -0,0 +1,65 @@
import type { PropertySetter } from "@/core/base/PropertyTypes.ts";
import { basicFieldsSetter } from "@/editor/widgets/property/PropertyPanelConstant.ts";
const propertySetter: PropertySetter = {
flatten: {
fields: [
...basicFieldsSetter,
{
dataPath: 'dt.rackDepth', label: '货架深度', input: 'InputNumber',
inputProps: {},
},
{
dataPath: 'dt.levelCount', label: '总层数', input: 'InputNumber',
inputProps: {},
},
{
dataPath: 'dt.bayCount', label: '总列数', input: 'InputNumber',
inputProps: {},
},
{
dataPath: 'dt.hideFloor', label: '隐藏底板', input: 'InputNumber',
inputProps: {},
},
{
dataPath: 'dt.extendColumns', label: '扩展挡板', input: 'InputNumber',
inputProps: {},
},
{
dataPath: 'dt.columnSpacing', label: '支脚跨越', input: 'InputNumber',
inputProps: {},
},
{
dataPath: 'dt.bays', input: 'BayEditor',
inputProps: {
},
},
/**
* dt.bays 53
* {
* dt: {
* rackDepth: 1.1, // 货架深度
* levelCount: 3, // 总层数
* bayCount: 5, // 总列数
* hideFloor: false, // 隐藏底板
* extendColumns: true, // 扩展挡板
* columnSpacing: 1, // 支脚跨越
* bays: [ // 每列的配置
* {
* bayWidth: 1.6, // 列的宽度
* offset: // 列偏移
* levelHeight: [ 1.4, 1.4, 1.4 ] // 每层的高度
* },
* {bayWidth: 1.6, levelHeight: [ 1.4, 1.4, 1.4 ]},
* {bayWidth: 1.6, levelHeight: [ 1.4, 1.4, 1.4 ]},
* {bayWidth: 1.6, levelHeight: [ 1.4, 1.4, 1.4 ]},
* {bayWidth: 1.6, levelHeight: [ 1.4, 1.4, 1.4 ]},
* ]
* }
* }
*/
],
},
};
export default propertySetter;

1022
src/modules/shuttle_rack/ShuttleRackRenderer.ts

File diff suppressed because it is too large

15
src/modules/shuttle_rack/index.ts

@ -0,0 +1,15 @@
import { defineModule } from '@/core/manager/ModuleManager.ts'
import ShuttleRackRenderer from './ShuttleRackRenderer.ts'
import ShuttleRackEntity from './ShuttleRackEntity.ts'
import ShuttleRackInteraction from './ShuttleRackInteraction.ts'
import propertySetter from "./ShuttleRackPropertySetter.ts";
export const ITEM_TYPE_NAME = 'shuttle_rack'
export default defineModule({
name: ITEM_TYPE_NAME,
renderer: new ShuttleRackRenderer(ITEM_TYPE_NAME),
interaction: new ShuttleRackInteraction(ITEM_TYPE_NAME),
setter: propertySetter,
entity: ShuttleRackEntity,
})
Loading…
Cancel
Save