@hatiolab/figure-model 0.1.92 → 0.1.94
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/CHANGELOG.md +12 -12
- package/README.md +25 -25
- package/dist/{v3-asset-types.d.ts → asset-types.d.ts} +73 -67
- package/dist/asset-types.d.ts.map +1 -0
- package/dist/asset-types.js +2 -0
- package/dist/asset-types.js.map +1 -0
- package/dist/asset.d.ts +20 -0
- package/dist/asset.d.ts.map +1 -0
- package/dist/{v3-asset.js → asset.js} +49 -28
- package/dist/asset.js.map +1 -0
- package/dist/{v3-authoring-actions.d.ts → authoring-actions.d.ts} +77 -66
- package/dist/authoring-actions.d.ts.map +1 -0
- package/dist/{v3-authoring-actions.js → authoring-actions.js} +129 -104
- package/dist/authoring-actions.js.map +1 -0
- package/dist/{v3-authoring-session.d.ts → authoring-session.d.ts} +23 -21
- package/dist/authoring-session.d.ts.map +1 -0
- package/dist/{v3-authoring-session.js → authoring-session.js} +4 -4
- package/dist/authoring-session.js.map +1 -0
- package/dist/capabilities.d.ts +3 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/{v3-capabilities.js → capabilities.js} +8 -8
- package/dist/capabilities.js.map +1 -0
- package/dist/clip-keeping.d.ts +30 -0
- package/dist/clip-keeping.d.ts.map +1 -0
- package/dist/clip-keeping.js +77 -0
- package/dist/clip-keeping.js.map +1 -0
- package/dist/command-preview.d.ts +125 -0
- package/dist/command-preview.d.ts.map +1 -0
- package/dist/command-preview.js +246 -0
- package/dist/command-preview.js.map +1 -0
- package/dist/contract.d.ts +7 -0
- package/dist/contract.d.ts.map +1 -0
- package/dist/contract.js +12 -0
- package/dist/contract.js.map +1 -0
- package/dist/{v3-cost.d.ts → cost.d.ts} +5 -5
- package/dist/cost.d.ts.map +1 -0
- package/dist/{v3-cost.js → cost.js} +11 -11
- package/dist/cost.js.map +1 -0
- package/dist/{v3-create.d.ts → create.d.ts} +8 -8
- package/dist/{v3-create.d.ts.map → create.d.ts.map} +1 -1
- package/dist/{v3-create.js → create.js} +26 -26
- package/dist/create.js.map +1 -0
- package/dist/document.d.ts +5 -0
- package/dist/document.d.ts.map +1 -0
- package/dist/document.js +31 -0
- package/dist/document.js.map +1 -0
- package/dist/{v3-driver.d.ts → driver.d.ts} +10 -10
- package/dist/driver.d.ts.map +1 -0
- package/dist/{v3-driver.js → driver.js} +10 -10
- package/dist/driver.js.map +1 -0
- package/dist/{v3-editor-workspace.d.ts → editor-workspace.d.ts} +99 -73
- package/dist/editor-workspace.d.ts.map +1 -0
- package/dist/{v3-editor-workspace.js → editor-workspace.js} +48 -32
- package/dist/editor-workspace.js.map +1 -0
- package/dist/{v3-examples.d.ts → examples.d.ts} +5 -5
- package/dist/examples.d.ts.map +1 -0
- package/dist/{v3-examples.js → examples.js} +11 -11
- package/dist/examples.js.map +1 -0
- package/dist/{v3-follow.d.ts → follow.d.ts} +5 -5
- package/dist/follow.d.ts.map +1 -0
- package/dist/{v3-follow.js → follow.js} +2 -2
- package/dist/follow.js.map +1 -0
- package/dist/{v3-gate.d.ts → gate.d.ts} +36 -28
- package/dist/gate.d.ts.map +1 -0
- package/dist/{v3-gate.js → gate.js} +54 -48
- package/dist/gate.js.map +1 -0
- package/dist/{v3-graph-types.d.ts → graph-types.d.ts} +33 -33
- package/dist/graph-types.d.ts.map +1 -0
- package/dist/graph-types.js +2 -0
- package/dist/graph-types.js.map +1 -0
- package/dist/{v3-graph.d.ts → graph.d.ts} +14 -14
- package/dist/graph.d.ts.map +1 -0
- package/dist/{v3-graph.js → graph.js} +16 -16
- package/dist/graph.js.map +1 -0
- package/dist/index.d.ts +39 -33
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +39 -33
- package/dist/index.js.map +1 -1
- package/dist/{v3-instance-size.d.ts → instance-size.d.ts} +14 -14
- package/dist/instance-size.d.ts.map +1 -0
- package/dist/{v3-instance-size.js → instance-size.js} +13 -13
- package/dist/instance-size.js.map +1 -0
- package/dist/json.d.ts +12 -0
- package/dist/json.d.ts.map +1 -0
- package/dist/{v3-json.js → json.js} +13 -13
- package/dist/json.js.map +1 -0
- package/dist/kernel-version.d.ts +8 -0
- package/dist/kernel-version.d.ts.map +1 -0
- package/dist/{v3-kernel-version.js → kernel-version.js} +4 -4
- package/dist/kernel-version.js.map +1 -0
- package/dist/{v3-part-edit.d.ts → part-edit.d.ts} +12 -11
- package/dist/part-edit.d.ts.map +1 -0
- package/dist/{v3-part-edit.js → part-edit.js} +84 -68
- package/dist/part-edit.js.map +1 -0
- package/dist/proposal.d.ts +55 -0
- package/dist/proposal.d.ts.map +1 -0
- package/dist/{v3-proposal.js → proposal.js} +29 -21
- package/dist/proposal.js.map +1 -0
- package/dist/{v3-public-inputs.d.ts → public-inputs.d.ts} +4 -4
- package/dist/public-inputs.d.ts.map +1 -0
- package/dist/{v3-public-inputs.js → public-inputs.js} +3 -3
- package/dist/public-inputs.js.map +1 -0
- package/dist/recipe-build.d.ts +27 -0
- package/dist/recipe-build.d.ts.map +1 -0
- package/dist/{v3-recipe-build.js → recipe-build.js} +9 -9
- package/dist/recipe-build.js.map +1 -0
- package/dist/recipe-from-parts.d.ts +8 -0
- package/dist/recipe-from-parts.d.ts.map +1 -0
- package/dist/{v3-recipe-from-parts.js → recipe-from-parts.js} +9 -9
- package/dist/recipe-from-parts.js.map +1 -0
- package/dist/{v3-recipe.d.ts → recipe.d.ts} +25 -25
- package/dist/recipe.d.ts.map +1 -0
- package/dist/{v3-recipe.js → recipe.js} +30 -30
- package/dist/recipe.js.map +1 -0
- package/dist/release-contract.d.ts +19 -0
- package/dist/release-contract.d.ts.map +1 -0
- package/dist/{v3-release-contract.js → release-contract.js} +8 -7
- package/dist/release-contract.js.map +1 -0
- package/dist/{v3-render-batches.d.ts → render-batches.d.ts} +8 -8
- package/dist/render-batches.d.ts.map +1 -0
- package/dist/{v3-render-batches.js → render-batches.js} +4 -4
- package/dist/render-batches.js.map +1 -0
- package/dist/resize-plan.d.ts +61 -0
- package/dist/resize-plan.d.ts.map +1 -0
- package/dist/resize-plan.js +189 -0
- package/dist/resize-plan.js.map +1 -0
- package/dist/room.d.ts +53 -0
- package/dist/room.d.ts.map +1 -0
- package/dist/room.js +90 -0
- package/dist/room.js.map +1 -0
- package/dist/{v3-score.d.ts → score.d.ts} +19 -19
- package/dist/score.d.ts.map +1 -0
- package/dist/{v3-score.js → score.js} +32 -32
- package/dist/score.js.map +1 -0
- package/dist/shape-provider.d.ts +37 -0
- package/dist/shape-provider.d.ts.map +1 -0
- package/dist/shape-provider.js +69 -0
- package/dist/shape-provider.js.map +1 -0
- package/dist/{v3-shape-sampling.d.ts → shape-sampling.d.ts} +4 -4
- package/dist/shape-sampling.d.ts.map +1 -0
- package/dist/{v3-shape-sampling.js → shape-sampling.js} +3 -3
- package/dist/shape-sampling.js.map +1 -0
- package/dist/size-edit.d.ts +38 -0
- package/dist/size-edit.d.ts.map +1 -0
- package/dist/size-edit.js +178 -0
- package/dist/size-edit.js.map +1 -0
- package/dist/{v3-surface.d.ts → surface.d.ts} +5 -5
- package/dist/surface.d.ts.map +1 -0
- package/dist/{v3-surface.js → surface.js} +7 -7
- package/dist/surface.js.map +1 -0
- package/dist/{v3-words.d.ts → words.d.ts} +3 -3
- package/dist/words.d.ts.map +1 -0
- package/dist/{v3-words.js → words.js} +3 -3
- package/dist/words.js.map +1 -0
- package/docs/{assembly-constraints-v3.md → assembly-constraints.md} +1 -1
- package/docs/{v3-asset-persistence.md → asset-persistence.md} +8 -8
- package/docs/{v3-authoring-transactions.md → authoring-transactions.md} +2 -2
- package/docs/{v3-capability-bindings.md → capability-bindings.md} +8 -8
- package/docs/{v3-common-kernel-experiment.md → common-kernel-experiment.md} +4 -4
- package/docs/{v3-core-semantics.md → core-semantics.md} +5 -5
- package/docs/{v3-cutover.md → cutover.md} +4 -4
- package/docs/{v3-design.md → design.md} +11 -11
- package/docs/{v3-document-contract.md → document-contract.md} +9 -9
- package/docs/{v3-dryroom-profile-validation.md → dryroom-profile-validation.md} +4 -4
- package/docs/{v3-editor-integration.md → editor-integration.md} +6 -6
- package/docs/{v3-full-conveyor-validation.md → full-conveyor-validation.md} +4 -4
- package/docs/{v3-full-dryroom-validation.md → full-dryroom-validation.md} +4 -4
- package/docs/{v3-full-forklift-validation.md → full-forklift-validation.md} +5 -5
- package/docs/{v3-full-robot-validation.md → full-robot-validation.md} +4 -4
- package/docs/{v3-layout-system.md → layout-system.md} +4 -4
- package/docs/{v3-legacy-risk-audit-2026-09-23.md → legacy-risk-audit-2026-09-23.md} +5 -5
- package/docs/{v3-minimal-model.md → minimal-model.md} +6 -6
- package/docs/{v3-motion-contract.md → motion-contract.md} +3 -3
- package/docs/{v3-openusd-review.md → openusd-review.md} +8 -8
- package/docs/{v3-operator-contracts.md → operator-contracts.md} +6 -6
- package/docs/{v3-payload-collision-validation.md → payload-collision-validation.md} +4 -4
- package/docs/{v3-payload-contact-validation.md → payload-contact-validation.md} +5 -5
- package/docs/prototypes/README.md +10 -10
- package/docs/prototypes/{v3-asset-samples.mjs → asset-samples.mjs} +6 -6
- package/docs/prototypes/{v3-asset-store.mjs → asset-store.mjs} +3 -3
- package/docs/prototypes/{v3-asset-store.test.mjs → asset-store.test.mjs} +6 -6
- package/docs/prototypes/asset.mjs +1 -0
- package/docs/prototypes/{v3-asset.schema.json → asset.schema.json} +2 -2
- package/docs/prototypes/{v3-asset.test.mjs → asset.test.mjs} +10 -10
- package/docs/prototypes/authoring-session.mjs +1 -0
- package/docs/prototypes/{v3-authoring-session.test.mjs → authoring-session.test.mjs} +6 -6
- package/docs/prototypes/capability-plan.mjs +1 -0
- package/docs/prototypes/{v3-capability-plan.test.mjs → capability-plan.test.mjs} +5 -5
- package/docs/prototypes/{v3-capability-samples.mjs → capability-samples.mjs} +2 -2
- package/docs/prototypes/document.mjs +2 -0
- package/docs/prototypes/{v3-document.schema.json → document.schema.json} +1 -1
- package/docs/prototypes/{v3-document.test.mjs → document.test.mjs} +7 -7
- package/docs/prototypes/{v3-dryroom-mesh.mjs → dryroom-mesh.mjs} +1 -1
- package/docs/prototypes/{v3-dryroom-mesh.test.mjs → dryroom-mesh.test.mjs} +1 -1
- package/docs/prototypes/{v3-editor-browser.mjs → editor-browser.mjs} +13 -13
- package/docs/prototypes/editor-workspace.mjs +1 -0
- package/docs/prototypes/{v3-editor-workspace.test.mjs → editor-workspace.test.mjs} +3 -3
- package/docs/prototypes/{v3-feature-pattern.test.mjs → feature-pattern.test.mjs} +1 -1
- package/docs/prototypes/{v3-full-conveyor.mjs → full-conveyor.mjs} +2 -2
- package/docs/prototypes/{v3-full-conveyor.test.mjs → full-conveyor.test.mjs} +3 -3
- package/docs/prototypes/{v3-full-dryroom.mjs → full-dryroom.mjs} +2 -2
- package/docs/prototypes/{v3-full-dryroom.test.mjs → full-dryroom.test.mjs} +3 -3
- package/docs/prototypes/{v3-full-forklift.mjs → full-forklift.mjs} +2 -2
- package/docs/prototypes/{v3-full-forklift.test.mjs → full-forklift.test.mjs} +3 -3
- package/docs/prototypes/{v3-full-robot.mjs → full-robot.mjs} +2 -2
- package/docs/prototypes/{v3-full-robot.test.mjs → full-robot.test.mjs} +4 -4
- package/docs/prototypes/{v3-kernel.test.mjs → kernel.test.mjs} +1 -1
- package/docs/prototypes/{v3-layout.test.mjs → layout.test.mjs} +1 -1
- package/docs/prototypes/{v3-more-samples.test.mjs → more-samples.test.mjs} +2 -2
- package/docs/prototypes/{v3-payload-collision.mjs → payload-collision.mjs} +2 -2
- package/docs/prototypes/{v3-payload-collision.test.mjs → payload-collision.test.mjs} +3 -3
- package/docs/prototypes/{v3-payload-fit.mjs → payload-fit.mjs} +2 -2
- package/docs/prototypes/{v3-payload-fit.test.mjs → payload-fit.test.mjs} +4 -4
- package/docs/prototypes/render-full-dryroom.mjs +12 -12
- package/docs/prototypes/{v3-repeated-binding.mjs → repeated-binding.mjs} +1 -1
- package/docs/prototypes/{v3-repeated-binding.test.mjs → repeated-binding.test.mjs} +6 -6
- package/docs/prototypes/{v3-runtime-browser.mjs → runtime-browser.mjs} +26 -26
- package/docs/prototypes/{v3-samples.test.mjs → samples.test.mjs} +1 -1
- package/docs/prototypes/{v3-spatial-plan.test.mjs → spatial-plan.test.mjs} +1 -1
- package/docs/prototypes/typed-plan.mjs +3 -0
- package/docs/prototypes/{v3-typed-plan.test.mjs → typed-plan.test.mjs} +1 -1
- package/docs/prototypes/{v3-typed-repeat.test.mjs → typed-repeat.test.mjs} +2 -2
- package/docs/{v3-repeated-binding-validation.md → repeated-binding-validation.md} +4 -4
- package/docs/{v3-research-review.md → research-review.md} +2 -2
- package/docs/{v3-review-2026-09-22.md → review-2026-09-22.md} +10 -10
- package/docs/{v3-runtime-extraction.md → runtime-extraction.md} +16 -16
- package/docs/{v3-sample-validation-expanded.md → sample-validation-expanded.md} +5 -5
- package/docs/{v3-sample-validation.md → sample-validation.md} +3 -3
- package/docs/{v3-shape-dimension-contract.md → shape-dimension-contract.md} +12 -12
- package/docs/{v3-shapeassembly-reproduction.md → shapeassembly-reproduction.md} +4 -4
- package/docs/{v3-spatial-contracts.md → spatial-contracts.md} +5 -5
- package/docs/status.md +12 -0
- package/docs/{v3-storage-integration.md → storage-integration.md} +5 -5
- package/docs/{v3-typed-repeat-contracts.md → typed-repeat-contracts.md} +3 -3
- package/package.json +3 -3
- package/dist/v3-asset-types.d.ts.map +0 -1
- package/dist/v3-asset-types.js +0 -2
- package/dist/v3-asset-types.js.map +0 -1
- package/dist/v3-asset.d.ts +0 -8
- package/dist/v3-asset.d.ts.map +0 -1
- package/dist/v3-asset.js.map +0 -1
- package/dist/v3-authoring-actions.d.ts.map +0 -1
- package/dist/v3-authoring-actions.js.map +0 -1
- package/dist/v3-authoring-session.d.ts.map +0 -1
- package/dist/v3-authoring-session.js.map +0 -1
- package/dist/v3-capabilities.d.ts +0 -3
- package/dist/v3-capabilities.d.ts.map +0 -1
- package/dist/v3-capabilities.js.map +0 -1
- package/dist/v3-contract.d.ts +0 -7
- package/dist/v3-contract.d.ts.map +0 -1
- package/dist/v3-contract.js +0 -12
- package/dist/v3-contract.js.map +0 -1
- package/dist/v3-cost.d.ts.map +0 -1
- package/dist/v3-cost.js.map +0 -1
- package/dist/v3-create.js.map +0 -1
- package/dist/v3-document.d.ts +0 -5
- package/dist/v3-document.d.ts.map +0 -1
- package/dist/v3-document.js +0 -31
- package/dist/v3-document.js.map +0 -1
- package/dist/v3-driver.d.ts.map +0 -1
- package/dist/v3-driver.js.map +0 -1
- package/dist/v3-editor-workspace.d.ts.map +0 -1
- package/dist/v3-editor-workspace.js.map +0 -1
- package/dist/v3-examples.d.ts.map +0 -1
- package/dist/v3-examples.js.map +0 -1
- package/dist/v3-follow.d.ts.map +0 -1
- package/dist/v3-follow.js.map +0 -1
- package/dist/v3-gate.d.ts.map +0 -1
- package/dist/v3-gate.js.map +0 -1
- package/dist/v3-graph-types.d.ts.map +0 -1
- package/dist/v3-graph-types.js +0 -2
- package/dist/v3-graph-types.js.map +0 -1
- package/dist/v3-graph.d.ts.map +0 -1
- package/dist/v3-graph.js.map +0 -1
- package/dist/v3-instance-size.d.ts.map +0 -1
- package/dist/v3-instance-size.js.map +0 -1
- package/dist/v3-json.d.ts +0 -12
- package/dist/v3-json.d.ts.map +0 -1
- package/dist/v3-json.js.map +0 -1
- package/dist/v3-kernel-version.d.ts +0 -8
- package/dist/v3-kernel-version.d.ts.map +0 -1
- package/dist/v3-kernel-version.js.map +0 -1
- package/dist/v3-part-edit.d.ts.map +0 -1
- package/dist/v3-part-edit.js.map +0 -1
- package/dist/v3-proposal.d.ts +0 -42
- package/dist/v3-proposal.d.ts.map +0 -1
- package/dist/v3-proposal.js.map +0 -1
- package/dist/v3-public-inputs.d.ts.map +0 -1
- package/dist/v3-public-inputs.js.map +0 -1
- package/dist/v3-recipe-build.d.ts +0 -27
- package/dist/v3-recipe-build.d.ts.map +0 -1
- package/dist/v3-recipe-build.js.map +0 -1
- package/dist/v3-recipe-from-parts.d.ts +0 -8
- package/dist/v3-recipe-from-parts.d.ts.map +0 -1
- package/dist/v3-recipe-from-parts.js.map +0 -1
- package/dist/v3-recipe.d.ts.map +0 -1
- package/dist/v3-recipe.js.map +0 -1
- package/dist/v3-release-contract.d.ts +0 -19
- package/dist/v3-release-contract.d.ts.map +0 -1
- package/dist/v3-release-contract.js.map +0 -1
- package/dist/v3-render-batches.d.ts.map +0 -1
- package/dist/v3-render-batches.js.map +0 -1
- package/dist/v3-score.d.ts.map +0 -1
- package/dist/v3-score.js.map +0 -1
- package/dist/v3-shape-sampling.d.ts.map +0 -1
- package/dist/v3-shape-sampling.js.map +0 -1
- package/dist/v3-surface.d.ts.map +0 -1
- package/dist/v3-surface.js.map +0 -1
- package/dist/v3-words.d.ts.map +0 -1
- package/dist/v3-words.js.map +0 -1
- package/docs/prototypes/v3-asset.mjs +0 -1
- package/docs/prototypes/v3-authoring-session.mjs +0 -1
- package/docs/prototypes/v3-capability-plan.mjs +0 -1
- package/docs/prototypes/v3-document.mjs +0 -2
- package/docs/prototypes/v3-editor-workspace.mjs +0 -1
- package/docs/prototypes/v3-typed-plan.mjs +0 -3
- package/docs/v3-status.md +0 -50
- /package/docs/prototypes/{v3-kernel.mjs → kernel.mjs} +0 -0
- /package/docs/prototypes/{v3-linear-comparison.py → linear-comparison.py} +0 -0
- /package/docs/prototypes/{v3-semantics.test.mjs → semantics.test.mjs} +0 -0
|
@@ -5,22 +5,22 @@
|
|
|
5
5
|
* open. The cases are data, not code: a recipe adds to the proposal grammar only three placeholders (`{id}`, `{target}`,
|
|
6
6
|
* `{<param>}`), a number as a one-parameter linear form (`{ param, times?, plus? }`) and one condition per step
|
|
7
7
|
* (`when: { param, is }`, or `{ param, in: [..] }` for any of several values). There is no expression language. Applied, it is resolved into a proposal and handed to
|
|
8
|
-
* `
|
|
8
|
+
* `applyFigureProposal`: the first step the kernel refuses stops it, with the kernel's own sentence. Inserted, it is ordinary
|
|
9
9
|
* parts -- nothing ties them back to the recipe.
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
11
|
+
import { FigureContractError } from "./contract.js";
|
|
12
|
+
import { applyFigureProposal } from "./proposal.js";
|
|
13
|
+
import { addFigureBox, createFigureAsset } from "./create.js";
|
|
14
|
+
import { applyFigureAuthoring } from "./authoring-actions.js";
|
|
15
|
+
import { inspectFigureAsset } from "./gate.js";
|
|
16
16
|
const KINDS = ['face', 'ratio', 'mm', 'choice', 'flag'];
|
|
17
17
|
const NAME = /^[a-z][a-z0-9-]*$/;
|
|
18
18
|
const fail = (path, message) => {
|
|
19
|
-
throw new
|
|
19
|
+
throw new FigureContractError('RECIPE_SCHEMA', path, message);
|
|
20
20
|
};
|
|
21
21
|
const isObject = (v) => !!v && typeof v === 'object' && !Array.isArray(v);
|
|
22
22
|
/** A recipe as stored, checked for its own form: its parameters, its steps' `when`, its placeholders' names. */
|
|
23
|
-
export function
|
|
23
|
+
export function parseFigureRecipe(value) {
|
|
24
24
|
if (!isObject(value))
|
|
25
25
|
return fail('recipe', 'a recipe is an object');
|
|
26
26
|
const r = value;
|
|
@@ -78,7 +78,7 @@ export function parseV3Recipe(value) {
|
|
|
78
78
|
return r;
|
|
79
79
|
}
|
|
80
80
|
/** Whether a step's `when` holds for these values: its one value (`is`), or any of several (`in`). */
|
|
81
|
-
export function
|
|
81
|
+
export function holdsFigureWhen(when, values) {
|
|
82
82
|
if (!when)
|
|
83
83
|
return true;
|
|
84
84
|
const w = when;
|
|
@@ -122,7 +122,7 @@ function walk(v, path, onString, onLinear) {
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
/** The name a recipe's parts take in this figure: the recipe's name and the first number no part or input uses. */
|
|
125
|
-
export function
|
|
125
|
+
export function figureRecipeIdFor(asset, recipe) {
|
|
126
126
|
const taken = [...asset.appearance.map(a => a.target), ...asset.document.model.inputs.map(i => i.id), ...(asset.joints ?? []).map(j => j.id)];
|
|
127
127
|
for (let n = 1;; n++) {
|
|
128
128
|
const id = `${recipe.name}-${n}`;
|
|
@@ -135,7 +135,7 @@ export function v3RecipeIdFor(asset, recipe) {
|
|
|
135
135
|
* the steps whose `when` does not hold left out, and the placeholders and linear forms resolved. A string that is only
|
|
136
136
|
* `{<param>}` takes the value itself (a number stays a number); inside a longer string it is written in.
|
|
137
137
|
*/
|
|
138
|
-
export function
|
|
138
|
+
export function resolveFigureRecipe(recipe, use) {
|
|
139
139
|
const values = {};
|
|
140
140
|
for (const p of recipe.params) {
|
|
141
141
|
const v = use.values && Object.hasOwn(use.values, p.name) ? use.values[p.name] : p.default;
|
|
@@ -166,7 +166,7 @@ export function resolveV3Recipe(recipe, use) {
|
|
|
166
166
|
};
|
|
167
167
|
return recipe.steps
|
|
168
168
|
.filter(step => {
|
|
169
|
-
return
|
|
169
|
+
return holdsFigureWhen(step.when, values);
|
|
170
170
|
})
|
|
171
171
|
.map(step => {
|
|
172
172
|
const { when: _when, ...rest } = step;
|
|
@@ -174,33 +174,33 @@ export function resolveV3Recipe(recipe, use) {
|
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
176
|
/** A recipe put into a figure: resolved, then applied as one proposal (ADR-0094). The parts it made are named `id`. */
|
|
177
|
-
export function
|
|
178
|
-
const checked =
|
|
177
|
+
export function applyFigureRecipe(asset, recipe, use = {}) {
|
|
178
|
+
const checked = parseFigureRecipe(recipe);
|
|
179
179
|
if (use.target && !asset.appearance.some(a => a.target === use.target))
|
|
180
|
-
throw new
|
|
181
|
-
const id =
|
|
182
|
-
return { asset:
|
|
180
|
+
throw new FigureContractError('TARGET_ABSENT', 'target', `${use.target} is not a part`);
|
|
181
|
+
const id = figureRecipeIdFor(asset, checked);
|
|
182
|
+
return { asset: applyFigureProposal(asset, resolveFigureRecipe(checked, { id, ...use })), id };
|
|
183
183
|
}
|
|
184
184
|
/** The room a recipe is tried in when it is saved: a 4 x 3 x 6 m box on the floor that follows the figure's size. */
|
|
185
|
-
export function
|
|
186
|
-
let asset =
|
|
187
|
-
asset =
|
|
188
|
-
return { asset:
|
|
185
|
+
export function figureRecipeTestRoom() {
|
|
186
|
+
let asset = addFigureBox(createFigureAsset('Recipe check'), { id: 'room', size: { x: 4000, y: 3000, z: 6000 }, position: { x: 0, y: 1500, z: 0 } });
|
|
187
|
+
asset = applyFigureAuthoring(asset, { kind: 'attach', part: 'room', face: 'bottom', to: { plane: 'mounting-plane' } });
|
|
188
|
+
return { asset: applyFigureAuthoring(asset, { kind: 'follow-size', part: 'room' }), target: 'room' };
|
|
189
189
|
}
|
|
190
190
|
/**
|
|
191
191
|
* A recipe's test (ADR-0095): parsed, put into the test room with its defaults, and the result, with its room declared,
|
|
192
192
|
* passing the release gate. Throws the kernel's refusal, or `RECIPE_GATE` with the gate's findings.
|
|
193
193
|
*/
|
|
194
|
-
export function
|
|
195
|
-
const recipe =
|
|
196
|
-
const room =
|
|
197
|
-
const { asset } =
|
|
198
|
-
const findings =
|
|
194
|
+
export function checkFigureRecipe(value) {
|
|
195
|
+
const recipe = parseFigureRecipe(value);
|
|
196
|
+
const room = figureRecipeTestRoom();
|
|
197
|
+
const { asset } = applyFigureRecipe(room.asset, recipe, recipe.target === 'part' ? { target: room.target } : {});
|
|
198
|
+
const findings = inspectFigureAsset(applyFigureProposal(asset, [{ kind: 'fit-room', placement: 'floor' }])).violations;
|
|
199
199
|
if (findings.length)
|
|
200
|
-
throw new
|
|
200
|
+
throw new FigureContractError('RECIPE_GATE', recipe.name, findings.map(f => `${f.code}: ${f.detail}`).join('; '));
|
|
201
201
|
return recipe;
|
|
202
202
|
}
|
|
203
|
-
export function
|
|
203
|
+
export function describeFigureRecipe(recipe) {
|
|
204
204
|
const choosers = recipe.params.filter(p => p.kind === 'choice' || p.kind === 'flag');
|
|
205
205
|
/* Every combination of the choices: a handful, as a recipe has few. */
|
|
206
206
|
let combos = [{}];
|
|
@@ -209,7 +209,7 @@ export function describeV3Recipe(recipe) {
|
|
|
209
209
|
combos = combos.flatMap(c => values.map(v => ({ ...c, [p.name]: v })));
|
|
210
210
|
}
|
|
211
211
|
const holds = (step, values) => {
|
|
212
|
-
return
|
|
212
|
+
return holdsFigureWhen(step.when, values);
|
|
213
213
|
};
|
|
214
214
|
const counts = combos.map(values => recipe.steps.filter(s => s.kind === 'add-part' && holds(s, values)).length);
|
|
215
215
|
const moves = [];
|
|
@@ -239,4 +239,4 @@ export function describeV3Recipe(recipe) {
|
|
|
239
239
|
];
|
|
240
240
|
return { parts: { min: Math.min(...counts), max: Math.max(...counts) }, moves, controls, shownByControl, rows };
|
|
241
241
|
}
|
|
242
|
-
//# sourceMappingURL=
|
|
242
|
+
//# sourceMappingURL=recipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipe.js","sourceRoot":"","sources":["../src/recipe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,mBAAmB,EAA2B,MAAM,eAAe,CAAA;AAC5E,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AA+B9C,MAAM,KAAK,GAAqC,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;AACzF,MAAM,IAAI,GAAG,mBAAmB,CAAA;AAEhC,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,OAAe,EAAS,EAAE;IACpD,MAAM,IAAI,mBAAmB,CAAC,eAAe,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;AAC/D,CAAC,CAAA;AACD,MAAM,QAAQ,GAAG,CAAC,CAAU,EAAgC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;A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,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,CAAA;AACjH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { FigureAsset } from './asset-types.ts';
|
|
2
|
+
export type FigureContractChangeCode = 'placement-changed' | 'size-inputs-gone' | 'size-inputs-added' | 'size-range-narrowed' | 'authored-size-changed' | 'state-input-gone' | 'state-unit-changed' | 'state-range-narrowed' | 'state-input-added' | 'clip-gone' | 'clip-added' | 'binding-gone' | 'binding-role-changed' | 'binding-capacity-reduced' | 'binding-accepts-narrowed' | 'binding-added' | 'capability-gone' | 'capability-added';
|
|
3
|
+
export interface FigureContractChange {
|
|
4
|
+
code: FigureContractChangeCode;
|
|
5
|
+
/** True refuses the release. */
|
|
6
|
+
blocking: boolean;
|
|
7
|
+
/** The input id, clip name, binding id or capability name. Absent for the figure as a whole. */
|
|
8
|
+
subject?: string;
|
|
9
|
+
/** What was measured, for the sentence the service makes. */
|
|
10
|
+
values: Record<string, string | number>;
|
|
11
|
+
/** English, for logs and as the fallback sentence. */
|
|
12
|
+
detail: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The previous release against this one. Both must be assets that parse; the caller checks the new one first and
|
|
16
|
+
* the previous one passed when it was released. An empty list means placed instances are untouched.
|
|
17
|
+
*/
|
|
18
|
+
export declare function figureContractChanges(before: FigureAsset, after: FigureAsset): FigureContractChange[];
|
|
19
|
+
//# sourceMappingURL=release-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release-contract.d.ts","sourceRoot":"","sources":["../src/release-contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAA4B,MAAM,kBAAkB,CAAA;AAgC7E,MAAM,MAAM,wBAAwB,GAChC,mBAAmB,GACnB,kBAAkB,GAClB,mBAAmB,GACnB,qBAAqB,GACrB,uBAAuB,GACvB,kBAAkB,GAClB,oBAAoB,GACpB,sBAAsB,GACtB,mBAAmB,GACnB,WAAW,GACX,YAAY,GACZ,cAAc,GACd,sBAAsB,GACtB,0BAA0B,GAC1B,0BAA0B,GAC1B,eAAe,GACf,iBAAiB,GACjB,kBAAkB,CAAA;AAEtB,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,wBAAwB,CAAA;IAC9B,gCAAgC;IAChC,QAAQ,EAAE,OAAO,CAAA;IACjB,gGAAgG;IAChG,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAA;IACvC,sDAAsD;IACtD,MAAM,EAAE,MAAM,CAAA;CACf;AAuBD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,oBAAoB,EAAE,CAqJrG"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FIGURE_SIZE_INPUTS } from "./words.js";
|
|
2
|
+
import { figurePlacementOf } from "./asset.js";
|
|
2
3
|
const stateInputs = (asset) => new Map(asset.document.model.inputs.filter(i => i.role === 'state').map(i => [i.id, i]));
|
|
3
4
|
const sizeInputs = (asset) => {
|
|
4
|
-
const ids = Object.values(
|
|
5
|
+
const ids = Object.values(FIGURE_SIZE_INPUTS);
|
|
5
6
|
const found = asset.document.model.inputs.filter(i => ids.includes(i.id));
|
|
6
7
|
const allStored = ids.every(id => typeof asset.designInputs[id] === 'number');
|
|
7
8
|
return found.length === ids.length && allStored ? new Map(found.map(i => [i.id, i])) : null;
|
|
@@ -18,12 +19,12 @@ const range = (i) => `${i.min}…${i.max} ${i.unit}`;
|
|
|
18
19
|
* The previous release against this one. Both must be assets that parse; the caller checks the new one first and
|
|
19
20
|
* the previous one passed when it was released. An empty list means placed instances are untouched.
|
|
20
21
|
*/
|
|
21
|
-
export function
|
|
22
|
+
export function figureContractChanges(before, after) {
|
|
22
23
|
const changes = [];
|
|
23
24
|
const push = (change) => changes.push(change);
|
|
24
25
|
/* ── placement ─────────────────────────────────────────────────────────── */
|
|
25
|
-
const wasPlacement = before
|
|
26
|
-
const nowPlacement = after
|
|
26
|
+
const wasPlacement = figurePlacementOf(before);
|
|
27
|
+
const nowPlacement = figurePlacementOf(after);
|
|
27
28
|
if (wasPlacement !== nowPlacement) {
|
|
28
29
|
push({
|
|
29
30
|
code: 'placement-changed',
|
|
@@ -59,7 +60,7 @@ export function v3ContractChanges(before, after) {
|
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
|
-
const authored = (a) => Object.values(
|
|
63
|
+
const authored = (a) => Object.values(FIGURE_SIZE_INPUTS).map(id => a.designInputs[id]);
|
|
63
64
|
const [bx, by, bz] = authored(before);
|
|
64
65
|
const [ax, ay, az] = authored(after);
|
|
65
66
|
if (bx !== ax || by !== ay || bz !== az) {
|
|
@@ -176,4 +177,4 @@ function acceptsDropped(was, now) {
|
|
|
176
177
|
return [];
|
|
177
178
|
return was.accepts.filter(type => !now.accepts.includes(type));
|
|
178
179
|
}
|
|
179
|
-
//# sourceMappingURL=
|
|
180
|
+
//# sourceMappingURL=release-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release-contract.js","sourceRoot":"","sources":["../src/release-contract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AA6D9C,MAAM,WAAW,GAAG,CAAC,KAAkB,EAAE,EAAE,CACzC,IAAI,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAU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enderBatch {
|
|
3
3
|
/** Stays the same while the copies' shape and look do: a renderer keeps its instanced mesh by it. */
|
|
4
4
|
key: string;
|
|
5
5
|
/** The member the copies copy (the row's part, or a part it carries). */
|
|
@@ -8,17 +8,17 @@ export interface V3RenderBatch {
|
|
|
8
8
|
ids: string[];
|
|
9
9
|
}
|
|
10
10
|
/** Why copies of one member are drawn one by one. */
|
|
11
|
-
export type
|
|
12
|
-
export interface
|
|
13
|
-
batches:
|
|
11
|
+
export type FigureUnbatchedReason = 'one-copy' | 'copies-differ';
|
|
12
|
+
export interface FigureRenderPlan {
|
|
13
|
+
batches: FigureRenderBatch[];
|
|
14
14
|
/** Bodies drawn one by one: a part not in a row, or a copy that could not join a batch. */
|
|
15
15
|
alone: string[];
|
|
16
16
|
/** The members whose copies are drawn one by one, and why. */
|
|
17
17
|
unbatched: Array<{
|
|
18
18
|
member: string;
|
|
19
19
|
ids: string[];
|
|
20
|
-
reason:
|
|
20
|
+
reason: FigureUnbatchedReason;
|
|
21
21
|
}>;
|
|
22
22
|
}
|
|
23
|
-
export declare function
|
|
24
|
-
//# sourceMappingURL=
|
|
23
|
+
export declare function figureRenderBatchesOf(geometry: readonly FigureAssetGeometry[]): FigureRenderPlan;
|
|
24
|
+
//# sourceMappingURL=render-batches.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-batches.d.ts","sourceRoot":"","sources":["../src/render-batches.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAG3D,MAAM,WAAW,iBAAiB;IAChC,qGAAqG;IACrG,GAAG,EAAE,MAAM,CAAA;IACX,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAA;IACd,wGAAwG;IACxG,GAAG,EAAE,MAAM,EAAE,CAAA;CACd;AAED,qDAAqD;AACrD,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,eAAe,CAAA;AAEhE,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,iBAAiB,EAAE,CAAA;IAC5B,2FAA2F;IAC3F,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,8DAA8D;IAC9D,SAAS,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,EAAE,CAAC;QAAC,MAAM,EAAE,qBAAqB,CAAA;KAAE,CAAC,CAAA;CACnF;AAMD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,SAAS,mBAAmB,EAAE,GAAG,gBAAgB,CAiChG"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { figureMaterialKeyOf } from "./score.js";
|
|
5
5
|
/** What must be equal for two copies to be one draw: the shape as drawn and the look. */
|
|
6
|
-
const signatureOf = (body) => JSON.stringify([body.shape.provider, body.shape.dimensions, body.segments ?? null,
|
|
7
|
-
export function
|
|
6
|
+
const signatureOf = (body) => JSON.stringify([body.shape.provider, body.shape.dimensions, body.segments ?? null, figureMaterialKeyOf(body), body.visible !== false]);
|
|
7
|
+
export function figureRenderBatchesOf(geometry) {
|
|
8
8
|
const alone = [];
|
|
9
9
|
const members = new Map();
|
|
10
10
|
for (const body of geometry) {
|
|
@@ -38,4 +38,4 @@ export function v3RenderBatchesOf(geometry) {
|
|
|
38
38
|
}
|
|
39
39
|
return { batches, alone, unbatched };
|
|
40
40
|
}
|
|
41
|
-
//# sourceMappingURL=
|
|
41
|
+
//# sourceMappingURL=render-batches.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-batches.js","sourceRoot":"","sources":["../src/render-batches.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAsBhD,yFAAyF;AACzF,MAAM,WAAW,GAAG,CAAC,IAA+F,EAAU,EAAE,CAC9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ACnC,WAAW,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;QAC9E,CAAC;QACD,KAAK,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,IAAI,WAAW,EAAE,CAAC;YAC3C,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACnB,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,MAAM,IAAI,SAAS,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAA;gBAC5D,SAAQ;YACV,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAA;YAClB,SAAS,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAA;QAC7F,CAAC;IACH,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAA;AACtC,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { FigureAsset, FigurePlacement } from './asset-types.ts';
|
|
2
|
+
import type { FigureAuthoringAction, FigureFace } from './authoring-actions.ts';
|
|
3
|
+
import { type Axis } from './words.ts';
|
|
4
|
+
export interface FigureResizeRequest {
|
|
5
|
+
part: string;
|
|
6
|
+
/** The measures to follow; every one the shape can edit on its own when left out. */
|
|
7
|
+
axes?: Axis[];
|
|
8
|
+
/**
|
|
9
|
+
* For a part whose kept face is not on the plane: `keep` its distance -- above the floor, or reaching through it on
|
|
10
|
+
* purpose -- or bring the face onto the `plane`. Left out, a part off the plane is not planned: the author chooses,
|
|
11
|
+
* with the distance in hand (designer 2026-09-27: 「바닥에 붙여」 reads as touching; a gap may be meant, and so may a part
|
|
12
|
+
* reaching through).
|
|
13
|
+
*/
|
|
14
|
+
gap?: 'keep' | 'plane';
|
|
15
|
+
/** The author's "and replace how its position is worked out": for a position read from their own value or an expression. */
|
|
16
|
+
replacePosition?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export type FigureResizeRefusalCode = 'TARGET_ABSENT' | 'HELD' | 'TURNED' | 'UNIFORM_POLICY' | 'SHAPE_EDIT' | 'DIMENSION_RULE' | 'POSITION_RULE' | 'GAP_CHOICE' | 'NO_FACE' | 'COMMAND_REFUSED';
|
|
19
|
+
export interface FigureResizePlan {
|
|
20
|
+
part: string;
|
|
21
|
+
mode: FigurePlacement;
|
|
22
|
+
/** The face the placement keeps, or none for a centre placement: it keeps the position the author gave. */
|
|
23
|
+
face?: FigureFace;
|
|
24
|
+
/** The commands, in order, to apply as one proposal. Empty when refused. */
|
|
25
|
+
steps: FigureAuthoringAction[];
|
|
26
|
+
/** What stays as the author set it: a measure already following the size, a position field. */
|
|
27
|
+
keeps: string[];
|
|
28
|
+
/** Inputs the plan replaces by the relation it makes: the position field along the plane's normal, and the turn fields. */
|
|
29
|
+
replaces: string[];
|
|
30
|
+
/** Where the part moves at its drawn size, when the author chose to bring it onto the plane. Empty otherwise. */
|
|
31
|
+
moves: Array<{
|
|
32
|
+
axis: Axis;
|
|
33
|
+
from: number;
|
|
34
|
+
to: number;
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* Fields the part stops reading that the declared room still reads: the room was declared from them, and it does not
|
|
38
|
+
* follow the part's new rule until it is declared again. The plan does not widen it (ADR-0097 §6); it says so.
|
|
39
|
+
*/
|
|
40
|
+
roomReads: string[];
|
|
41
|
+
refusal?: {
|
|
42
|
+
code: FigureResizeRefusalCode;
|
|
43
|
+
reason: string;
|
|
44
|
+
/** The request field that would let the plan go ahead, when there is one. */
|
|
45
|
+
choice?: 'gap' | 'replacePosition';
|
|
46
|
+
/**
|
|
47
|
+
* The axis it is about, and for GAP_CHOICE the distance of the kept face from the plane: positive standing off it,
|
|
48
|
+
* negative reaching through it. For the screen's own words.
|
|
49
|
+
*/
|
|
50
|
+
axis?: Axis;
|
|
51
|
+
mm?: number;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** The face each placement keeps, and the axis the plane faces along. The ceiling and the floor are Y = 0, a wall Z = 0. */
|
|
55
|
+
export declare const KEPT_FACE: Record<FigurePlacement, {
|
|
56
|
+
face: FigureFace;
|
|
57
|
+
normal: Axis;
|
|
58
|
+
outward: 1 | -1;
|
|
59
|
+
} | undefined>;
|
|
60
|
+
export declare function planFigureResize(asset: FigureAsset, request: FigureResizeRequest): FigureResizePlan;
|
|
61
|
+
//# sourceMappingURL=resize-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resize-plan.d.ts","sourceRoot":"","sources":["../src/resize-plan.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACpE,OAAO,KAAK,EAAE,qBAAqB,EAAuB,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAQpG,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,YAAY,CAAA;AAE5C,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,qFAAqF;IACrF,IAAI,CAAC,EAAE,IAAI,EAAE,CAAA;IACb;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACtB,4HAA4H;IAC5H,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED,MAAM,MAAM,uBAAuB,GAC/B,eAAe,GACf,MAAM,GACN,QAAQ,GACR,gBAAgB,GAChB,YAAY,GACZ,gBAAgB,GAChB,eAAe,GACf,YAAY,GACZ,SAAS,GACT,iBAAiB,CAAA;AAErB,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,eAAe,CAAA;IACrB,2GAA2G;IAC3G,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,4EAA4E;IAC5E,KAAK,EAAE,qBAAqB,EAAE,CAAA;IAC9B,+FAA+F;IAC/F,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,2HAA2H;IAC3H,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,iHAAiH;IACjH,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACtD;;;OAGG;IACH,SAAS,EAAE,MAAM,EAAE,CAAA;IACnB,OAAO,CAAC,EAAE;QACR,IAAI,EAAE,uBAAuB,CAAA;QAC7B,MAAM,EAAE,MAAM,CAAA;QACd,6EAA6E;QAC7E,MAAM,CAAC,EAAE,KAAK,GAAG,iBAAiB,CAAA;QAClC;;;WAGG;QACH,IAAI,CAAC,EAAE,IAAI,CAAA;QACX,EAAE,CAAC,EAAE,MAAM,CAAA;KACZ,CAAA;CACF;AAID,4HAA4H;AAC5H,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,eAAe,EAAE;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;CAAE,GAAG,SAAS,CAK9G,CAAA;AAID,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,mBAAmB,GAAG,gBAAgB,CAqInG"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { applyFigureAuthoring } from "./authoring-actions.js";
|
|
2
|
+
import { figurePlacementOf, upgradeFigurePlacement } from "./asset.js";
|
|
3
|
+
import { compileFigureGraph } from "./graph.js";
|
|
4
|
+
import { figurePartsExtentOf } from "./gate.js";
|
|
5
|
+
import { defaultInstanceSizeRange, foldInstanceSizeRange, figureInstanceSizeLimitsOf, FIGURE_INSTANCE_SIZE_INPUTS } from "./instance-size.js";
|
|
6
|
+
import { figureFollowOf } from "./follow.js";
|
|
7
|
+
import { figureShapeProviderOf, figureFollowableAxesOf } from "./shape-provider.js";
|
|
8
|
+
import { AXES } from "./words.js";
|
|
9
|
+
/** The face each placement keeps, and the axis the plane faces along. The ceiling and the floor are Y = 0, a wall Z = 0. */
|
|
10
|
+
export const KEPT_FACE = {
|
|
11
|
+
floor: { face: 'bottom', normal: 'y', outward: 1 },
|
|
12
|
+
ceiling: { face: 'top', normal: 'y', outward: -1 },
|
|
13
|
+
wall: { face: 'back', normal: 'z', outward: 1 },
|
|
14
|
+
center: undefined
|
|
15
|
+
};
|
|
16
|
+
const round6 = (v) => Math.round(v * 1e6) / 1e6;
|
|
17
|
+
export function planFigureResize(asset, request) {
|
|
18
|
+
asset = upgradeFigurePlacement(asset);
|
|
19
|
+
const mode = figurePlacementOf(asset);
|
|
20
|
+
const kept = KEPT_FACE[mode];
|
|
21
|
+
const plan = { part: request.part, mode, ...(kept ? { face: kept.face } : {}), steps: [], keeps: [], replaces: [], moves: [], roomReads: [] };
|
|
22
|
+
const refuse = (code, reason, choice, about = {}) => ({
|
|
23
|
+
...plan,
|
|
24
|
+
steps: [],
|
|
25
|
+
keeps: [],
|
|
26
|
+
replaces: [],
|
|
27
|
+
moves: [],
|
|
28
|
+
roomReads: [],
|
|
29
|
+
refusal: { code, reason, ...(choice ? { choice } : {}), ...about }
|
|
30
|
+
});
|
|
31
|
+
const m = asset.document.model;
|
|
32
|
+
const node = (id) => m.nodes.find((n) => n.id === id);
|
|
33
|
+
const part = request.part;
|
|
34
|
+
const place = node(part);
|
|
35
|
+
if (!place || (place.op !== 'place@1' && place.op !== 'member@1'))
|
|
36
|
+
return refuse('TARGET_ABSENT', `${part} is not a part`);
|
|
37
|
+
if (place.op === 'member@1')
|
|
38
|
+
return refuse('HELD', `${part} is a copy in a row; its row places it`);
|
|
39
|
+
const shape = m.nodes.find((n) => Object.values(n.outputs ?? {}).includes(place.args[0]));
|
|
40
|
+
const pose = node(`${part}.pose`);
|
|
41
|
+
if (!shape || pose?.op !== 'rigid@1')
|
|
42
|
+
return refuse('TARGET_ABSENT', `${part} has no shape and pose this plan can read`);
|
|
43
|
+
/* What the author set stays theirs: a joint, a fastening, a figure that grows by one ratio. */
|
|
44
|
+
const joint = (asset.joints ?? []).find((j) => j.body1?.part === part);
|
|
45
|
+
if (joint)
|
|
46
|
+
return refuse('HELD', `${part} is fastened (${joint.id}); edit that joint to change how it stands`);
|
|
47
|
+
if (node(`${part}.chain`) || node(`${part}.seat.rigid`))
|
|
48
|
+
return refuse('HELD', `${part} is fastened; edit its fastening to change how it stands`);
|
|
49
|
+
if (asset.sizing === 'uniform')
|
|
50
|
+
return refuse('UNIFORM_POLICY', 'this figure grows by one ratio; change that policy before giving a part its own size rule');
|
|
51
|
+
const values = compileFigureGraph(m).evaluate({ ...asset.designInputs, ...asset.stateDefaults }).values;
|
|
52
|
+
const input = (ref) => m.inputs.find((i) => i.id === ref);
|
|
53
|
+
const constant = (ref) => m.constants.find((c) => c.id === ref);
|
|
54
|
+
const turn = pose.args.slice(3, 6).map(ref => (constant(ref) ? constant(ref).value : input(ref)?.role === 'design' ? asset.designInputs[ref] : undefined));
|
|
55
|
+
if (turn.some(t => t !== 0))
|
|
56
|
+
return refuse('TURNED', `${part} is turned (${turn.map((t, i) => `${AXES[i].toUpperCase()} ${t ?? '?'}°`).join(', ')}); this plan does not turn or fix a turn`);
|
|
57
|
+
/* The measures: what the shape can edit, each read back as it is worked out now. */
|
|
58
|
+
const provider = figureShapeProviderOf(shape.op);
|
|
59
|
+
const editable = figureFollowableAxesOf(shape.op);
|
|
60
|
+
const axes = request.axes ?? editable;
|
|
61
|
+
if (!axes.length)
|
|
62
|
+
return refuse('SHAPE_EDIT', `${part} is a ${shape.op}; following the figure's size is not offered for it`);
|
|
63
|
+
for (const axis of axes) {
|
|
64
|
+
if (!editable.includes(axis))
|
|
65
|
+
return refuse('SHAPE_EDIT', `${part} is a ${shape.op}; following the figure's size along ${axis} is not offered for it`);
|
|
66
|
+
const edit = provider.edit[axis];
|
|
67
|
+
/*
|
|
68
|
+
Linking reads a shape's measure along X, Y and Z at its first three arguments. Shapes whose measure is elsewhere or
|
|
69
|
+
moves with another (an elliptic cylinder's length, a frustum's two ends) are not linked by this plan yet.
|
|
70
|
+
*/
|
|
71
|
+
if (edit.arg !== AXES.indexOf(axis) || edit.with?.length)
|
|
72
|
+
return refuse('SHAPE_EDIT', `${part} is a ${shape.op}; following the size along ${axis} is not supported for it yet`);
|
|
73
|
+
}
|
|
74
|
+
const link = [];
|
|
75
|
+
const stopsReading = [];
|
|
76
|
+
for (const axis of axes) {
|
|
77
|
+
const now = figureFollowOf(asset, part, axis);
|
|
78
|
+
if (now.of === 'own') {
|
|
79
|
+
link.push(axis);
|
|
80
|
+
const was = node(`${part}.dimension.${axis}`)?.args?.[0] ?? shape.args[AXES.indexOf(axis)];
|
|
81
|
+
if (input(was))
|
|
82
|
+
stopsReading.push(was);
|
|
83
|
+
}
|
|
84
|
+
else if (now.of === 'instance' && now.axis === axis)
|
|
85
|
+
plan.keeps.push(`${part}.${axis} follows size.${axis}`);
|
|
86
|
+
else
|
|
87
|
+
return refuse('DIMENSION_RULE', `${part}'s ${axis} follows ${now.of === 'input' ? now.input : now.of === 'part' ? `${now.part}'s ${now.axis}` : now.of === 'instance' ? `size.${now.axis}` : 'a rule of its own'}; edit that rule itself to change it`);
|
|
88
|
+
}
|
|
89
|
+
/* The fastening: the kept face at the gap it has now, and the place across the plane as the author set it. */
|
|
90
|
+
let fasten;
|
|
91
|
+
if (kept) {
|
|
92
|
+
const face = provider?.faces[kept.face];
|
|
93
|
+
if (!face || face.axis !== kept.normal)
|
|
94
|
+
return refuse('NO_FACE', `${part} is a ${shape.op}; it has no flat ${kept.face} face to keep on the ${mode === 'wall' ? 'wall' : mode}`);
|
|
95
|
+
const at = (axis) => values[pose.args[AXES.indexOf(axis)]];
|
|
96
|
+
const plane = face.plane.reduce((sum, p) => sum + p.k * values[shape.args[p.arg]], 0);
|
|
97
|
+
/* How far the face stands out of the plane: a bottom above the floor, a top below the ceiling, a back off the wall. */
|
|
98
|
+
let gap = round6(kept.outward * (at(kept.normal) + plane));
|
|
99
|
+
/* Touching, it is fastened as it is. Off the plane or through it, the author says which: both are meant sometimes. */
|
|
100
|
+
if (gap !== 0) {
|
|
101
|
+
if (request.gap === undefined)
|
|
102
|
+
return refuse('GAP_CHOICE', `${part}'s ${kept.face} is ${gap > 0 ? `${gap} mm off` : `${-gap} mm through`} the ${mode}; keep that distance, or bring it onto the plane`, 'gap', { axis: kept.normal, mm: gap });
|
|
103
|
+
if (request.gap === 'plane') {
|
|
104
|
+
plan.moves.push({ axis: kept.normal, from: round6(at(kept.normal)), to: round6(at(kept.normal) - kept.outward * gap) });
|
|
105
|
+
gap = 0;
|
|
106
|
+
}
|
|
107
|
+
else if (request.gap !== 'keep')
|
|
108
|
+
return refuse('COMMAND_REFUSED', `${String(request.gap)} is neither keep nor plane`);
|
|
109
|
+
}
|
|
110
|
+
const normalRef = pose.args[AXES.indexOf(kept.normal)];
|
|
111
|
+
const ownField = (ref) => ref.startsWith(`${part}.`) && input(ref)?.role === 'design';
|
|
112
|
+
if (!constant(normalRef) && !ownField(normalRef) && !request.replacePosition)
|
|
113
|
+
return refuse('POSITION_RULE', `${part}'s ${kept.normal} position is worked out from ${input(normalRef) ? normalRef : 'an expression'}; keeping its ${kept.face} on the plane replaces that`, 'replacePosition', { axis: kept.normal });
|
|
114
|
+
if (input(normalRef))
|
|
115
|
+
plan.replaces.push(normalRef);
|
|
116
|
+
const align = {};
|
|
117
|
+
for (const axis of AXES.filter(a => a !== kept.normal)) {
|
|
118
|
+
const ref = pose.args[AXES.indexOf(axis)];
|
|
119
|
+
if (constant(ref))
|
|
120
|
+
align[axis] = { mm: constant(ref).value };
|
|
121
|
+
else if (input(ref)?.role === 'design') {
|
|
122
|
+
align[axis] = { mm: { from: { of: 'input', input: ref } } };
|
|
123
|
+
plan.keeps.push(ref);
|
|
124
|
+
}
|
|
125
|
+
else if (request.replacePosition)
|
|
126
|
+
align[axis] = { mm: round6(at(axis)) };
|
|
127
|
+
else
|
|
128
|
+
return refuse('POSITION_RULE', `${part}'s ${axis} position is worked out from an expression; fastening it would fix it at ${round6(at(axis))}`, 'replacePosition', { axis });
|
|
129
|
+
}
|
|
130
|
+
/*
|
|
131
|
+
A fastened part's turn is its joint record's (ADR-0093): its own turn fields give way to it, at the turn they hold
|
|
132
|
+
now -- nothing turns, but the fields go, and the plan says so before it is applied (browser check 2026-09-27).
|
|
133
|
+
*/
|
|
134
|
+
for (const ref of pose.args.slice(3, 6))
|
|
135
|
+
if (input(ref))
|
|
136
|
+
plan.replaces.push(ref);
|
|
137
|
+
fasten = { kind: 'attach', part, face: kept.face, to: { plane: 'mounting-plane' }, ...(gap ? { gap } : {}), align };
|
|
138
|
+
}
|
|
139
|
+
else
|
|
140
|
+
plan.keeps.push(...pose.args.slice(0, 3).filter(ref => input(ref)));
|
|
141
|
+
/* Worked out on a copy, in the order the commands need: a size to follow, the measures, then the face. */
|
|
142
|
+
let candidate = asset;
|
|
143
|
+
const step = (s) => {
|
|
144
|
+
candidate = applyFigureAuthoring(candidate, s);
|
|
145
|
+
plan.steps.push(s);
|
|
146
|
+
};
|
|
147
|
+
try {
|
|
148
|
+
const declared = AXES.filter(axis => asset.document.model.inputs.some((i) => i.id === FIGURE_INSTANCE_SIZE_INPUTS[axis]));
|
|
149
|
+
if (link.length && declared.length < 3) {
|
|
150
|
+
const at = figurePartsExtentOf(asset);
|
|
151
|
+
const start = defaultInstanceSizeRange(at);
|
|
152
|
+
const range = foldInstanceSizeRange(start, figureInstanceSizeLimitsOf(asset, start)).range;
|
|
153
|
+
step({ kind: 'declare-instance-size', at, range, replace: declared.length > 0 });
|
|
154
|
+
}
|
|
155
|
+
for (const axis of link) {
|
|
156
|
+
const measure = values[shape.args[AXES.indexOf(axis)]];
|
|
157
|
+
const size = candidate.designInputs[FIGURE_INSTANCE_SIZE_INPUTS[axis]];
|
|
158
|
+
step({ kind: 'link-dimension', part, axis, source: { of: 'instance', axis }, times: measure / size, narrowRange: true });
|
|
159
|
+
}
|
|
160
|
+
if (fasten)
|
|
161
|
+
step(fasten);
|
|
162
|
+
plan.roomReads = [...stopsReading, ...plan.replaces].filter(roomReading(candidate));
|
|
163
|
+
}
|
|
164
|
+
catch (e) {
|
|
165
|
+
const error = e;
|
|
166
|
+
return refuse('COMMAND_REFUSED', `${error.code ?? ''} ${String(error.message ?? e)}`.trim());
|
|
167
|
+
}
|
|
168
|
+
return plan;
|
|
169
|
+
}
|
|
170
|
+
/** Whether the declared room is worked out from a value: the room's bounds, followed back through the graph. */
|
|
171
|
+
function roomReading(asset) {
|
|
172
|
+
const m = asset.document.model;
|
|
173
|
+
const bounds = asset.occupancy?.bounds;
|
|
174
|
+
const read = new Set();
|
|
175
|
+
const walk = (ref) => {
|
|
176
|
+
if (read.has(ref))
|
|
177
|
+
return;
|
|
178
|
+
read.add(ref);
|
|
179
|
+
const writer = m.nodes.find((n) => Object.values(n.outputs ?? {}).includes(ref));
|
|
180
|
+
for (const arg of writer?.args ?? [])
|
|
181
|
+
walk(arg);
|
|
182
|
+
};
|
|
183
|
+
for (const axis of AXES)
|
|
184
|
+
if (bounds?.[axis])
|
|
185
|
+
for (const end of ['min', 'max'])
|
|
186
|
+
walk(bounds[axis][end]);
|
|
187
|
+
return ref => read.has(ref);
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=resize-plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resize-plan.js","sourceRoot":"","sources":["../src/resize-plan.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY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