@things-factory/figure-service 10.1.198 → 10.1.201
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/dist-server/service/figure/figure-context.d.ts +1 -1
- package/dist-server/service/figure/figure-context.js +10 -4
- package/dist-server/service/figure/figure-context.js.map +1 -1
- package/dist-server/service/figure/figure-propose-steps.js +3 -3
- package/dist-server/service/figure/figure-propose-steps.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/recipes/_lib/model.mts +4 -4
- package/recipes/air-cylinder/build.mts +2 -2
- package/recipes/air-cylinder/models/default.json +1 -1
- package/recipes/air-cylinder/recipe.json +2 -4
- package/recipes/air-shower/build.mts +2 -2
- package/recipes/air-shower/models/default.json +1 -1
- package/recipes/air-shower/recipe.json +2 -4
- package/recipes/barrier-gate/build.mts +1 -1
- package/recipes/barrier-gate/models/default.json +1 -1
- package/recipes/barrier-gate/recipe.json +1 -2
- package/recipes/base-frame/build.mts +2 -2
- package/recipes/base-frame/models/default.json +1 -1
- package/recipes/base-frame/recipe.json +4 -8
- package/recipes/belt-surface/build.mts +1 -1
- package/recipes/belt-surface/models/default.json +1 -1
- package/recipes/belt-surface/recipe.json +1 -2
- package/recipes/bin-row/build.mts +1 -1
- package/recipes/bin-row/models/default.json +1 -1
- package/recipes/bin-row/recipe.json +1 -2
- package/recipes/bollard-row/build.mts +1 -1
- package/recipes/bollard-row/models/default.json +1 -1
- package/recipes/bollard-row/recipe.json +1 -2
- package/recipes/buzzer/build.mts +1 -1
- package/recipes/buzzer/models/default.json +1 -1
- package/recipes/buzzer/recipe.json +1 -2
- package/recipes/cabinet-doors/build.mts +2 -2
- package/recipes/cabinet-doors/models/default.json +1 -1
- package/recipes/cabinet-doors/models/doors=1.json +1 -1
- package/recipes/cabinet-doors/models/doors=2.json +1 -1
- package/recipes/cabinet-doors/recipe.json +2 -4
- package/recipes/cable-tray/build.mts +2 -2
- package/recipes/cable-tray/models/default.json +1 -1
- package/recipes/cable-tray/recipe.json +3 -6
- package/recipes/camera-mount/build.mts +2 -2
- package/recipes/camera-mount/models/default.json +1 -1
- package/recipes/camera-mount/recipe.json +2 -4
- package/recipes/canopy/build.mts +2 -2
- package/recipes/canopy/models/default.json +1 -1
- package/recipes/canopy/recipe.json +5 -10
- package/recipes/cart/build.mts +5 -5
- package/recipes/cart/models/default.json +1 -1
- package/recipes/cart/recipe.json +20 -40
- package/recipes/cart-handle/build.mts +2 -2
- package/recipes/cart-handle/models/default.json +1 -1
- package/recipes/cart-handle/recipe.json +3 -6
- package/recipes/casters-four/build.mts +2 -2
- package/recipes/casters-four/models/default.json +1 -1
- package/recipes/casters-four/recipe.json +16 -32
- package/recipes/ceiling-rail-carriage/build.mts +2 -2
- package/recipes/ceiling-rail-carriage/models/default.json +1 -1
- package/recipes/ceiling-rail-carriage/recipe.json +2 -4
- package/recipes/chain-rails/build.mts +2 -2
- package/recipes/chain-rails/models/default.json +1 -1
- package/recipes/chain-rails/recipe.json +2 -4
- package/recipes/charging-station/build.mts +2 -2
- package/recipes/charging-station/models/default.json +1 -1
- package/recipes/charging-station/recipe.json +2 -4
- package/recipes/column-row/build.mts +1 -1
- package/recipes/column-row/models/default.json +1 -1
- package/recipes/column-row/recipe.json +1 -2
- package/recipes/control-cabinet/build.mts +2 -2
- package/recipes/control-cabinet/models/default.json +1 -1
- package/recipes/control-cabinet/recipe.json +2 -4
- package/recipes/conveyor-skirts/build.mts +2 -2
- package/recipes/conveyor-skirts/models/default.json +1 -1
- package/recipes/conveyor-skirts/recipe.json +2 -4
- package/recipes/counter-display/build.mts +2 -2
- package/recipes/counter-display/models/default.json +1 -1
- package/recipes/counter-display/recipe.json +2 -4
- package/recipes/dock-bumpers/build.mts +1 -1
- package/recipes/dock-bumpers/models/default.json +1 -1
- package/recipes/dock-bumpers/recipe.json +2 -4
- package/recipes/dock-leveler/build.mts +1 -1
- package/recipes/dock-leveler/models/default.json +1 -1
- package/recipes/dock-leveler/recipe.json +1 -2
- package/recipes/double-hinged-door/build.mts +2 -2
- package/recipes/double-hinged-door/models/default.json +1 -1
- package/recipes/double-hinged-door/recipe.json +3 -6
- package/recipes/drawer-stack/build.mts +1 -1
- package/recipes/drawer-stack/models/default.json +1 -1
- package/recipes/drawer-stack/models/drawers=2.json +1 -1
- package/recipes/drawer-stack/models/drawers=3.json +1 -1
- package/recipes/drawer-stack/models/drawers=4.json +1 -1
- package/recipes/drawer-stack/recipe.json +9 -18
- package/recipes/drip-tray/build.mts +1 -1
- package/recipes/drip-tray/models/default.json +1 -1
- package/recipes/drip-tray/recipe.json +1 -2
- package/recipes/duct-fan/build.mts +2 -2
- package/recipes/duct-fan/models/default.json +1 -1
- package/recipes/duct-fan/recipe.json +2 -4
- package/recipes/emergency-stop/build.mts +2 -2
- package/recipes/emergency-stop/models/default.json +1 -1
- package/recipes/emergency-stop/recipe.json +2 -4
- package/recipes/end-covers/build.mts +2 -2
- package/recipes/end-covers/models/default.json +1 -1
- package/recipes/end-covers/recipe.json +2 -4
- package/recipes/ffu-row/build.mts +1 -1
- package/recipes/ffu-row/models/default.json +1 -1
- package/recipes/ffu-row/recipe.json +1 -2
- package/recipes/fire-extinguisher/build.mts +2 -2
- package/recipes/fire-extinguisher/models/default.json +1 -1
- package/recipes/fire-extinguisher/recipe.json +2 -4
- package/recipes/first-aid-box/build.mts +2 -2
- package/recipes/first-aid-box/models/default.json +1 -1
- package/recipes/first-aid-box/recipe.json +2 -4
- package/recipes/floor-zone/build.mts +2 -2
- package/recipes/floor-zone/models/default.json +1 -1
- package/recipes/floor-zone/recipe.json +4 -8
- package/recipes/folding-door/build.mts +3 -3
- package/recipes/folding-door/models/default.json +1 -1
- package/recipes/folding-door/recipe.json +3 -6
- package/recipes/fork/build.mts +1 -1
- package/recipes/fork/models/default.json +1 -1
- package/recipes/fork/recipe.json +2 -4
- package/recipes/gantry-frame/build.mts +2 -2
- package/recipes/gantry-frame/models/default.json +1 -1
- package/recipes/gantry-frame/recipe.json +3 -6
- package/recipes/gripper-2f/build.mts +2 -2
- package/recipes/gripper-2f/models/default.json +1 -1
- package/recipes/gripper-2f/recipe.json +3 -6
- package/recipes/guard-cover/build.mts +1 -1
- package/recipes/guard-cover/models/default.json +1 -1
- package/recipes/guard-cover/recipe.json +1 -2
- package/recipes/handrail/build.mts +2 -2
- package/recipes/handrail/models/default.json +1 -1
- package/recipes/handrail/recipe.json +2 -4
- package/recipes/hatch/build.mts +2 -2
- package/recipes/hatch/models/default.json +1 -1
- package/recipes/hatch/recipe.json +2 -4
- package/recipes/hinged-door/build.mts +2 -2
- package/recipes/hinged-door/models/default.json +1 -1
- package/recipes/hinged-door/models/hinge=left.json +1 -1
- package/recipes/hinged-door/models/hinge=right.json +1 -1
- package/recipes/hinged-door/recipe.json +3 -6
- package/recipes/hmi-monitor/build.mts +2 -2
- package/recipes/hmi-monitor/models/default.json +1 -1
- package/recipes/hmi-monitor/recipe.json +2 -4
- package/recipes/hopper/build.mts +2 -2
- package/recipes/hopper/models/default.json +1 -1
- package/recipes/hopper/recipe.json +2 -4
- package/recipes/interlock-switch/build.mts +1 -1
- package/recipes/interlock-switch/models/default.json +1 -1
- package/recipes/interlock-switch/recipe.json +1 -2
- package/recipes/junction-box/build.mts +1 -1
- package/recipes/junction-box/models/default.json +1 -1
- package/recipes/junction-box/recipe.json +1 -2
- package/recipes/ladder/build.mts +2 -2
- package/recipes/ladder/models/default.json +1 -1
- package/recipes/ladder/recipe.json +3 -6
- package/recipes/legs-four/build.mts +1 -1
- package/recipes/legs-four/models/default.json +1 -1
- package/recipes/legs-four/recipe.json +4 -8
- package/recipes/leveling-feet/build.mts +1 -1
- package/recipes/leveling-feet/models/default.json +1 -1
- package/recipes/leveling-feet/recipe.json +4 -8
- package/recipes/lift-updown/build.mts +1 -1
- package/recipes/lift-updown/models/default.json +1 -1
- package/recipes/lift-updown/recipe.json +1 -2
- package/recipes/light-curtain/build.mts +1 -1
- package/recipes/light-curtain/models/default.json +1 -1
- package/recipes/light-curtain/recipe.json +2 -4
- package/recipes/limit-switch/build.mts +2 -2
- package/recipes/limit-switch/models/default.json +1 -1
- package/recipes/limit-switch/recipe.json +2 -4
- package/recipes/linear-guide/build.mts +2 -2
- package/recipes/linear-guide/models/default.json +1 -1
- package/recipes/linear-guide/recipe.json +2 -4
- package/recipes/locker-row/build.mts +1 -1
- package/recipes/locker-row/models/default.json +1 -1
- package/recipes/locker-row/recipe.json +1 -2
- package/recipes/motor-box/build.mts +1 -1
- package/recipes/motor-box/models/default.json +1 -1
- package/recipes/motor-box/recipe.json +1 -2
- package/recipes/observation-window/build.mts +2 -2
- package/recipes/observation-window/models/default.json +1 -1
- package/recipes/observation-window/recipe.json +2 -4
- package/recipes/operator-panel/build.mts +2 -2
- package/recipes/operator-panel/models/buttons=2.json +1 -1
- package/recipes/operator-panel/models/buttons=3.json +1 -1
- package/recipes/operator-panel/models/buttons=4.json +1 -1
- package/recipes/operator-panel/models/buttons=5.json +1 -1
- package/recipes/operator-panel/models/default.json +1 -1
- package/recipes/operator-panel/recipe.json +5 -10
- package/recipes/pallet/build.mts +2 -2
- package/recipes/pallet/models/default.json +1 -1
- package/recipes/pallet/recipe.json +4 -8
- package/recipes/partition-wall/build.mts +2 -2
- package/recipes/partition-wall/models/default.json +1 -1
- package/recipes/partition-wall/recipe.json +3 -6
- package/recipes/pass-box/build.mts +2 -2
- package/recipes/pass-box/models/default.json +1 -1
- package/recipes/pass-box/recipe.json +2 -4
- package/recipes/peg-board/build.mts +2 -2
- package/recipes/peg-board/models/default.json +1 -1
- package/recipes/peg-board/recipe.json +2 -4
- package/recipes/photo-sensor-pair/build.mts +1 -1
- package/recipes/photo-sensor-pair/models/default.json +1 -1
- package/recipes/photo-sensor-pair/recipe.json +2 -4
- package/recipes/pipe-run/build.mts +1 -1
- package/recipes/pipe-run/models/default.json +1 -1
- package/recipes/pipe-run/recipe.json +4 -7
- package/recipes/platform/build.mts +2 -2
- package/recipes/platform/models/default.json +1 -1
- package/recipes/platform/recipe.json +5 -10
- package/recipes/power-box/build.mts +1 -1
- package/recipes/power-box/models/default.json +1 -1
- package/recipes/power-box/recipe.json +1 -2
- package/recipes/pressure-gauge/build.mts +1 -1
- package/recipes/pressure-gauge/models/default.json +1 -1
- package/recipes/pressure-gauge/recipe.json +1 -2
- package/recipes/pull-cord/build.mts +1 -1
- package/recipes/pull-cord/models/default.json +1 -1
- package/recipes/pull-cord/recipe.json +1 -2
- package/recipes/pump/build.mts +2 -2
- package/recipes/pump/models/default.json +1 -1
- package/recipes/pump/recipe.json +2 -4
- package/recipes/pusher/build.mts +1 -1
- package/recipes/pusher/models/default.json +1 -1
- package/recipes/pusher/recipe.json +1 -2
- package/recipes/robot-plinth/build.mts +2 -2
- package/recipes/robot-plinth/models/default.json +1 -1
- package/recipes/robot-plinth/recipe.json +2 -4
- package/recipes/roll-up-shutter/build.mts +2 -2
- package/recipes/roll-up-shutter/models/default.json +1 -1
- package/recipes/roll-up-shutter/recipe.json +2 -4
- package/recipes/roller-row/build.mts +1 -1
- package/recipes/roller-row/models/default.json +1 -1
- package/recipes/roller-row/recipe.json +5 -7
- package/recipes/room-shell/build.mts +3 -3
- package/recipes/room-shell/models/default.json +1 -1
- package/recipes/room-shell/recipe.json +5 -10
- package/recipes/rotating-beacon/build.mts +3 -3
- package/recipes/rotating-beacon/models/default.json +1 -1
- package/recipes/rotating-beacon/recipe.json +3 -6
- package/recipes/safety-fence/build.mts +2 -2
- package/recipes/safety-fence/models/default.json +1 -1
- package/recipes/safety-fence/recipe.json +2 -4
- package/recipes/safety-mat/build.mts +1 -1
- package/recipes/safety-mat/models/default.json +1 -1
- package/recipes/safety-mat/recipe.json +1 -2
- package/recipes/safety-sign-stand/build.mts +3 -3
- package/recipes/safety-sign-stand/models/default.json +1 -1
- package/recipes/safety-sign-stand/recipe.json +3 -6
- package/recipes/scanner-mount/build.mts +3 -3
- package/recipes/scanner-mount/models/default.json +1 -1
- package/recipes/scanner-mount/recipe.json +3 -6
- package/recipes/selector-switch/build.mts +2 -2
- package/recipes/selector-switch/models/default.json +1 -1
- package/recipes/selector-switch/recipe.json +2 -4
- package/recipes/shelf-tiers/build.mts +1 -1
- package/recipes/shelf-tiers/models/default.json +1 -1
- package/recipes/shelf-tiers/models/tiers=2.json +1 -1
- package/recipes/shelf-tiers/models/tiers=3.json +1 -1
- package/recipes/shelf-tiers/models/tiers=4.json +1 -1
- package/recipes/shelf-tiers/models/tiers=5.json +1 -1
- package/recipes/shelf-tiers/recipe.json +4 -8
- package/recipes/side-guides/build.mts +1 -1
- package/recipes/side-guides/models/default.json +1 -1
- package/recipes/side-guides/recipe.json +2 -4
- package/recipes/sign-board/build.mts +1 -1
- package/recipes/sign-board/models/default.json +1 -1
- package/recipes/sign-board/recipe.json +1 -2
- package/recipes/signal-tower-3/build.mts +2 -2
- package/recipes/signal-tower-3/models/default.json +1 -1
- package/recipes/signal-tower-3/recipe.json +4 -8
- package/recipes/sliding-door/build.mts +4 -4
- package/recipes/sliding-door/models/default.json +1 -1
- package/recipes/sliding-door/models/leaves=1,lamp=false.json +1 -1
- package/recipes/sliding-door/models/leaves=1,lamp=true.json +1 -1
- package/recipes/sliding-door/models/leaves=2,lamp=false.json +1 -1
- package/recipes/sliding-door/models/leaves=2,lamp=true.json +1 -1
- package/recipes/sliding-door/recipe.json +5 -10
- package/recipes/stairs/build.mts +1 -1
- package/recipes/stairs/models/default.json +1 -1
- package/recipes/stairs/recipe.json +1 -2
- package/recipes/status-lamp/build.mts +3 -3
- package/recipes/status-lamp/models/default.json +1 -1
- package/recipes/status-lamp/recipe.json +3 -6
- package/recipes/stopper/build.mts +1 -1
- package/recipes/stopper/models/default.json +1 -1
- package/recipes/stopper/recipe.json +1 -2
- package/recipes/suction-pads/build.mts +1 -1
- package/recipes/suction-pads/models/default.json +1 -1
- package/recipes/suction-pads/recipe.json +1 -2
- package/recipes/tank/build.mts +1 -1
- package/recipes/tank/models/default.json +1 -1
- package/recipes/tank/recipe.json +1 -2
- package/recipes/telescopic-arm/build.mts +2 -2
- package/recipes/telescopic-arm/models/default.json +1 -1
- package/recipes/telescopic-arm/recipe.json +2 -4
- package/recipes/toe-board/build.mts +1 -1
- package/recipes/toe-board/models/default.json +1 -1
- package/recipes/toe-board/recipe.json +1 -2
- package/recipes/tote/build.mts +1 -1
- package/recipes/tote/models/default.json +1 -1
- package/recipes/tote/recipe.json +1 -2
- package/recipes/traffic-cones/build.mts +2 -2
- package/recipes/traffic-cones/models/default.json +1 -1
- package/recipes/traffic-cones/recipe.json +2 -4
- package/recipes/transfer-belts/build.mts +1 -1
- package/recipes/transfer-belts/models/default.json +1 -1
- package/recipes/transfer-belts/recipe.json +2 -4
- package/recipes/tray-stack/build.mts +1 -1
- package/recipes/tray-stack/models/default.json +1 -1
- package/recipes/tray-stack/models/trays=3.json +1 -1
- package/recipes/tray-stack/models/trays=4.json +1 -1
- package/recipes/tray-stack/models/trays=5.json +1 -1
- package/recipes/tray-stack/recipe.json +5 -10
- package/recipes/trough/build.mts +1 -1
- package/recipes/trough/models/default.json +1 -1
- package/recipes/trough/recipe.json +1 -2
- package/recipes/turntable/build.mts +2 -2
- package/recipes/turntable/models/default.json +1 -1
- package/recipes/turntable/recipe.json +2 -4
- package/recipes/valve-handle/build.mts +3 -3
- package/recipes/valve-handle/models/default.json +1 -1
- package/recipes/valve-handle/recipe.json +3 -6
- package/recipes/waste-bin/build.mts +1 -1
- package/recipes/waste-bin/models/default.json +1 -1
- package/recipes/waste-bin/recipe.json +1 -2
- package/recipes/work-light/build.mts +3 -3
- package/recipes/work-light/models/default.json +1 -1
- package/recipes/work-light/recipe.json +3 -6
- package/recipes/workbench-top/build.mts +1 -1
- package/recipes/workbench-top/models/default.json +1 -1
- package/recipes/workbench-top/recipe.json +1 -2
- package/server/service/figure/figure-category-db.test.ts +1 -1
- package/server/service/figure/figure-context.test.ts +6 -6
- package/server/service/figure/figure-context.ts +11 -4
- package/server/service/figure/figure-deprecation-db.test.ts +1 -1
- package/server/service/figure/figure-format.test.ts +3 -3
- package/server/service/figure/figure-llm-smoke.test.ts +2 -2
- package/server/service/figure/figure-namespace-db.test.ts +1 -1
- package/server/service/figure/figure-propose-clips.test.ts +1 -1
- package/server/service/figure/figure-propose-steps.test.ts +5 -5
- package/server/service/figure/figure-propose-steps.ts +3 -3
- package/server/service/figure/figure-public-db.test.ts +1 -1
- package/server/service/figure/figure-release-check.test.ts +1 -1
- package/server/service/figure/figure-release-record-db.test.ts +1 -1
- package/server/service/figure/figure-tools.test.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/figure-service",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.201",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"@things-factory:registry": "https://registry.npmjs.org"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"test:templates": "node --test scripts/templates.test.mts"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@hatiolab/figure-model": "^0.
|
|
28
|
+
"@hatiolab/figure-model": "^0.9.3",
|
|
29
29
|
"@operato/typeorm-history": "^10.0.0",
|
|
30
30
|
"@things-factory/ai-client-base": "^10.1.198",
|
|
31
31
|
"@things-factory/attachment-base": "^10.1.198",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"jszip": "^3.10.1",
|
|
39
39
|
"koa-router": "^7.4.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "6d7a1ae96c2e21bc95b9913b0b32f9ad44c7f87a"
|
|
42
42
|
}
|
package/recipes/_lib/model.mts
CHANGED
|
@@ -12,7 +12,7 @@ export function host(size: { x: number; y: number; z: number }, name = 'Template
|
|
|
12
12
|
const asset = addFigureBox(createFigureAsset(name), { id: 'host', size, position: { x: 0, y: size.y / 2, z: 0 } })
|
|
13
13
|
/* The host is only where the template goes: drawn pale, so the template's own parts stand out in the model and its picture. */
|
|
14
14
|
const pale = editFigurePart(asset, { kind: 'set-material', target: 'host', material: { token: 'palette.host' }, palette: { 'palette.host': '#d9dde2' } } as FigurePartEdit)
|
|
15
|
-
return applyFigureAuthoring(pale, { kind: 'attach', part: 'host',
|
|
15
|
+
return applyFigureAuthoring(pale, { kind: 'attach', part: 'host', to: { plane: 'mounting-plane' }, ...(gap ? { gap } : {}) })
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
/** A small builder over the modeller's commands: each call one command, as a person's step would be. */
|
|
@@ -36,9 +36,9 @@ export class Model {
|
|
|
36
36
|
this.asset = editFigurePart(this.asset, edit)
|
|
37
37
|
return this
|
|
38
38
|
}
|
|
39
|
-
/**
|
|
40
|
-
on(part: string,
|
|
41
|
-
return this.do({ kind: 'attach', part,
|
|
39
|
+
/** Set a part on another's (or the host's) face, as it stands (ADR-0140 3.2); `align` places it across that face. */
|
|
40
|
+
on(part: string, to: string, toFace: string, align?: Record<string, unknown>, gap?: number): this {
|
|
41
|
+
return this.do({ kind: 'attach', part, to: { part: to, face: toFace }, ...(align ? { align } : {}), ...(gap ? { gap } : {}) } as FigureAuthoringAction)
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* A part's colour. The palette is the figure's, shared by every template put into it: a token named for its value
|
|
@@ -4,10 +4,10 @@ import { host, Model } from '../_lib/model.mts'
|
|
|
4
4
|
export default function build() {
|
|
5
5
|
const m = new Model(host({ x: 3000, y: 700, z: 800 }, 'TPL_AIR_CYLINDER'))
|
|
6
6
|
m.add({ id: 'body', kind: 'cylinder', dimensions: { radius: 40, length: 300 } } as never)
|
|
7
|
-
.on('body', '
|
|
7
|
+
.on('body', 'host', 'top')
|
|
8
8
|
.colour('body', 'palette.rail', '#9aa3ab')
|
|
9
9
|
.add({ id: 'rod', kind: 'cylinder', dimensions: { radius: 12, length: 250 } } as never)
|
|
10
|
-
.on('rod', '
|
|
10
|
+
.on('rod', 'body', 'top')
|
|
11
11
|
.colour('rod', 'palette.rod', '#d0d4d8')
|
|
12
12
|
.moves('rod', { type: 'prismatic', axis: 'Y', lower: 0, upper: 200, state: 'extend' })
|
|
13
13
|
return m.asset
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"figure-asset-1","name":"TPL_AIR_CYLINDER","document":{"version":"figure-prototype-1","model":{"version":"r3-spatial-1","inputs":[{"id":"host.size.x","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.y","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.z","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"body.dimension.radius","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"body.dimension.length","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"rod.dimension.radius","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"rod.dimension.length","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"extend","unit":"mm","min":0,"max":200,"role":"state"}],"constants":[{"id":"host.k.centre","unit":"ratio","value":-0.5},{"id":"d.mm.0","unit":"mm","value":0},{"id":"
|
|
1
|
+
{"version":"figure-asset-1","name":"TPL_AIR_CYLINDER","document":{"version":"figure-prototype-1","model":{"version":"r3-spatial-1","inputs":[{"id":"host.size.x","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.y","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.z","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"body.dimension.radius","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"body.dimension.length","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"rod.dimension.radius","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"rod.dimension.length","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"extend","unit":"mm","min":0,"max":200,"role":"state"}],"constants":[{"id":"host.k.centre","unit":"ratio","value":-0.5},{"id":"d.mm.0","unit":"mm","value":0},{"id":"k.ratio.0_5","unit":"ratio","value":0.5},{"id":"a.deg.0","unit":"deg","value":0},{"id":"body.k.centre","unit":"ratio","value":-0.5},{"id":"rod.k.centre","unit":"ratio","value":-0.5},{"id":"axis.ratio.0","unit":"ratio","value":0},{"id":"axis.ratio.1","unit":"ratio","value":1}],"nodes":[{"id":"host.start","op":"mul@1","args":["host.size.y","host.k.centre"],"outputs":{"value":"host.start.value"}},{"id":"host.shape","op":"extrude@1","args":["host.start.value","host.size.y","host.size.x","host.size.z"],"outputs":{"shape":"host.shapeValue"},"params":{"frame":"host.local","axis":"y","section":"rectangle"}},{"id":"host.pose","op":"rigid@1","args":["d.mm.0","host.on.plane.pose.y.t0.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"host.poseValue"},"params":{"from":"host.local","to":"host.seat"}},{"id":"host","op":"place@1","args":["host.shapeValue","host.chain.value"],"outputs":{"placed":"host.placed"}},{"id":"body.shape","op":"extrude@1","args":["body.start.value","body.dimension.length","body.dimension.radius","body.dimension.radius"],"outputs":{"shape":"body.shapeValue"},"params":{"frame":"body.local","axis":"y","section":"ellipse"}},{"id":"body.pose","op":"rigid@1","args":["d.mm.0","body.on.host.pose.y.t0.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"body.poseValue"},"params":{"from":"body.local","to":"body.seat"}},{"id":"body","op":"place@1","args":["body.shapeValue","body.world.value"],"outputs":{"placed":"body.placed"}},{"id":"body.start","op":"mul@1","args":["body.dimension.length","body.k.centre"],"outputs":{"value":"body.start.value"}},{"id":"rod.shape","op":"extrude@1","args":["rod.start.value","rod.dimension.length","rod.dimension.radius","rod.dimension.radius"],"outputs":{"shape":"rod.shapeValue"},"params":{"frame":"rod.local","axis":"y","section":"ellipse"}},{"id":"rod.pose","op":"rigid@1","args":["d.mm.0","rod.on.body.pose.y.t0.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"rod.poseValue"},"params":{"from":"rod.local","to":"rod.seat"}},{"id":"rod","op":"place@1","args":["rod.shapeValue","rod.world.value"],"outputs":{"placed":"rod.placed"}},{"id":"rod.start","op":"mul@1","args":["rod.dimension.length","rod.k.centre"],"outputs":{"value":"rod.start.value"}},{"id":"host.on.plane.pose.y.t0","op":"mul@1","args":["host.size.y","k.ratio.0_5"],"outputs":{"value":"host.on.plane.pose.y.t0.value"}},{"id":"host.seat.rigid","op":"rigid@1","args":["d.mm.0","d.mm.0","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"host.seat.value"},"params":{"from":"host.seat","to":"asset"}},{"id":"host.chain","op":"compose@1","args":["host.seat.value","host.poseValue"],"outputs":{"pose":"host.chain.value"}},{"id":"body.on.host.seat.y.t0","op":"mul@1","args":["host.size.y","k.ratio.0_5"],"outputs":{"value":"body.on.host.seat.y.t0.value"}},{"id":"body.on.host.pose.y.t0","op":"mul@1","args":["body.dimension.length","k.ratio.0_5"],"outputs":{"value":"body.on.host.pose.y.t0.value"}},{"id":"body.seat.rigid","op":"rigid@1","args":["d.mm.0","body.on.host.seat.y.t0.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"body.seat.value"},"params":{"from":"body.seat","to":"host.local"}},{"id":"body.chain","op":"compose@1","args":["body.seat.value","body.poseValue"],"outputs":{"pose":"body.chain.value"}},{"id":"body.world","op":"compose@1","args":["host.chain.value","body.chain.value"],"outputs":{"pose":"body.world.value"}},{"id":"rod.on.body.seat.y.t0","op":"mul@1","args":["body.dimension.length","k.ratio.0_5"],"outputs":{"value":"rod.on.body.seat.y.t0.value"}},{"id":"rod.on.body.pose.y.t0","op":"mul@1","args":["rod.dimension.length","k.ratio.0_5"],"outputs":{"value":"rod.on.body.pose.y.t0.value"}},{"id":"rod.seat.rigid","op":"rigid@1","args":["d.mm.0","rod.on.body.seat.y.t0.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"rod.seat.value"},"params":{"from":"rod.joint","to":"body.local"}},{"id":"rod.chain","op":"compose@1","args":["rod.seat.value","rod.turned.value"],"outputs":{"pose":"rod.chain.value"}},{"id":"rod.world","op":"compose@1","args":["body.world.value","rod.chain.value"],"outputs":{"pose":"rod.world.value"}},{"id":"rod.motion","op":"axis-slide@1","args":["axis.ratio.0","axis.ratio.1","axis.ratio.0","extend"],"outputs":{"pose":"rod.motion.value"},"params":{"from":"rod.seat","to":"rod.joint"}},{"id":"rod.turned","op":"compose@1","args":["rod.motion.value","rod.poseValue"],"outputs":{"pose":"rod.turned.value"}}]},"capabilities":{"version":"r3-capability-3","assetFrame":"asset","bindings":[]}},"designInputs":{"host.size.x":3000,"host.size.y":700,"host.size.z":800,"body.dimension.radius":40,"body.dimension.length":300,"rod.dimension.radius":12,"rod.dimension.length":250},"stateDefaults":{"extend":0},"palette":{"palette.primary":"#477b9e","palette.host":"#d9dde2","palette.tpl-9aa3ab":"#9aa3ab","palette.tpl-d0d4d8":"#d0d4d8"},"appearance":[{"target":"host","material":{"token":"palette.host"}},{"target":"body","material":{"token":"palette.tpl-9aa3ab"},"segments":12},{"target":"rod","material":{"token":"palette.tpl-d0d4d8"},"segments":12}],"joints":[{"id":"host","type":"fixed","body0":{"plane":"mounting-plane"},"body1":{"part":"host"},"origin":{}},{"id":"body","type":"fixed","body0":{"part":"host","face":"top"},"body1":{"part":"body"},"origin":{}},{"id":"rod","type":"prismatic","body0":{"part":"body","face":"top"},"body1":{"part":"rod"},"origin":{},"axis":"Y","lowerLimit":0,"upperLimit":200,"state":{"id":"extend"}}]}
|
|
@@ -65,8 +65,7 @@
|
|
|
65
65
|
"face": "top"
|
|
66
66
|
},
|
|
67
67
|
"body1": {
|
|
68
|
-
"part": "{id}-body"
|
|
69
|
-
"face": "bottom"
|
|
68
|
+
"part": "{id}-body"
|
|
70
69
|
},
|
|
71
70
|
"origin": {}
|
|
72
71
|
}
|
|
@@ -81,8 +80,7 @@
|
|
|
81
80
|
"face": "top"
|
|
82
81
|
},
|
|
83
82
|
"body1": {
|
|
84
|
-
"part": "{id}-rod"
|
|
85
|
-
"face": "bottom"
|
|
83
|
+
"part": "{id}-rod"
|
|
86
84
|
},
|
|
87
85
|
"origin": {},
|
|
88
86
|
"axis": "Y",
|
|
@@ -4,10 +4,10 @@ import { host, Model } from '../_lib/model.mts'
|
|
|
4
4
|
export default function build() {
|
|
5
5
|
const m = new Model(host({ x: 4000, y: 3000, z: 6000 }, 'TPL_AIR_SHOWER'))
|
|
6
6
|
m.box('booth', 1200, 2300, 1000)
|
|
7
|
-
.on('booth', '
|
|
7
|
+
.on('booth', 'host', 'front', { y: 'min' })
|
|
8
8
|
.colour('booth', 'booth', '#7f93a6')
|
|
9
9
|
.box('door', 800, 2000, 30)
|
|
10
|
-
.on('door', '
|
|
10
|
+
.on('door', 'booth', 'front', { y: 'min' })
|
|
11
11
|
.colour('door', 'glass-door', '#7fb8d6')
|
|
12
12
|
.moves('door', { type: 'revolute', axis: 'Y', lower: -100, upper: 0, state: 'open' })
|
|
13
13
|
return m.asset
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"figure-asset-1","name":"TPL_AIR_SHOWER","document":{"version":"figure-prototype-1","model":{"version":"r3-spatial-1","inputs":[{"id":"host.size.x","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.y","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.z","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"booth.dimension.width","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"booth.dimension.height","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"booth.dimension.depth","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"door.dimension.width","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"door.dimension.height","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"door.dimension.depth","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"open","unit":"deg","min":-100,"max":0,"role":"state"}],"constants":[{"id":"host.k.centre","unit":"ratio","value":-0.5},{"id":"d.mm.0","unit":"mm","value":0},{"id":"
|
|
1
|
+
{"version":"figure-asset-1","name":"TPL_AIR_SHOWER","document":{"version":"figure-prototype-1","model":{"version":"r3-spatial-1","inputs":[{"id":"host.size.x","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.y","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.z","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"booth.dimension.width","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"booth.dimension.height","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"booth.dimension.depth","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"door.dimension.width","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"door.dimension.height","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"door.dimension.depth","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"open","unit":"deg","min":-100,"max":0,"role":"state"}],"constants":[{"id":"host.k.centre","unit":"ratio","value":-0.5},{"id":"d.mm.0","unit":"mm","value":0},{"id":"k.ratio.0_5","unit":"ratio","value":0.5},{"id":"a.deg.0","unit":"deg","value":0},{"id":"booth.k.centre","unit":"ratio","value":-0.5},{"id":"door.k.centre","unit":"ratio","value":-0.5},{"id":"axis.ratio.0","unit":"ratio","value":0},{"id":"axis.ratio.1","unit":"ratio","value":1}],"nodes":[{"id":"host.start","op":"mul@1","args":["host.size.y","host.k.centre"],"outputs":{"value":"host.start.value"}},{"id":"host.shape","op":"extrude@1","args":["host.start.value","host.size.y","host.size.x","host.size.z"],"outputs":{"shape":"host.shapeValue"},"params":{"frame":"host.local","axis":"y","section":"rectangle"}},{"id":"host.pose","op":"rigid@1","args":["d.mm.0","host.on.plane.pose.y.t0.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"host.poseValue"},"params":{"from":"host.local","to":"host.seat"}},{"id":"host","op":"place@1","args":["host.shapeValue","host.chain.value"],"outputs":{"placed":"host.placed"}},{"id":"booth.shape","op":"extrude@1","args":["booth.start.value","booth.dimension.height","booth.dimension.width","booth.dimension.depth"],"outputs":{"shape":"booth.shapeValue"},"params":{"frame":"booth.local","axis":"y","section":"rectangle"}},{"id":"booth.pose","op":"rigid@1","args":["d.mm.0","booth.on.host.pose.y.t0.value","booth.on.host.pose.z.t0.value","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"booth.poseValue"},"params":{"from":"booth.local","to":"booth.seat"}},{"id":"booth","op":"place@1","args":["booth.shapeValue","booth.world.value"],"outputs":{"placed":"booth.placed"}},{"id":"booth.start","op":"mul@1","args":["booth.dimension.height","booth.k.centre"],"outputs":{"value":"booth.start.value"}},{"id":"door.shape","op":"extrude@1","args":["door.start.value","door.dimension.height","door.dimension.width","door.dimension.depth"],"outputs":{"shape":"door.shapeValue"},"params":{"frame":"door.local","axis":"y","section":"rectangle"}},{"id":"door.pose","op":"rigid@1","args":["d.mm.0","door.on.booth.pose.y.t0.value","door.on.booth.pose.z.t0.value","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"door.poseValue"},"params":{"from":"door.local","to":"door.seat"}},{"id":"door","op":"place@1","args":["door.shapeValue","door.world.value"],"outputs":{"placed":"door.placed"}},{"id":"door.start","op":"mul@1","args":["door.dimension.height","door.k.centre"],"outputs":{"value":"door.start.value"}},{"id":"host.on.plane.pose.y.t0","op":"mul@1","args":["host.size.y","k.ratio.0_5"],"outputs":{"value":"host.on.plane.pose.y.t0.value"}},{"id":"host.seat.rigid","op":"rigid@1","args":["d.mm.0","d.mm.0","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"host.seat.value"},"params":{"from":"host.seat","to":"asset"}},{"id":"host.chain","op":"compose@1","args":["host.seat.value","host.poseValue"],"outputs":{"pose":"host.chain.value"}},{"id":"booth.on.host.seat.y.t0","op":"mul@1","args":["host.size.y","host.k.centre"],"outputs":{"value":"booth.on.host.seat.y.t0.value"}},{"id":"booth.on.host.seat.z.t0","op":"mul@1","args":["host.size.z","k.ratio.0_5"],"outputs":{"value":"booth.on.host.seat.z.t0.value"}},{"id":"booth.on.host.pose.y.t0","op":"mul@1","args":["booth.dimension.height","k.ratio.0_5"],"outputs":{"value":"booth.on.host.pose.y.t0.value"}},{"id":"booth.on.host.pose.z.t0","op":"mul@1","args":["booth.dimension.depth","k.ratio.0_5"],"outputs":{"value":"booth.on.host.pose.z.t0.value"}},{"id":"booth.seat.rigid","op":"rigid@1","args":["d.mm.0","booth.on.host.seat.y.t0.value","booth.on.host.seat.z.t0.value","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"booth.seat.value"},"params":{"from":"booth.seat","to":"host.local"}},{"id":"booth.chain","op":"compose@1","args":["booth.seat.value","booth.poseValue"],"outputs":{"pose":"booth.chain.value"}},{"id":"booth.world","op":"compose@1","args":["host.chain.value","booth.chain.value"],"outputs":{"pose":"booth.world.value"}},{"id":"door.on.booth.seat.y.t0","op":"mul@1","args":["booth.dimension.height","host.k.centre"],"outputs":{"value":"door.on.booth.seat.y.t0.value"}},{"id":"door.on.booth.seat.z.t0","op":"mul@1","args":["booth.dimension.depth","k.ratio.0_5"],"outputs":{"value":"door.on.booth.seat.z.t0.value"}},{"id":"door.on.booth.pose.y.t0","op":"mul@1","args":["door.dimension.height","k.ratio.0_5"],"outputs":{"value":"door.on.booth.pose.y.t0.value"}},{"id":"door.on.booth.pose.z.t0","op":"mul@1","args":["door.dimension.depth","k.ratio.0_5"],"outputs":{"value":"door.on.booth.pose.z.t0.value"}},{"id":"door.seat.rigid","op":"rigid@1","args":["d.mm.0","door.on.booth.seat.y.t0.value","door.on.booth.seat.z.t0.value","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"door.seat.value"},"params":{"from":"door.joint","to":"booth.local"}},{"id":"door.chain","op":"compose@1","args":["door.seat.value","door.turned.value"],"outputs":{"pose":"door.chain.value"}},{"id":"door.world","op":"compose@1","args":["booth.world.value","door.chain.value"],"outputs":{"pose":"door.world.value"}},{"id":"door.motion","op":"axis-turn@1","args":["axis.ratio.0","axis.ratio.1","axis.ratio.0","open"],"outputs":{"pose":"door.motion.value"},"params":{"from":"door.seat","to":"door.joint"}},{"id":"door.turned","op":"compose@1","args":["door.motion.value","door.poseValue"],"outputs":{"pose":"door.turned.value"}}]},"capabilities":{"version":"r3-capability-3","assetFrame":"asset","bindings":[]}},"designInputs":{"host.size.x":4000,"host.size.y":3000,"host.size.z":6000,"booth.dimension.width":1200,"booth.dimension.height":2300,"booth.dimension.depth":1000,"door.dimension.width":800,"door.dimension.height":2000,"door.dimension.depth":30},"stateDefaults":{"open":0},"palette":{"palette.primary":"#477b9e","palette.host":"#d9dde2","palette.tpl-7f93a6":"#7f93a6","palette.tpl-7fb8d6":"#7fb8d6"},"appearance":[{"target":"host","material":{"token":"palette.host"}},{"target":"booth","material":{"token":"palette.tpl-7f93a6"}},{"target":"door","material":{"token":"palette.tpl-7fb8d6"}}],"joints":[{"id":"host","type":"fixed","body0":{"plane":"mounting-plane"},"body1":{"part":"host"},"origin":{}},{"id":"booth","type":"fixed","body0":{"part":"host","face":"front"},"body1":{"part":"booth"},"origin":{"align":{"y":"min"}}},{"id":"door","type":"revolute","body0":{"part":"booth","face":"front"},"body1":{"part":"door"},"origin":{"align":{"y":"min"}},"axis":"Y","lowerLimit":-100,"upperLimit":0,"state":{"id":"open"}}]}
|
|
@@ -51,8 +51,7 @@
|
|
|
51
51
|
"face": "front"
|
|
52
52
|
},
|
|
53
53
|
"body1": {
|
|
54
|
-
"part": "{id}-booth"
|
|
55
|
-
"face": "back"
|
|
54
|
+
"part": "{id}-booth"
|
|
56
55
|
},
|
|
57
56
|
"origin": {
|
|
58
57
|
"align": {
|
|
@@ -71,8 +70,7 @@
|
|
|
71
70
|
"face": "front"
|
|
72
71
|
},
|
|
73
72
|
"body1": {
|
|
74
|
-
"part": "{id}-door"
|
|
75
|
-
"face": "back"
|
|
73
|
+
"part": "{id}-door"
|
|
76
74
|
},
|
|
77
75
|
"origin": {
|
|
78
76
|
"align": {
|
|
@@ -4,7 +4,7 @@ import { host, Model } from '../_lib/model.mts'
|
|
|
4
4
|
export default function build() {
|
|
5
5
|
const m = new Model(host({ x: 300, y: 1000, z: 300 }, 'TPL_BARRIER_GATE'))
|
|
6
6
|
m.box('arm', 3000, 80, 60)
|
|
7
|
-
.on('arm', '
|
|
7
|
+
.on('arm', 'host', 'top', { x: 'min' })
|
|
8
8
|
.colour('arm', 'palette.arm', '#d9534f')
|
|
9
9
|
.moves('arm', { type: 'revolute', axis: 'Z', lower: 0, upper: 90, state: 'raise' })
|
|
10
10
|
return m.asset
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"figure-asset-1","name":"TPL_BARRIER_GATE","document":{"version":"figure-prototype-1","model":{"version":"r3-spatial-1","inputs":[{"id":"host.size.x","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.y","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.z","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"arm.dimension.width","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"arm.dimension.height","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"arm.dimension.depth","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"raise","unit":"deg","min":0,"max":90,"role":"state"}],"constants":[{"id":"host.k.centre","unit":"ratio","value":-0.5},{"id":"d.mm.0","unit":"mm","value":0},{"id":"
|
|
1
|
+
{"version":"figure-asset-1","name":"TPL_BARRIER_GATE","document":{"version":"figure-prototype-1","model":{"version":"r3-spatial-1","inputs":[{"id":"host.size.x","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.y","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.z","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"arm.dimension.width","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"arm.dimension.height","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"arm.dimension.depth","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"raise","unit":"deg","min":0,"max":90,"role":"state"}],"constants":[{"id":"host.k.centre","unit":"ratio","value":-0.5},{"id":"d.mm.0","unit":"mm","value":0},{"id":"k.ratio.0_5","unit":"ratio","value":0.5},{"id":"a.deg.0","unit":"deg","value":0},{"id":"arm.k.centre","unit":"ratio","value":-0.5},{"id":"axis.ratio.0","unit":"ratio","value":0},{"id":"axis.ratio.1","unit":"ratio","value":1}],"nodes":[{"id":"host.start","op":"mul@1","args":["host.size.y","host.k.centre"],"outputs":{"value":"host.start.value"}},{"id":"host.shape","op":"extrude@1","args":["host.start.value","host.size.y","host.size.x","host.size.z"],"outputs":{"shape":"host.shapeValue"},"params":{"frame":"host.local","axis":"y","section":"rectangle"}},{"id":"host.pose","op":"rigid@1","args":["d.mm.0","host.on.plane.pose.y.t0.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"host.poseValue"},"params":{"from":"host.local","to":"host.seat"}},{"id":"host","op":"place@1","args":["host.shapeValue","host.chain.value"],"outputs":{"placed":"host.placed"}},{"id":"arm.shape","op":"extrude@1","args":["arm.start.value","arm.dimension.height","arm.dimension.width","arm.dimension.depth"],"outputs":{"shape":"arm.shapeValue"},"params":{"frame":"arm.local","axis":"y","section":"rectangle"}},{"id":"arm.pose","op":"rigid@1","args":["arm.on.host.pose.x.t0.value","arm.on.host.pose.y.t0.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"arm.poseValue"},"params":{"from":"arm.local","to":"arm.seat"}},{"id":"arm","op":"place@1","args":["arm.shapeValue","arm.world.value"],"outputs":{"placed":"arm.placed"}},{"id":"arm.start","op":"mul@1","args":["arm.dimension.height","arm.k.centre"],"outputs":{"value":"arm.start.value"}},{"id":"host.on.plane.pose.y.t0","op":"mul@1","args":["host.size.y","k.ratio.0_5"],"outputs":{"value":"host.on.plane.pose.y.t0.value"}},{"id":"host.seat.rigid","op":"rigid@1","args":["d.mm.0","d.mm.0","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"host.seat.value"},"params":{"from":"host.seat","to":"asset"}},{"id":"host.chain","op":"compose@1","args":["host.seat.value","host.poseValue"],"outputs":{"pose":"host.chain.value"}},{"id":"arm.on.host.seat.x.t0","op":"mul@1","args":["host.size.x","host.k.centre"],"outputs":{"value":"arm.on.host.seat.x.t0.value"}},{"id":"arm.on.host.seat.y.t0","op":"mul@1","args":["host.size.y","k.ratio.0_5"],"outputs":{"value":"arm.on.host.seat.y.t0.value"}},{"id":"arm.on.host.pose.x.t0","op":"mul@1","args":["arm.dimension.width","k.ratio.0_5"],"outputs":{"value":"arm.on.host.pose.x.t0.value"}},{"id":"arm.on.host.pose.y.t0","op":"mul@1","args":["arm.dimension.height","k.ratio.0_5"],"outputs":{"value":"arm.on.host.pose.y.t0.value"}},{"id":"arm.seat.rigid","op":"rigid@1","args":["arm.on.host.seat.x.t0.value","arm.on.host.seat.y.t0.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"arm.seat.value"},"params":{"from":"arm.joint","to":"host.local"}},{"id":"arm.chain","op":"compose@1","args":["arm.seat.value","arm.turned.value"],"outputs":{"pose":"arm.chain.value"}},{"id":"arm.world","op":"compose@1","args":["host.chain.value","arm.chain.value"],"outputs":{"pose":"arm.world.value"}},{"id":"arm.motion","op":"axis-turn@1","args":["axis.ratio.0","axis.ratio.0","axis.ratio.1","raise"],"outputs":{"pose":"arm.motion.value"},"params":{"from":"arm.seat","to":"arm.joint"}},{"id":"arm.turned","op":"compose@1","args":["arm.motion.value","arm.poseValue"],"outputs":{"pose":"arm.turned.value"}}]},"capabilities":{"version":"r3-capability-3","assetFrame":"asset","bindings":[]}},"designInputs":{"host.size.x":300,"host.size.y":1000,"host.size.z":300,"arm.dimension.width":3000,"arm.dimension.height":80,"arm.dimension.depth":60},"stateDefaults":{"raise":0},"palette":{"palette.primary":"#477b9e","palette.host":"#d9dde2","palette.tpl-d9534f":"#d9534f"},"appearance":[{"target":"host","material":{"token":"palette.host"}},{"target":"arm","material":{"token":"palette.tpl-d9534f"}}],"joints":[{"id":"host","type":"fixed","body0":{"plane":"mounting-plane"},"body1":{"part":"host"},"origin":{}},{"id":"arm","type":"revolute","body0":{"part":"host","face":"top"},"body1":{"part":"arm"},"origin":{"align":{"x":"min"}},"axis":"Z","lowerLimit":0,"upperLimit":90,"state":{"id":"raise"}}]}
|
|
@@ -4,8 +4,8 @@ import { host, Model } from '../_lib/model.mts'
|
|
|
4
4
|
export default function build() {
|
|
5
5
|
const m = new Model(host({ x: 1600, y: 1400, z: 1000 }, 'TPL_BASE_FRAME', 100))
|
|
6
6
|
for (const [b, z] of [['front', 'max'], ['back', 'min']] as const)
|
|
7
|
-
m.box(b, 1600, 100, 80).follow(b, 'x', 'host', 'x').on(b, '
|
|
7
|
+
m.box(b, 1600, 100, 80).follow(b, 'x', 'host', 'x').on(b, 'host', 'bottom', { z }).colour(b, 'frame', '#4f5d6b')
|
|
8
8
|
for (const [b, x] of [['left', 'min'], ['right', 'max']] as const)
|
|
9
|
-
m.box(b, 80, 100, 840).follow(b, 'z', 'host', 'z', 1, -160).on(b, '
|
|
9
|
+
m.box(b, 80, 100, 840).follow(b, 'z', 'host', 'z', 1, -160).on(b, 'host', 'bottom', { x }).colour(b, 'frame', '#4f5d6b')
|
|
10
10
|
return m.asset
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"figure-asset-1","name":"TPL_BASE_FRAME","document":{"version":"figure-prototype-1","model":{"version":"r3-spatial-1","inputs":[{"id":"host.size.x","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.y","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.z","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"front.dimension.height","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"front.dimension.depth","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"back.dimension.height","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"back.dimension.depth","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"left.dimension.width","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"left.dimension.height","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"right.dimension.width","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"right.dimension.height","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"}],"constants":[{"id":"host.k.centre","unit":"ratio","value":-0.5},{"id":"d.mm.0","unit":"mm","value":0},{"id":"a.deg.0","unit":"deg","value":0},{"id":"d.mm.100","unit":"mm","value":100},{"id":"k.ratio.0_5","unit":"ratio","value":0.5},{"id":"front.k.centre","unit":"ratio","value":-0.5},{"id":"k.ratio.1","unit":"ratio","value":1},{"id":"k.ratio._1","unit":"ratio","value":-1},{"id":"back.k.centre","unit":"ratio","value":-0.5},{"id":"left.k.centre","unit":"ratio","value":-0.5},{"id":"d.mm._160","unit":"mm","value":-160},{"id":"right.k.centre","unit":"ratio","value":-0.5}],"nodes":[{"id":"host.start","op":"mul@1","args":["host.size.y","host.k.centre"],"outputs":{"value":"host.start.value"}},{"id":"host.shape","op":"extrude@1","args":["host.start.value","host.size.y","host.dimension.x.value","host.dimension.z.value"],"outputs":{"shape":"host.shapeValue"},"params":{"frame":"host.local","axis":"y","section":"rectangle"}},{"id":"host.pose","op":"rigid@1","args":["d.mm.0","host.on.plane.stand.y.1.sum.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"host.poseValue"},"params":{"from":"host.local","to":"host.seat"}},{"id":"host","op":"place@1","args":["host.shapeValue","host.chain.value"],"outputs":{"placed":"host.placed"}},{"id":"front.shape","op":"extrude@1","args":["front.start.value","front.dimension.height","front.dimension.x.value","front.dimension.depth"],"outputs":{"shape":"front.shapeValue"},"params":{"frame":"front.local","axis":"y","section":"rectangle"}},{"id":"front.pose","op":"rigid@1","args":["d.mm.0","front.on.host.along.y.1.sum.value","front.on.host.own-edge.z.0.times.value","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"front.poseValue"},"params":{"from":"front.local","to":"front.seat"}},{"id":"front","op":"place@1","args":["front.shapeValue","front.world.value"],"outputs":{"placed":"front.placed"}},{"id":"front.start","op":"mul@1","args":["front.dimension.height","front.k.centre"],"outputs":{"value":"front.start.value"}},{"id":"front.dimension.x","op":"mul@1","args":["host.dimension.x.value","k.ratio.1"],"outputs":{"value":"front.dimension.x.value"}},{"id":"host.dimension.x","op":"mul@1","args":["host.size.x","k.ratio.1"],"outputs":{"value":"host.dimension.x.value"}},{"id":"back.shape","op":"extrude@1","args":["back.start.value","back.dimension.height","back.dimension.x.value","back.dimension.depth"],"outputs":{"shape":"back.shapeValue"},"params":{"frame":"back.local","axis":"y","section":"rectangle"}},{"id":"back.pose","op":"rigid@1","args":["d.mm.0","back.on.host.along.y.1.sum.value","back.on.host.own-edge.z.0.times.value","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"back.poseValue"},"params":{"from":"back.local","to":"back.seat"}},{"id":"back","op":"place@1","args":["back.shapeValue","back.world.value"],"outputs":{"placed":"back.placed"}},{"id":"back.start","op":"mul@1","args":["back.dimension.height","back.k.centre"],"outputs":{"value":"back.start.value"}},{"id":"back.dimension.x","op":"mul@1","args":["host.dimension.x.value","k.ratio.1"],"outputs":{"value":"back.dimension.x.value"}},{"id":"left.shape","op":"extrude@1","args":["left.start.value","left.dimension.height","left.dimension.width","left.dimension.z.value"],"outputs":{"shape":"left.shapeValue"},"params":{"frame":"left.local","axis":"y","section":"rectangle"}},{"id":"left.pose","op":"rigid@1","args":["left.on.host.own-edge.x.0.times.value","left.on.host.along.y.1.sum.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"left.poseValue"},"params":{"from":"left.local","to":"left.seat"}},{"id":"left","op":"place@1","args":["left.shapeValue","left.world.value"],"outputs":{"placed":"left.placed"}},{"id":"left.start","op":"mul@1","args":["left.dimension.height","left.k.centre"],"outputs":{"value":"left.start.value"}},{"id":"left.dimension.z","op":"mul@1","args":["left.z.follows.plus.value","k.ratio.1"],"outputs":{"value":"left.dimension.z.value"}},{"id":"host.dimension.z","op":"mul@1","args":["host.size.z","k.ratio.1"],"outputs":{"value":"host.dimension.z.value"}},{"id":"left.z.follows.plus","op":"add@1","args":["host.dimension.z.value","d.mm._160"],"outputs":{"value":"left.z.follows.plus.value"}},{"id":"right.shape","op":"extrude@1","args":["right.start.value","right.dimension.height","right.dimension.width","right.dimension.z.value"],"outputs":{"shape":"right.shapeValue"},"params":{"frame":"right.local","axis":"y","section":"rectangle"}},{"id":"right.pose","op":"rigid@1","args":["right.on.host.own-edge.x.0.times.value","right.on.host.along.y.1.sum.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"right.poseValue"},"params":{"from":"right.local","to":"right.seat"}},{"id":"right","op":"place@1","args":["right.shapeValue","right.world.value"],"outputs":{"placed":"right.placed"}},{"id":"right.start","op":"mul@1","args":["right.dimension.height","right.k.centre"],"outputs":{"value":"right.start.value"}},{"id":"right.dimension.z","op":"mul@1","args":["right.z.follows.plus.value","k.ratio.1"],"outputs":{"value":"right.dimension.z.value"}},{"id":"right.z.follows.plus","op":"add@1","args":["host.dimension.z.value","d.mm._160"],"outputs":{"value":"right.z.follows.plus.value"}},{"id":"host.on.plane.stand.y.0.times","op":"mul@1","args":["host.size.y","k.ratio.0_5"],"outputs":{"value":"host.on.plane.stand.y.0.times.value"}},{"id":"host.on.plane.stand.y.1.sum","op":"add@1","args":["host.on.plane.stand.y.0.times.value","d.mm.100"],"outputs":{"value":"host.on.plane.stand.y.1.sum.value"}},{"id":"host.seat.rigid","op":"rigid@1","args":["d.mm.0","d.mm.0","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"host.seat.value"},"params":{"from":"host.seat","to":"asset"}},{"id":"host.chain","op":"compose@1","args":["host.seat.value","host.poseValue"],"outputs":{"pose":"host.chain.value"}},{"id":"front.on.host.seat.y.0.times","op":"mul@1","args":["host.size.y","host.k.centre"],"outputs":{"value":"front.on.host.seat.y.0.times.value"}},{"id":"front.on.host.along.y.0.times","op":"mul@1","args":["front.dimension.height","host.k.centre"],"outputs":{"value":"front.on.host.along.y.0.times.value"}},{"id":"front.on.host.along.y.1.times","op":"mul@1","args":["d.mm.0","k.ratio._1"],"outputs":{"value":"front.on.host.along.y.1.times.value"}},{"id":"front.on.host.along.y.1.sum","op":"add@1","args":["front.on.host.along.y.0.times.value","front.on.host.along.y.1.times.value"],"outputs":{"value":"front.on.host.along.y.1.sum.value"}},{"id":"front.on.host.edge.z.0.times","op":"mul@1","args":["host.dimension.z.value","k.ratio.0_5"],"outputs":{"value":"front.on.host.edge.z.0.times.value"}},{"id":"front.on.host.own-edge.z.0.times","op":"mul@1","args":["front.dimension.depth","host.k.centre"],"outputs":{"value":"front.on.host.own-edge.z.0.times.value"}},{"id":"front.seat.rigid","op":"rigid@1","args":["d.mm.0","front.on.host.seat.y.0.times.value","front.on.host.edge.z.0.times.value","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"front.seat.value"},"params":{"from":"front.seat","to":"host.local"}},{"id":"front.chain","op":"compose@1","args":["front.seat.value","front.poseValue"],"outputs":{"pose":"front.chain.value"}},{"id":"front.world","op":"compose@1","args":["host.chain.value","front.chain.value"],"outputs":{"pose":"front.world.value"}},{"id":"back.on.host.seat.y.0.times","op":"mul@1","args":["host.size.y","host.k.centre"],"outputs":{"value":"back.on.host.seat.y.0.times.value"}},{"id":"back.on.host.along.y.0.times","op":"mul@1","args":["back.dimension.height","host.k.centre"],"outputs":{"value":"back.on.host.along.y.0.times.value"}},{"id":"back.on.host.along.y.1.times","op":"mul@1","args":["d.mm.0","k.ratio._1"],"outputs":{"value":"back.on.host.along.y.1.times.value"}},{"id":"back.on.host.along.y.1.sum","op":"add@1","args":["back.on.host.along.y.0.times.value","back.on.host.along.y.1.times.value"],"outputs":{"value":"back.on.host.along.y.1.sum.value"}},{"id":"back.on.host.edge.z.0.times","op":"mul@1","args":["host.dimension.z.value","host.k.centre"],"outputs":{"value":"back.on.host.edge.z.0.times.value"}},{"id":"back.on.host.own-edge.z.0.times","op":"mul@1","args":["back.dimension.depth","k.ratio.0_5"],"outputs":{"value":"back.on.host.own-edge.z.0.times.value"}},{"id":"back.seat.rigid","op":"rigid@1","args":["d.mm.0","back.on.host.seat.y.0.times.value","back.on.host.edge.z.0.times.value","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"back.seat.value"},"params":{"from":"back.seat","to":"host.local"}},{"id":"back.chain","op":"compose@1","args":["back.seat.value","back.poseValue"],"outputs":{"pose":"back.chain.value"}},{"id":"back.world","op":"compose@1","args":["host.chain.value","back.chain.value"],"outputs":{"pose":"back.world.value"}},{"id":"left.on.host.seat.y.0.times","op":"mul@1","args":["host.size.y","host.k.centre"],"outputs":{"value":"left.on.host.seat.y.0.times.value"}},{"id":"left.on.host.along.y.0.times","op":"mul@1","args":["left.dimension.height","host.k.centre"],"outputs":{"value":"left.on.host.along.y.0.times.value"}},{"id":"left.on.host.along.y.1.times","op":"mul@1","args":["d.mm.0","k.ratio._1"],"outputs":{"value":"left.on.host.along.y.1.times.value"}},{"id":"left.on.host.along.y.1.sum","op":"add@1","args":["left.on.host.along.y.0.times.value","left.on.host.along.y.1.times.value"],"outputs":{"value":"left.on.host.along.y.1.sum.value"}},{"id":"left.on.host.edge.x.0.times","op":"mul@1","args":["host.dimension.x.value","host.k.centre"],"outputs":{"value":"left.on.host.edge.x.0.times.value"}},{"id":"left.on.host.own-edge.x.0.times","op":"mul@1","args":["left.dimension.width","k.ratio.0_5"],"outputs":{"value":"left.on.host.own-edge.x.0.times.value"}},{"id":"left.seat.rigid","op":"rigid@1","args":["left.on.host.edge.x.0.times.value","left.on.host.seat.y.0.times.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"left.seat.value"},"params":{"from":"left.seat","to":"host.local"}},{"id":"left.chain","op":"compose@1","args":["left.seat.value","left.poseValue"],"outputs":{"pose":"left.chain.value"}},{"id":"left.world","op":"compose@1","args":["host.chain.value","left.chain.value"],"outputs":{"pose":"left.world.value"}},{"id":"right.on.host.seat.y.0.times","op":"mul@1","args":["host.size.y","host.k.centre"],"outputs":{"value":"right.on.host.seat.y.0.times.value"}},{"id":"right.on.host.along.y.0.times","op":"mul@1","args":["right.dimension.height","host.k.centre"],"outputs":{"value":"right.on.host.along.y.0.times.value"}},{"id":"right.on.host.along.y.1.times","op":"mul@1","args":["d.mm.0","k.ratio._1"],"outputs":{"value":"right.on.host.along.y.1.times.value"}},{"id":"right.on.host.along.y.1.sum","op":"add@1","args":["right.on.host.along.y.0.times.value","right.on.host.along.y.1.times.value"],"outputs":{"value":"right.on.host.along.y.1.sum.value"}},{"id":"right.on.host.edge.x.0.times","op":"mul@1","args":["host.dimension.x.value","k.ratio.0_5"],"outputs":{"value":"right.on.host.edge.x.0.times.value"}},{"id":"right.on.host.own-edge.x.0.times","op":"mul@1","args":["right.dimension.width","host.k.centre"],"outputs":{"value":"right.on.host.own-edge.x.0.times.value"}},{"id":"right.seat.rigid","op":"rigid@1","args":["right.on.host.edge.x.0.times.value","right.on.host.seat.y.0.times.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"right.seat.value"},"params":{"from":"right.seat","to":"host.local"}},{"id":"right.chain","op":"compose@1","args":["right.seat.value","right.poseValue"],"outputs":{"pose":"right.chain.value"}},{"id":"right.world","op":"compose@1","args":["host.chain.value","right.chain.value"],"outputs":{"pose":"right.world.value"}}]},"capabilities":{"version":"r3-capability-3","assetFrame":"asset","bindings":[]}},"designInputs":{"host.size.x":1600,"host.size.y":1400,"host.size.z":1000,"front.dimension.height":100,"front.dimension.depth":80,"back.dimension.height":100,"back.dimension.depth":80,"left.dimension.width":80,"left.dimension.height":100,"right.dimension.width":80,"right.dimension.height":100},"stateDefaults":{},"palette":{"palette.primary":"#477b9e","palette.host":"#d9dde2","palette.tpl-4f5d6b":"#4f5d6b"},"appearance":[{"target":"host","material":{"token":"palette.host"}},{"target":"front","material":{"token":"palette.tpl-4f5d6b"}},{"target":"back","material":{"token":"palette.tpl-4f5d6b"}},{"target":"left","material":{"token":"palette.tpl-4f5d6b"}},{"target":"right","material":{"token":"palette.tpl-4f5d6b"}}],"joints":[{"id":"host","type":"fixed","body0":{"plane":"mounting-plane"},"body1":{"part":"host","face":"bottom"},"origin":{"gap":100}},{"id":"front","type":"fixed","body0":{"part":"host","face":"bottom"},"body1":{"part":"front","face":"top"},"origin":{"align":{"z":"max"}}},{"id":"back","type":"fixed","body0":{"part":"host","face":"bottom"},"body1":{"part":"back","face":"top"},"origin":{"align":{"z":"min"}}},{"id":"left","type":"fixed","body0":{"part":"host","face":"bottom"},"body1":{"part":"left","face":"top"},"origin":{"align":{"x":"min"}}},{"id":"right","type":"fixed","body0":{"part":"host","face":"bottom"},"body1":{"part":"right","face":"top"},"origin":{"align":{"x":"max"}}}]}
|
|
1
|
+
{"version":"figure-asset-1","name":"TPL_BASE_FRAME","document":{"version":"figure-prototype-1","model":{"version":"r3-spatial-1","inputs":[{"id":"host.size.x","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.y","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.z","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"front.dimension.height","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"front.dimension.depth","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"back.dimension.height","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"back.dimension.depth","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"left.dimension.width","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"left.dimension.height","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"right.dimension.width","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"},{"id":"right.dimension.height","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"}],"constants":[{"id":"host.k.centre","unit":"ratio","value":-0.5},{"id":"d.mm.0","unit":"mm","value":0},{"id":"d.mm.100","unit":"mm","value":100},{"id":"k.ratio.0_5","unit":"ratio","value":0.5},{"id":"a.deg.0","unit":"deg","value":0},{"id":"front.k.centre","unit":"ratio","value":-0.5},{"id":"k.ratio.1","unit":"ratio","value":1},{"id":"back.k.centre","unit":"ratio","value":-0.5},{"id":"left.k.centre","unit":"ratio","value":-0.5},{"id":"d.mm._160","unit":"mm","value":-160},{"id":"right.k.centre","unit":"ratio","value":-0.5}],"nodes":[{"id":"host.start","op":"mul@1","args":["host.size.y","host.k.centre"],"outputs":{"value":"host.start.value"}},{"id":"host.shape","op":"extrude@1","args":["host.start.value","host.size.y","host.dimension.x.value","host.dimension.z.value"],"outputs":{"shape":"host.shapeValue"},"params":{"frame":"host.local","axis":"y","section":"rectangle"}},{"id":"host.pose","op":"rigid@1","args":["d.mm.0","host.on.plane.pose.y.s0.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"host.poseValue"},"params":{"from":"host.local","to":"host.seat"}},{"id":"host","op":"place@1","args":["host.shapeValue","host.chain.value"],"outputs":{"placed":"host.placed"}},{"id":"front.shape","op":"extrude@1","args":["front.start.value","front.dimension.height","front.dimension.x.value","front.dimension.depth"],"outputs":{"shape":"front.shapeValue"},"params":{"frame":"front.local","axis":"y","section":"rectangle"}},{"id":"front.pose","op":"rigid@1","args":["d.mm.0","front.on.host.pose.y.t0.value","front.on.host.pose.z.t0.value","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"front.poseValue"},"params":{"from":"front.local","to":"front.seat"}},{"id":"front","op":"place@1","args":["front.shapeValue","front.world.value"],"outputs":{"placed":"front.placed"}},{"id":"front.start","op":"mul@1","args":["front.dimension.height","front.k.centre"],"outputs":{"value":"front.start.value"}},{"id":"front.dimension.x","op":"mul@1","args":["host.dimension.x.value","k.ratio.1"],"outputs":{"value":"front.dimension.x.value"}},{"id":"host.dimension.x","op":"mul@1","args":["host.size.x","k.ratio.1"],"outputs":{"value":"host.dimension.x.value"}},{"id":"back.shape","op":"extrude@1","args":["back.start.value","back.dimension.height","back.dimension.x.value","back.dimension.depth"],"outputs":{"shape":"back.shapeValue"},"params":{"frame":"back.local","axis":"y","section":"rectangle"}},{"id":"back.pose","op":"rigid@1","args":["d.mm.0","back.on.host.pose.y.t0.value","back.on.host.pose.z.t0.value","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"back.poseValue"},"params":{"from":"back.local","to":"back.seat"}},{"id":"back","op":"place@1","args":["back.shapeValue","back.world.value"],"outputs":{"placed":"back.placed"}},{"id":"back.start","op":"mul@1","args":["back.dimension.height","back.k.centre"],"outputs":{"value":"back.start.value"}},{"id":"back.dimension.x","op":"mul@1","args":["host.dimension.x.value","k.ratio.1"],"outputs":{"value":"back.dimension.x.value"}},{"id":"left.shape","op":"extrude@1","args":["left.start.value","left.dimension.height","left.dimension.width","left.dimension.z.value"],"outputs":{"shape":"left.shapeValue"},"params":{"frame":"left.local","axis":"y","section":"rectangle"}},{"id":"left.pose","op":"rigid@1","args":["left.on.host.pose.x.t0.value","left.on.host.pose.y.t0.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"left.poseValue"},"params":{"from":"left.local","to":"left.seat"}},{"id":"left","op":"place@1","args":["left.shapeValue","left.world.value"],"outputs":{"placed":"left.placed"}},{"id":"left.start","op":"mul@1","args":["left.dimension.height","left.k.centre"],"outputs":{"value":"left.start.value"}},{"id":"left.dimension.z","op":"mul@1","args":["left.z.follows.plus.value","k.ratio.1"],"outputs":{"value":"left.dimension.z.value"}},{"id":"host.dimension.z","op":"mul@1","args":["host.size.z","k.ratio.1"],"outputs":{"value":"host.dimension.z.value"}},{"id":"left.z.follows.plus","op":"add@1","args":["host.dimension.z.value","d.mm._160"],"outputs":{"value":"left.z.follows.plus.value"}},{"id":"right.shape","op":"extrude@1","args":["right.start.value","right.dimension.height","right.dimension.width","right.dimension.z.value"],"outputs":{"shape":"right.shapeValue"},"params":{"frame":"right.local","axis":"y","section":"rectangle"}},{"id":"right.pose","op":"rigid@1","args":["right.on.host.pose.x.t0.value","right.on.host.pose.y.t0.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"right.poseValue"},"params":{"from":"right.local","to":"right.seat"}},{"id":"right","op":"place@1","args":["right.shapeValue","right.world.value"],"outputs":{"placed":"right.placed"}},{"id":"right.start","op":"mul@1","args":["right.dimension.height","right.k.centre"],"outputs":{"value":"right.start.value"}},{"id":"right.dimension.z","op":"mul@1","args":["right.z.follows.plus.value","k.ratio.1"],"outputs":{"value":"right.dimension.z.value"}},{"id":"right.z.follows.plus","op":"add@1","args":["host.dimension.z.value","d.mm._160"],"outputs":{"value":"right.z.follows.plus.value"}},{"id":"host.on.plane.pose.y.t1","op":"mul@1","args":["host.size.y","k.ratio.0_5"],"outputs":{"value":"host.on.plane.pose.y.t1.value"}},{"id":"host.on.plane.pose.y.s0","op":"add@1","args":["d.mm.100","host.on.plane.pose.y.t1.value"],"outputs":{"value":"host.on.plane.pose.y.s0.value"}},{"id":"host.seat.rigid","op":"rigid@1","args":["d.mm.0","d.mm.0","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"host.seat.value"},"params":{"from":"host.seat","to":"asset"}},{"id":"host.chain","op":"compose@1","args":["host.seat.value","host.poseValue"],"outputs":{"pose":"host.chain.value"}},{"id":"front.on.host.seat.y.t0","op":"mul@1","args":["host.size.y","host.k.centre"],"outputs":{"value":"front.on.host.seat.y.t0.value"}},{"id":"front.on.host.seat.z.t0","op":"mul@1","args":["host.dimension.z.value","k.ratio.0_5"],"outputs":{"value":"front.on.host.seat.z.t0.value"}},{"id":"front.on.host.pose.y.t0","op":"mul@1","args":["front.dimension.height","host.k.centre"],"outputs":{"value":"front.on.host.pose.y.t0.value"}},{"id":"front.on.host.pose.z.t0","op":"mul@1","args":["front.dimension.depth","host.k.centre"],"outputs":{"value":"front.on.host.pose.z.t0.value"}},{"id":"front.seat.rigid","op":"rigid@1","args":["d.mm.0","front.on.host.seat.y.t0.value","front.on.host.seat.z.t0.value","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"front.seat.value"},"params":{"from":"front.seat","to":"host.local"}},{"id":"front.chain","op":"compose@1","args":["front.seat.value","front.poseValue"],"outputs":{"pose":"front.chain.value"}},{"id":"front.world","op":"compose@1","args":["host.chain.value","front.chain.value"],"outputs":{"pose":"front.world.value"}},{"id":"back.on.host.seat.y.t0","op":"mul@1","args":["host.size.y","host.k.centre"],"outputs":{"value":"back.on.host.seat.y.t0.value"}},{"id":"back.on.host.seat.z.t0","op":"mul@1","args":["host.dimension.z.value","host.k.centre"],"outputs":{"value":"back.on.host.seat.z.t0.value"}},{"id":"back.on.host.pose.y.t0","op":"mul@1","args":["back.dimension.height","host.k.centre"],"outputs":{"value":"back.on.host.pose.y.t0.value"}},{"id":"back.on.host.pose.z.t0","op":"mul@1","args":["back.dimension.depth","k.ratio.0_5"],"outputs":{"value":"back.on.host.pose.z.t0.value"}},{"id":"back.seat.rigid","op":"rigid@1","args":["d.mm.0","back.on.host.seat.y.t0.value","back.on.host.seat.z.t0.value","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"back.seat.value"},"params":{"from":"back.seat","to":"host.local"}},{"id":"back.chain","op":"compose@1","args":["back.seat.value","back.poseValue"],"outputs":{"pose":"back.chain.value"}},{"id":"back.world","op":"compose@1","args":["host.chain.value","back.chain.value"],"outputs":{"pose":"back.world.value"}},{"id":"left.on.host.seat.x.t0","op":"mul@1","args":["host.dimension.x.value","host.k.centre"],"outputs":{"value":"left.on.host.seat.x.t0.value"}},{"id":"left.on.host.seat.y.t0","op":"mul@1","args":["host.size.y","host.k.centre"],"outputs":{"value":"left.on.host.seat.y.t0.value"}},{"id":"left.on.host.pose.x.t0","op":"mul@1","args":["left.dimension.width","k.ratio.0_5"],"outputs":{"value":"left.on.host.pose.x.t0.value"}},{"id":"left.on.host.pose.y.t0","op":"mul@1","args":["left.dimension.height","host.k.centre"],"outputs":{"value":"left.on.host.pose.y.t0.value"}},{"id":"left.seat.rigid","op":"rigid@1","args":["left.on.host.seat.x.t0.value","left.on.host.seat.y.t0.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"left.seat.value"},"params":{"from":"left.seat","to":"host.local"}},{"id":"left.chain","op":"compose@1","args":["left.seat.value","left.poseValue"],"outputs":{"pose":"left.chain.value"}},{"id":"left.world","op":"compose@1","args":["host.chain.value","left.chain.value"],"outputs":{"pose":"left.world.value"}},{"id":"right.on.host.seat.x.t0","op":"mul@1","args":["host.dimension.x.value","k.ratio.0_5"],"outputs":{"value":"right.on.host.seat.x.t0.value"}},{"id":"right.on.host.seat.y.t0","op":"mul@1","args":["host.size.y","host.k.centre"],"outputs":{"value":"right.on.host.seat.y.t0.value"}},{"id":"right.on.host.pose.x.t0","op":"mul@1","args":["right.dimension.width","host.k.centre"],"outputs":{"value":"right.on.host.pose.x.t0.value"}},{"id":"right.on.host.pose.y.t0","op":"mul@1","args":["right.dimension.height","host.k.centre"],"outputs":{"value":"right.on.host.pose.y.t0.value"}},{"id":"right.seat.rigid","op":"rigid@1","args":["right.on.host.seat.x.t0.value","right.on.host.seat.y.t0.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"right.seat.value"},"params":{"from":"right.seat","to":"host.local"}},{"id":"right.chain","op":"compose@1","args":["right.seat.value","right.poseValue"],"outputs":{"pose":"right.chain.value"}},{"id":"right.world","op":"compose@1","args":["host.chain.value","right.chain.value"],"outputs":{"pose":"right.world.value"}}]},"capabilities":{"version":"r3-capability-3","assetFrame":"asset","bindings":[]}},"designInputs":{"host.size.x":1600,"host.size.y":1400,"host.size.z":1000,"front.dimension.height":100,"front.dimension.depth":80,"back.dimension.height":100,"back.dimension.depth":80,"left.dimension.width":80,"left.dimension.height":100,"right.dimension.width":80,"right.dimension.height":100},"stateDefaults":{},"palette":{"palette.primary":"#477b9e","palette.host":"#d9dde2","palette.tpl-4f5d6b":"#4f5d6b"},"appearance":[{"target":"host","material":{"token":"palette.host"}},{"target":"front","material":{"token":"palette.tpl-4f5d6b"}},{"target":"back","material":{"token":"palette.tpl-4f5d6b"}},{"target":"left","material":{"token":"palette.tpl-4f5d6b"}},{"target":"right","material":{"token":"palette.tpl-4f5d6b"}}],"joints":[{"id":"host","type":"fixed","body0":{"plane":"mounting-plane"},"body1":{"part":"host"},"origin":{"gap":100}},{"id":"front","type":"fixed","body0":{"part":"host","face":"bottom"},"body1":{"part":"front"},"origin":{"align":{"z":"max"}}},{"id":"back","type":"fixed","body0":{"part":"host","face":"bottom"},"body1":{"part":"back"},"origin":{"align":{"z":"min"}}},{"id":"left","type":"fixed","body0":{"part":"host","face":"bottom"},"body1":{"part":"left"},"origin":{"align":{"x":"min"}}},{"id":"right","type":"fixed","body0":{"part":"host","face":"bottom"},"body1":{"part":"right"},"origin":{"align":{"x":"max"}}}]}
|
|
@@ -145,8 +145,7 @@
|
|
|
145
145
|
"face": "bottom"
|
|
146
146
|
},
|
|
147
147
|
"body1": {
|
|
148
|
-
"part": "{id}-front"
|
|
149
|
-
"face": "top"
|
|
148
|
+
"part": "{id}-front"
|
|
150
149
|
},
|
|
151
150
|
"origin": {
|
|
152
151
|
"align": {
|
|
@@ -165,8 +164,7 @@
|
|
|
165
164
|
"face": "bottom"
|
|
166
165
|
},
|
|
167
166
|
"body1": {
|
|
168
|
-
"part": "{id}-back"
|
|
169
|
-
"face": "top"
|
|
167
|
+
"part": "{id}-back"
|
|
170
168
|
},
|
|
171
169
|
"origin": {
|
|
172
170
|
"align": {
|
|
@@ -185,8 +183,7 @@
|
|
|
185
183
|
"face": "bottom"
|
|
186
184
|
},
|
|
187
185
|
"body1": {
|
|
188
|
-
"part": "{id}-left"
|
|
189
|
-
"face": "top"
|
|
186
|
+
"part": "{id}-left"
|
|
190
187
|
},
|
|
191
188
|
"origin": {
|
|
192
189
|
"align": {
|
|
@@ -205,8 +202,7 @@
|
|
|
205
202
|
"face": "bottom"
|
|
206
203
|
},
|
|
207
204
|
"body1": {
|
|
208
|
-
"part": "{id}-right"
|
|
209
|
-
"face": "top"
|
|
205
|
+
"part": "{id}-right"
|
|
210
206
|
},
|
|
211
207
|
"origin": {
|
|
212
208
|
"align": {
|
|
@@ -6,7 +6,7 @@ export default function build() {
|
|
|
6
6
|
m.box('belt', 3000, 8, 720)
|
|
7
7
|
.follow('belt', 'x', 'host', 'x')
|
|
8
8
|
.follow('belt', 'z', 'host', 'z', 0.9)
|
|
9
|
-
.on('belt', '
|
|
9
|
+
.on('belt', 'host', 'top')
|
|
10
10
|
.colour('belt', 'palette.belt', '#2f3437')
|
|
11
11
|
return m.asset
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"figure-asset-1","name":"TPL_BELT_SURFACE","document":{"version":"figure-prototype-1","model":{"version":"r3-spatial-1","inputs":[{"id":"host.size.x","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.y","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.z","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"belt.dimension.height","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"}],"constants":[{"id":"host.k.centre","unit":"ratio","value":-0.5},{"id":"d.mm.0","unit":"mm","value":0},{"id":"
|
|
1
|
+
{"version":"figure-asset-1","name":"TPL_BELT_SURFACE","document":{"version":"figure-prototype-1","model":{"version":"r3-spatial-1","inputs":[{"id":"host.size.x","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.y","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"host.size.z","unit":"mm","min":5e-324,"max":1.7976931348623157e+308,"role":"design"},{"id":"belt.dimension.height","unit":"mm","min":0,"max":1.7976931348623157e+308,"role":"design"}],"constants":[{"id":"host.k.centre","unit":"ratio","value":-0.5},{"id":"d.mm.0","unit":"mm","value":0},{"id":"k.ratio.0_5","unit":"ratio","value":0.5},{"id":"a.deg.0","unit":"deg","value":0},{"id":"belt.k.centre","unit":"ratio","value":-0.5},{"id":"k.ratio.1","unit":"ratio","value":1},{"id":"k.ratio.0_9","unit":"ratio","value":0.9}],"nodes":[{"id":"host.start","op":"mul@1","args":["host.size.y","host.k.centre"],"outputs":{"value":"host.start.value"}},{"id":"host.shape","op":"extrude@1","args":["host.start.value","host.size.y","host.dimension.x.value","host.dimension.z.value"],"outputs":{"shape":"host.shapeValue"},"params":{"frame":"host.local","axis":"y","section":"rectangle"}},{"id":"host.pose","op":"rigid@1","args":["d.mm.0","host.on.plane.pose.y.t0.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"host.poseValue"},"params":{"from":"host.local","to":"host.seat"}},{"id":"host","op":"place@1","args":["host.shapeValue","host.chain.value"],"outputs":{"placed":"host.placed"}},{"id":"belt.shape","op":"extrude@1","args":["belt.start.value","belt.dimension.height","belt.dimension.x.value","belt.dimension.z.value"],"outputs":{"shape":"belt.shapeValue"},"params":{"frame":"belt.local","axis":"y","section":"rectangle"}},{"id":"belt.pose","op":"rigid@1","args":["d.mm.0","belt.on.host.pose.y.t0.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"belt.poseValue"},"params":{"from":"belt.local","to":"belt.seat"}},{"id":"belt","op":"place@1","args":["belt.shapeValue","belt.world.value"],"outputs":{"placed":"belt.placed"}},{"id":"belt.start","op":"mul@1","args":["belt.dimension.height","belt.k.centre"],"outputs":{"value":"belt.start.value"}},{"id":"belt.dimension.x","op":"mul@1","args":["host.dimension.x.value","k.ratio.1"],"outputs":{"value":"belt.dimension.x.value"}},{"id":"host.dimension.x","op":"mul@1","args":["host.size.x","k.ratio.1"],"outputs":{"value":"host.dimension.x.value"}},{"id":"belt.dimension.z","op":"mul@1","args":["belt.z.follows.times.value","k.ratio.1"],"outputs":{"value":"belt.dimension.z.value"}},{"id":"host.dimension.z","op":"mul@1","args":["host.size.z","k.ratio.1"],"outputs":{"value":"host.dimension.z.value"}},{"id":"belt.z.follows.times","op":"mul@1","args":["host.dimension.z.value","k.ratio.0_9"],"outputs":{"value":"belt.z.follows.times.value"}},{"id":"host.on.plane.pose.y.t0","op":"mul@1","args":["host.size.y","k.ratio.0_5"],"outputs":{"value":"host.on.plane.pose.y.t0.value"}},{"id":"host.seat.rigid","op":"rigid@1","args":["d.mm.0","d.mm.0","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"host.seat.value"},"params":{"from":"host.seat","to":"asset"}},{"id":"host.chain","op":"compose@1","args":["host.seat.value","host.poseValue"],"outputs":{"pose":"host.chain.value"}},{"id":"belt.on.host.seat.y.t0","op":"mul@1","args":["host.size.y","k.ratio.0_5"],"outputs":{"value":"belt.on.host.seat.y.t0.value"}},{"id":"belt.on.host.pose.y.t0","op":"mul@1","args":["belt.dimension.height","k.ratio.0_5"],"outputs":{"value":"belt.on.host.pose.y.t0.value"}},{"id":"belt.seat.rigid","op":"rigid@1","args":["d.mm.0","belt.on.host.seat.y.t0.value","d.mm.0","a.deg.0","a.deg.0","a.deg.0"],"outputs":{"pose":"belt.seat.value"},"params":{"from":"belt.seat","to":"host.local"}},{"id":"belt.chain","op":"compose@1","args":["belt.seat.value","belt.poseValue"],"outputs":{"pose":"belt.chain.value"}},{"id":"belt.world","op":"compose@1","args":["host.chain.value","belt.chain.value"],"outputs":{"pose":"belt.world.value"}}]},"capabilities":{"version":"r3-capability-3","assetFrame":"asset","bindings":[]}},"designInputs":{"host.size.x":3000,"host.size.y":700,"host.size.z":800,"belt.dimension.height":8},"stateDefaults":{},"palette":{"palette.primary":"#477b9e","palette.host":"#d9dde2","palette.tpl-2f3437":"#2f3437"},"appearance":[{"target":"host","material":{"token":"palette.host"}},{"target":"belt","material":{"token":"palette.tpl-2f3437"}}],"joints":[{"id":"host","type":"fixed","body0":{"plane":"mounting-plane"},"body1":{"part":"host"},"origin":{}},{"id":"belt","type":"fixed","body0":{"part":"host","face":"top"},"body1":{"part":"belt"},"origin":{}}]}
|
|
@@ -4,7 +4,7 @@ import { host, Model } from '../_lib/model.mts'
|
|
|
4
4
|
export default function build() {
|
|
5
5
|
const m = new Model(host({ x: 1800, y: 800, z: 600 }, 'TPL_BIN_ROW'))
|
|
6
6
|
m.add({ id: 'bin', kind: 'hollow-box', dimensions: { width: 400, height: 200, depth: 300, roundX: 10, roundZ: 10, wallX: 8, wallZ: 8, floor: 10 } } as never)
|
|
7
|
-
.on('bin', '
|
|
7
|
+
.on('bin', 'host', 'top')
|
|
8
8
|
.colour('bin', 'palette.bin', '#f39c12')
|
|
9
9
|
.do({ kind: 'make-repeat', part: 'bin', axis: 'x', pitch: 450, narrowRange: true })
|
|
10
10
|
return m.asset
|