@things-factory/figure-ui 10.1.74 → 10.1.76
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/client/figure-assistant.ts +3 -3
- package/client/graphql/{v3-store.ts → store.ts} +6 -6
- package/client/modeller/{v3-ai-proposal.ts → ai-proposal.ts} +8 -8
- package/client/modeller/{v3-align.ts → align.ts} +14 -14
- package/client/modeller/{v3-canvas.ts → canvas.ts} +13 -13
- package/client/modeller/{v3-clips.ts → clips.ts} +5 -5
- package/client/modeller/{v3-controls.ts → controls.ts} +2 -2
- package/client/modeller/{v3-editor.ts → editor.ts} +137 -126
- package/client/modeller/{figure-v3-capability.ts → figure-capability-panel.ts} +7 -7
- package/client/modeller/{figure-v3-clips.ts → figure-clips.ts} +10 -10
- package/client/modeller/{figure-v3-controls.ts → figure-controls.ts} +9 -9
- package/client/modeller/{v3-figure-facts.ts → figure-facts.ts} +11 -11
- package/client/modeller/{figure-v3-first-save.ts → figure-first-save.ts} +3 -3
- package/client/modeller/figure-history-panel.ts +1 -1
- package/client/modeller/{figure-v3-links.ts → figure-links.ts} +35 -35
- package/client/modeller/{figure-v3-material.ts → figure-material-panel.ts} +20 -20
- package/client/modeller/{figure-v3-parts.ts → figure-parts.ts} +15 -15
- package/client/modeller/{figure-v3-preview.ts → figure-preview.ts} +14 -14
- package/client/modeller/{figure-v3-properties.ts → figure-properties.ts} +25 -25
- package/client/modeller/{figure-v3-recipe-catalog.ts → figure-recipe-catalog.ts} +10 -10
- package/client/modeller/{figure-v3-verdict.ts → figure-verdict.ts} +24 -24
- package/client/modeller/gate-findings.ts +2 -2
- package/client/modeller/{v3-gizmo.ts → gizmo.ts} +11 -11
- package/client/modeller/{v3-joint-drag.ts → joint-drag.ts} +11 -11
- package/client/modeller/{v3-joint-fan.ts → joint-fan.ts} +13 -13
- package/client/modeller/{v3-links.ts → links.ts} +59 -59
- package/client/modeller/{v3-live.ts → live.ts} +9 -9
- package/client/modeller/{v3-maturity.ts → maturity.ts} +65 -65
- package/client/modeller/modeller-route.ts +1 -1
- package/client/modeller/{v3-occupancy.ts → occupancy.ts} +6 -6
- package/client/modeller/{v3-palette.ts → palette.ts} +3 -3
- package/client/modeller/{v3-preview-model.ts → preview-model.ts} +8 -8
- package/client/modeller/{v3-product-session.ts → product-session.ts} +25 -25
- package/client/modeller/{v3-recipe-source.ts → recipe-source.ts} +2 -2
- package/client/modeller/{v3-recipes.ts → recipes.ts} +9 -9
- package/client/modeller/{v3-refusals.ts → refusals.ts} +62 -13
- package/client/modeller/{v3-renderer.ts → renderer.ts} +16 -16
- package/client/modeller/{v3-stage-model.ts → stage-model.ts} +15 -15
- package/client/modeller/{v3-thumbnail.ts → thumbnail.ts} +8 -8
- package/client/pages/figure-list-page.ts +4 -4
- package/client/pages/{figure-v3-modeller-page.ts → figure-modeller-page.ts} +37 -37
- package/client/route.ts +1 -5
- package/dist-client/figure-assistant.js +3 -3
- package/dist-client/figure-assistant.js.map +1 -1
- package/dist-client/graphql/store.d.ts +3 -0
- package/dist-client/graphql/store.js +39 -0
- package/dist-client/graphql/store.js.map +1 -0
- package/dist-client/modeller/ai-proposal.d.ts +51 -0
- package/dist-client/modeller/ai-proposal.js +64 -0
- package/dist-client/modeller/ai-proposal.js.map +1 -0
- package/dist-client/modeller/align.d.ts +30 -0
- package/dist-client/modeller/align.js +75 -0
- package/dist-client/modeller/align.js.map +1 -0
- package/dist-client/modeller/canvas.d.ts +72 -0
- package/dist-client/modeller/canvas.js +379 -0
- package/dist-client/modeller/canvas.js.map +1 -0
- package/dist-client/modeller/clips.d.ts +39 -0
- package/dist-client/modeller/clips.js +58 -0
- package/dist-client/modeller/clips.js.map +1 -0
- package/dist-client/modeller/controls.d.ts +28 -0
- package/dist-client/modeller/controls.js +28 -0
- package/dist-client/modeller/controls.js.map +1 -0
- package/dist-client/modeller/editor.d.ts +203 -0
- package/dist-client/modeller/editor.js +1526 -0
- package/dist-client/modeller/editor.js.map +1 -0
- package/dist-client/modeller/fields.d.ts +45 -0
- package/dist-client/modeller/fields.js +83 -0
- package/dist-client/modeller/fields.js.map +1 -0
- package/dist-client/modeller/figure-capability-panel.d.ts +22 -0
- package/dist-client/modeller/figure-capability-panel.js +141 -0
- package/dist-client/modeller/figure-capability-panel.js.map +1 -0
- package/dist-client/modeller/figure-clips.d.ts +31 -0
- package/dist-client/modeller/figure-clips.js +268 -0
- package/dist-client/modeller/figure-clips.js.map +1 -0
- package/dist-client/modeller/figure-controls.d.ts +36 -0
- package/dist-client/modeller/figure-controls.js +226 -0
- package/dist-client/modeller/figure-controls.js.map +1 -0
- package/dist-client/modeller/figure-facts.d.ts +35 -0
- package/dist-client/modeller/figure-facts.js +55 -0
- package/dist-client/modeller/figure-facts.js.map +1 -0
- package/dist-client/modeller/figure-first-save.d.ts +20 -0
- package/dist-client/modeller/figure-first-save.js +118 -0
- package/dist-client/modeller/figure-first-save.js.map +1 -0
- package/dist-client/modeller/figure-history-panel.d.ts +1 -1
- package/dist-client/modeller/figure-history-panel.js.map +1 -1
- package/dist-client/modeller/figure-links.d.ts +77 -0
- package/dist-client/modeller/figure-links.js +649 -0
- package/dist-client/modeller/figure-links.js.map +1 -0
- package/dist-client/modeller/figure-material-panel.d.ts +39 -0
- package/dist-client/modeller/figure-material-panel.js +323 -0
- package/dist-client/modeller/figure-material-panel.js.map +1 -0
- package/dist-client/modeller/figure-parts.d.ts +69 -0
- package/dist-client/modeller/figure-parts.js +559 -0
- package/dist-client/modeller/figure-parts.js.map +1 -0
- package/dist-client/modeller/figure-preview.d.ts +34 -0
- package/dist-client/modeller/figure-preview.js +346 -0
- package/dist-client/modeller/figure-preview.js.map +1 -0
- package/dist-client/modeller/figure-properties.d.ts +45 -0
- package/dist-client/modeller/figure-properties.js +239 -0
- package/dist-client/modeller/figure-properties.js.map +1 -0
- package/dist-client/modeller/figure-recipe-catalog.d.ts +38 -0
- package/dist-client/modeller/figure-recipe-catalog.js +399 -0
- package/dist-client/modeller/figure-recipe-catalog.js.map +1 -0
- package/dist-client/modeller/figure-verdict.d.ts +64 -0
- package/dist-client/modeller/figure-verdict.js +787 -0
- package/dist-client/modeller/figure-verdict.js.map +1 -0
- package/dist-client/modeller/first-save.d.ts +17 -0
- package/dist-client/modeller/first-save.js +26 -0
- package/dist-client/modeller/first-save.js.map +1 -0
- package/dist-client/modeller/gate-findings.d.ts +2 -2
- package/dist-client/modeller/gate-findings.js +2 -2
- package/dist-client/modeller/gate-findings.js.map +1 -1
- package/dist-client/modeller/gizmo.d.ts +72 -0
- package/dist-client/modeller/gizmo.js +111 -0
- package/dist-client/modeller/gizmo.js.map +1 -0
- package/dist-client/modeller/help.d.ts +18 -0
- package/dist-client/modeller/help.js +37 -0
- package/dist-client/modeller/help.js.map +1 -0
- package/dist-client/modeller/joint-drag.d.ts +19 -0
- package/dist-client/modeller/joint-drag.js +97 -0
- package/dist-client/modeller/joint-drag.js.map +1 -0
- package/dist-client/modeller/joint-fan.d.ts +9 -0
- package/dist-client/modeller/joint-fan.js +276 -0
- package/dist-client/modeller/joint-fan.js.map +1 -0
- package/dist-client/modeller/keys.d.ts +22 -0
- package/dist-client/modeller/keys.js +26 -0
- package/dist-client/modeller/keys.js.map +1 -0
- package/dist-client/modeller/links.d.ts +267 -0
- package/dist-client/modeller/links.js +480 -0
- package/dist-client/modeller/links.js.map +1 -0
- package/dist-client/modeller/live.d.ts +37 -0
- package/dist-client/modeller/live.js +68 -0
- package/dist-client/modeller/live.js.map +1 -0
- package/dist-client/modeller/maturity.d.ts +120 -0
- package/dist-client/modeller/maturity.js +313 -0
- package/dist-client/modeller/maturity.js.map +1 -0
- package/dist-client/modeller/modeller-route.d.ts +1 -1
- package/dist-client/modeller/modeller-route.js +1 -1
- package/dist-client/modeller/modeller-route.js.map +1 -1
- package/dist-client/modeller/occupancy.d.ts +18 -0
- package/dist-client/modeller/occupancy.js +24 -0
- package/dist-client/modeller/occupancy.js.map +1 -0
- package/dist-client/modeller/palette.d.ts +7 -0
- package/dist-client/modeller/palette.js +46 -0
- package/dist-client/modeller/palette.js.map +1 -0
- package/dist-client/modeller/preview-model.d.ts +47 -0
- package/dist-client/modeller/preview-model.js +68 -0
- package/dist-client/modeller/preview-model.js.map +1 -0
- package/dist-client/modeller/product-session.d.ts +510 -0
- package/dist-client/modeller/product-session.js +157 -0
- package/dist-client/modeller/product-session.js.map +1 -0
- package/dist-client/modeller/recipe-source.d.ts +8 -0
- package/dist-client/modeller/recipe-source.js +14 -0
- package/dist-client/modeller/recipe-source.js.map +1 -0
- package/dist-client/modeller/recipes.d.ts +37 -0
- package/dist-client/modeller/recipes.js +103 -0
- package/dist-client/modeller/recipes.js.map +1 -0
- package/dist-client/modeller/refusals.d.ts +68 -0
- package/dist-client/modeller/refusals.js +142 -0
- package/dist-client/modeller/refusals.js.map +1 -0
- package/dist-client/modeller/renderer.d.ts +40 -0
- package/dist-client/modeller/renderer.js +73 -0
- package/dist-client/modeller/renderer.js.map +1 -0
- package/dist-client/modeller/stage-model.d.ts +39 -0
- package/dist-client/modeller/stage-model.js +147 -0
- package/dist-client/modeller/stage-model.js.map +1 -0
- package/dist-client/modeller/thumbnail.d.ts +3 -0
- package/dist-client/modeller/thumbnail.js +75 -0
- package/dist-client/modeller/thumbnail.js.map +1 -0
- package/dist-client/modeller/v3-clips.d.ts +1 -1
- package/dist-client/modeller/v3-editor.d.ts +5 -0
- package/dist-client/modeller/v3-editor.js +21 -10
- package/dist-client/modeller/v3-editor.js.map +1 -1
- package/dist-client/modeller/v3-product-session.d.ts +31 -0
- package/dist-client/modeller/v3-refusals.d.ts +37 -5
- package/dist-client/modeller/v3-refusals.js +59 -16
- package/dist-client/modeller/v3-refusals.js.map +1 -1
- package/dist-client/pages/figure-list-page.d.ts +1 -1
- package/dist-client/pages/figure-list-page.js +4 -4
- package/dist-client/pages/figure-list-page.js.map +1 -1
- package/dist-client/pages/figure-modeller-page.d.ts +102 -0
- package/dist-client/pages/figure-modeller-page.js +548 -0
- package/dist-client/pages/figure-modeller-page.js.map +1 -0
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +1 -5
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/docs/product-cutover.md +25 -0
- package/package.json +5 -5
- package/test/{v3-ai-proposal.test.ts → ai-proposal.test.ts} +6 -6
- package/test/{v3-align.test.ts → align.test.ts} +8 -8
- package/test/browser/modeller-page.js +30 -30
- package/test/browser/modeller.check.mjs +17 -16
- package/test/browser/serve.mjs +1 -1
- package/test/browser/thumbnail-page.js +6 -6
- package/test/{v3-clips.test.ts → clips.test.ts} +18 -18
- package/test/{v3-controls.test.ts → controls.test.ts} +15 -15
- package/test/{v3-fields.test.ts → fields.test.ts} +13 -13
- package/test/figure-assistant-surface.test.ts +3 -3
- package/test/{v3-first-save.test.ts → first-save.test.ts} +10 -10
- package/test/fixtures/joint-column.json +2 -2
- package/test/fixtures/joint-roller.json +2 -2
- package/test/fixtures/robot-arm-6dof.json +2 -2
- package/test/{v3-gizmo.test.ts → gizmo.test.ts} +33 -33
- package/test/{v3-joint-drag.test.ts → joint-drag.test.ts} +17 -17
- package/test/{v3-joint-fan.test.ts → joint-fan.test.ts} +18 -18
- package/test/joints.ts +6 -6
- package/test/{v3-keys.test.ts → keys.test.ts} +2 -2
- package/test/{v3-layout.test.ts → layout.test.ts} +8 -8
- package/test/{v3-links.test.ts → links.test.ts} +201 -201
- package/test/{v3-live.test.ts → live.test.ts} +18 -18
- package/test/{v3-material.test.ts → material.test.ts} +12 -12
- package/test/{v3-maturity.test.ts → maturity.test.ts} +74 -74
- package/test/modeller-route.test.ts +5 -6
- package/test/{v3-palette-icons.test.ts → palette-icons.test.ts} +1 -1
- package/test/{v3-parts-wiring.test.ts → parts-wiring.test.ts} +11 -7
- package/test/{v3-preview.test.ts → preview.test.ts} +12 -12
- package/test/{v3-product-session.test.ts → product-session.test.ts} +17 -17
- package/test/{v3-product-write.test.ts → product-write.test.ts} +20 -20
- package/test/{v3-properties.test.ts → properties.test.ts} +24 -24
- package/test/{v3-recipes.test.ts → recipes.test.ts} +10 -10
- package/test/refusals.test.ts +166 -0
- package/test/{v3-release-panel.test.ts → release-panel.test.ts} +21 -21
- package/test/renderer.test.ts +24 -0
- package/test/resolve-ts-siblings.mjs +1 -1
- package/test/{v3-scene-canvas.test.ts → scene-canvas.test.ts} +6 -6
- package/test/{v3-stage-model.test.ts → stage-model.test.ts} +5 -5
- package/test/{v3-theme.test.ts → theme.test.ts} +4 -4
- package/test/{v3-thumbnail.test.ts → thumbnail.test.ts} +4 -4
- package/test/{v3-verdict.test.ts → verdict.test.ts} +17 -17
- package/test/{v3-view.test.ts → view.test.ts} +2 -2
- package/things-factory.config.js +2 -3
- package/translations/en.json +15 -7
- package/translations/ja.json +15 -7
- package/translations/ko.json +15 -7
- package/translations/ms.json +15 -7
- package/translations/zh.json +15 -7
- package/docs/v3-product-cutover.md +0 -25
- package/test/v3-refusals.test.ts +0 -136
- package/test/v3-renderer.test.ts +0 -24
- /package/client/modeller/{v3-fields.ts → fields.ts} +0 -0
- /package/client/modeller/{v3-first-save.ts → first-save.ts} +0 -0
- /package/client/modeller/{v3-help.ts → help.ts} +0 -0
- /package/client/modeller/{v3-keys.ts → keys.ts} +0 -0
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import type { FigureFollow, FigureSizeRange } from '@hatiolab/figure-model';
|
|
2
|
+
import type { FigureAsset, FigureBindingPlace, FigureFace, FigureJoint } from '@hatiolab/figure-model';
|
|
3
|
+
export type Axis = 'x' | 'y' | 'z';
|
|
4
|
+
export declare const AXES: readonly Axis[];
|
|
5
|
+
/** What one dimension of a part is worked out from (figure-model's `FigureFollow`). */
|
|
6
|
+
export type Follow = FigureFollow;
|
|
7
|
+
/**
|
|
8
|
+
* `link-dimension` routes a part's dimension through `<part>.dimension.<axis>` and points its first argument at the
|
|
9
|
+
* source, directly or through the nodes that scale it. Walking back through those nodes finds the source: the
|
|
10
|
+
* instance size (`size.<axis>`), another part's dimension (`<part>.dimension.<axis>.value`) or a declared input.
|
|
11
|
+
*/
|
|
12
|
+
/** What one measure of a part is worked out from, read back from the graph (figure-model's reader, one copy). */
|
|
13
|
+
export declare function followOf(asset: FigureAsset, part: string, axis: Axis): Follow;
|
|
14
|
+
/** Whether the asset declares an instance size on an axis — only then can a dimension follow it. */
|
|
15
|
+
export declare const hasInstanceSize: (asset: FigureAsset, axis: Axis) => boolean;
|
|
16
|
+
/** The part this one is fastened to, or `null`. The mounting plane counts as fastened (the model names no part). */
|
|
17
|
+
export declare function fastenedTo(asset: FigureAsset, part: string): string | null;
|
|
18
|
+
/**
|
|
19
|
+
* What holds a part: the part it is fastened to, the plane the figure is mounted on, or nothing. The joint record says
|
|
20
|
+
* it; a part standing on the plane had read as fastened to nothing, so the form offered no way to move it and sent
|
|
21
|
+
* no replace -- the fastening was refused as already made (the door's post, 2026-09-25).
|
|
22
|
+
*/
|
|
23
|
+
export declare function heldBy(asset: FigureAsset, part: string): {
|
|
24
|
+
part: string;
|
|
25
|
+
} | {
|
|
26
|
+
plane: true;
|
|
27
|
+
} | null;
|
|
28
|
+
/** Whether a dimension of this part can follow something — box-shaped, whose three sizes are X, Y and Z. */
|
|
29
|
+
export declare function canFollow(asset: FigureAsset, part: string): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* The axes whose size can follow something, by the shape's own measures: a box's X · Y · Z; a cylinder's radius (read
|
|
32
|
+
* as X) and length (Y) -- its shape takes those two, so it has no Z of its own.
|
|
33
|
+
*/
|
|
34
|
+
export declare function followableAxes(asset: FigureAsset, part: string): Axis[];
|
|
35
|
+
/** What a part's own measure on an axis is now (a box's side, a cylinder's radius or length), at the design as it stands. */
|
|
36
|
+
export declare function dimensionNow(asset: FigureAsset, part: string, axis: Axis): number | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* The flat faces a part's shape declares, by name -- figure-model's shape definitions are the one place they are
|
|
39
|
+
* written (a portal's opening sides as well as its outer faces). A sphere has none.
|
|
40
|
+
*/
|
|
41
|
+
export declare function facesOf(asset: FigureAsset, part: string): string[];
|
|
42
|
+
/** The axis a face of a part faces along, from the same definitions. */
|
|
43
|
+
export declare function faceAxisOf(asset: FigureAsset, part: string, face: string): Axis | undefined;
|
|
44
|
+
/** Whether `attach` can take this part: any part whose shape has a flat face. */
|
|
45
|
+
export declare function canFasten(asset: FigureAsset, part: string): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* The axes a part can be made a row along (r3 §8, figure-model `make-repeat`): across the face it is fastened by, when
|
|
48
|
+
* it is fastened fixed to another part and holds nothing. None for a part that is loose, moves, stands on the floor or
|
|
49
|
+
* already repeats -- the command would refuse those, so they are not offered.
|
|
50
|
+
*/
|
|
51
|
+
export declare function rowAxesOf(asset: FigureAsset, part: string): Axis[];
|
|
52
|
+
/** The row a part is made into, as its fastening's record keeps it. */
|
|
53
|
+
export declare const rowOf: (asset: FigureAsset, part: string) => {
|
|
54
|
+
axis: import("@hatiolab/figure-model").FigureJointAxis;
|
|
55
|
+
pitch: import("@hatiolab/figure-model").FigureMeasure;
|
|
56
|
+
count?: number;
|
|
57
|
+
rise?: {
|
|
58
|
+
axis: import("@hatiolab/figure-model").FigureJointAxis;
|
|
59
|
+
mm: number;
|
|
60
|
+
};
|
|
61
|
+
} | undefined;
|
|
62
|
+
/** Where a part sits across the face it is fastened to, on one axis: centred, level with an edge, or a distance off centre. */
|
|
63
|
+
/** `share`: the distance as a share of the figure's size on that axis, so it keeps its place when the figure is resized. */
|
|
64
|
+
export type Alignment = 'centre' | 'min' | 'max' | 'mm' | 'share';
|
|
65
|
+
/**
|
|
66
|
+
* The axes across the face a part is fastened to — the two a fastening does not set by itself. Edges to line up with
|
|
67
|
+
* are offered where both parts have their two outer faces on that axis; the plane the figure is mounted on has none,
|
|
68
|
+
* so on it (X and Z) only centred or a distance is offered.
|
|
69
|
+
*/
|
|
70
|
+
/**
|
|
71
|
+
* The mounting plane of this figure, by its placement (ADR-0093): the floor or the ceiling is Y = 0 and a part stands
|
|
72
|
+
* on it by its bottom or hangs from it by its top; a wall is Z = 0 and a part is fastened to it by its back.
|
|
73
|
+
*/
|
|
74
|
+
export declare function mountingPlaneOf(asset: FigureAsset): {
|
|
75
|
+
normal: Axis;
|
|
76
|
+
faces: FigureFace[];
|
|
77
|
+
};
|
|
78
|
+
export declare function alignAxesOf(asset: FigureAsset, part: string, target: {
|
|
79
|
+
part: string;
|
|
80
|
+
face: string;
|
|
81
|
+
} | 'plane', twisted?: boolean): {
|
|
82
|
+
axis: Axis;
|
|
83
|
+
edges: boolean;
|
|
84
|
+
}[];
|
|
85
|
+
/** The controls a part's showing can follow: the figure's state inputs, with their range and label. */
|
|
86
|
+
export declare function visibilityControlsOf(asset: FigureAsset): Array<{
|
|
87
|
+
id: string;
|
|
88
|
+
unit: string;
|
|
89
|
+
min: number;
|
|
90
|
+
max: number;
|
|
91
|
+
label: string;
|
|
92
|
+
}>;
|
|
93
|
+
/** When the part is drawn (figure-model `set-visibility`): always (null), or while a control is at least a value. */
|
|
94
|
+
export declare function shownWhenOf(asset: FigureAsset, part: string): {
|
|
95
|
+
input: string;
|
|
96
|
+
atLeast: number;
|
|
97
|
+
} | null;
|
|
98
|
+
/** Whether `part` hangs from `from`, through any number of fastenings. */
|
|
99
|
+
export declare function hangsFrom(asset: FigureAsset, part: string, from: string): boolean;
|
|
100
|
+
/**
|
|
101
|
+
* The fastening a part has, as the fastening form holds it -- so the form opens on what is there (the face, including
|
|
102
|
+
* \`centre\`, the target and its face, the gap, the twist and where across the face) and a change is a change to that.
|
|
103
|
+
* Opening it on the defaults showed a roller fastened by its centre as fastened by its bottom, and fastening again
|
|
104
|
+
* from there broke its turning in place (walk 1, 2026-09-26). Null for a part fastened to nothing.
|
|
105
|
+
*/
|
|
106
|
+
export declare function fasteningOf(asset: FigureAsset, part: string): {
|
|
107
|
+
face: string;
|
|
108
|
+
toPlane: boolean;
|
|
109
|
+
target: string;
|
|
110
|
+
targetFace: string;
|
|
111
|
+
facing: 'meet' | 'flush';
|
|
112
|
+
gap: number;
|
|
113
|
+
twist: number;
|
|
114
|
+
align: Partial<Record<Axis, Alignment>>;
|
|
115
|
+
alignMm: Partial<Record<Axis, number>>;
|
|
116
|
+
} | null;
|
|
117
|
+
/**
|
|
118
|
+
* The alignment that keeps the part where it stands when it is fastened: on each axis across the face, its distance
|
|
119
|
+
* from the target's centre (the plane's is the origin). Fastening used to centre it -- a door set 100 mm in front of
|
|
120
|
+
* its frame slid into it (2026-09-26). Left centred where it already is, and where the target stands turned.
|
|
121
|
+
*/
|
|
122
|
+
export declare function placeKeptOf(asset: FigureAsset, part: string, target: {
|
|
123
|
+
part: string;
|
|
124
|
+
face: string;
|
|
125
|
+
} | 'plane', twisted?: boolean): {
|
|
126
|
+
align: Partial<Record<Axis, Alignment>>;
|
|
127
|
+
alignMm: Partial<Record<Axis, number>>;
|
|
128
|
+
};
|
|
129
|
+
/** The `align` of an attach command from the form's choices: only the axes across that face, and centred ones left out. */
|
|
130
|
+
export declare function alignOf(asset: FigureAsset, part: string, target: {
|
|
131
|
+
part: string;
|
|
132
|
+
face: string;
|
|
133
|
+
} | 'plane', how: Partial<Record<Axis, Alignment>>, mm: Partial<Record<Axis, number>>, twisted?: boolean): Partial<Record<Axis, "min" | "max" | {
|
|
134
|
+
mm: number | {
|
|
135
|
+
from: {
|
|
136
|
+
of: "instance";
|
|
137
|
+
axis: Axis;
|
|
138
|
+
};
|
|
139
|
+
times: number;
|
|
140
|
+
};
|
|
141
|
+
}>> | undefined;
|
|
142
|
+
/**
|
|
143
|
+
* The axes on which the part's position is worked out from other values rather than being its own number. `fix-position` makes one its own number where it is now.
|
|
144
|
+
*/
|
|
145
|
+
export declare function positionsWorkedOut(asset: FigureAsset, part: string): Axis[];
|
|
146
|
+
/**
|
|
147
|
+
* Whether the part's position on an axis is a share of the instance size (`scale-position`): `size.<axis> × share`.
|
|
148
|
+
* Such a position is worked out too, but it already grows with the figure, so it is not offered again.
|
|
149
|
+
*/
|
|
150
|
+
export declare function positionIsShare(asset: FigureAsset, part: string, axis: Axis): boolean;
|
|
151
|
+
/** How a part moves, if it does: slide or turn, along which axis, driven by which control. */
|
|
152
|
+
export interface Motion {
|
|
153
|
+
kind: 'slide' | 'turn' | 'continuous';
|
|
154
|
+
axis: Axis | '?';
|
|
155
|
+
control?: {
|
|
156
|
+
id: string;
|
|
157
|
+
unit?: string;
|
|
158
|
+
min?: number;
|
|
159
|
+
max?: number;
|
|
160
|
+
};
|
|
161
|
+
/** A joint that moves with another (URDF's mimic): the leader's value times `multiplier`, plus `offset`. */
|
|
162
|
+
follows?: {
|
|
163
|
+
joint: string;
|
|
164
|
+
multiplier: number;
|
|
165
|
+
offset?: number;
|
|
166
|
+
};
|
|
167
|
+
/** A slide whose distance is a part's length (plus a difference): the control is its share. */
|
|
168
|
+
travel?: {
|
|
169
|
+
part: string;
|
|
170
|
+
axis: string;
|
|
171
|
+
plus?: number;
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
export declare function motionOf(asset: FigureAsset, part: string): Motion | undefined;
|
|
175
|
+
/** What the motion form holds: how the part moves, and either its own control or the joint it moves with. */
|
|
176
|
+
export interface MotionForm {
|
|
177
|
+
kind: 'slide' | 'turn' | 'continuous';
|
|
178
|
+
axis: Axis;
|
|
179
|
+
id: string;
|
|
180
|
+
min: number;
|
|
181
|
+
max: number;
|
|
182
|
+
/** The joint this one moves with; empty for a joint with its own control. */
|
|
183
|
+
follow: string;
|
|
184
|
+
multiplier: number;
|
|
185
|
+
offset: number;
|
|
186
|
+
/**
|
|
187
|
+
* A slide whose distance follows a part's length (figure-model `travel`): `<part>:<axis>`, empty for a distance in
|
|
188
|
+
* millimetres. The control is then the share of that length, 0..1, and the stroke grows when the part does.
|
|
189
|
+
*/
|
|
190
|
+
travel?: string;
|
|
191
|
+
travelPlus?: number;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* The motion form filled from a joint as it is, so a motion can be changed where it is -- its range, the length it
|
|
195
|
+
* travels by, what it follows -- rather than taken away and made again. Taking it away is refused while another joint
|
|
196
|
+
* follows it, which left a leader's stroke fixed for good (the telescopic conveyor, 2026-09-25).
|
|
197
|
+
*/
|
|
198
|
+
export declare function motionFormOf(joint: FigureJoint): MotionForm;
|
|
199
|
+
/**
|
|
200
|
+
* The joints a part's joint can move with (URDF's mimic): a joint that moves the same way — a slide follows a slide, a
|
|
201
|
+
* turn a turn — and has a control of its own, since a follower follows the joint that is driven.
|
|
202
|
+
*/
|
|
203
|
+
export declare function leadersFor(asset: FigureAsset, part: string, kind: MotionForm['kind']): FigureJoint[];
|
|
204
|
+
/**
|
|
205
|
+
* The joint record the motion form writes for a part fastened by `joint`. A joint of its own gets its limits (none for
|
|
206
|
+
* a turn without end, as in USD) and a control; a follower gets the leader, the multiplier and the offset, and no
|
|
207
|
+
* control or limits of its own — its range is the leader's times the multiplier.
|
|
208
|
+
*/
|
|
209
|
+
export declare function motionJoint(joint: FigureJoint, m: MotionForm, part: string): FigureJoint;
|
|
210
|
+
/** The select's value for what a dimension follows now. */
|
|
211
|
+
export declare function choiceOf(follow: Follow): string;
|
|
212
|
+
/** The faces a place can sit on for this part: a box's six, a rounded box's top and bottom, none for a round body. */
|
|
213
|
+
export declare function placeFacesOf(asset: FigureAsset, part: string): FigureFace[];
|
|
214
|
+
/** The places things are held that sit on this part. */
|
|
215
|
+
export declare function placesOn(asset: FigureAsset, part: string): FigureBindingPlace[];
|
|
216
|
+
/** An id for a new place on this part, not yet taken: `<part>-<role>`, then `-2`, `-3`. */
|
|
217
|
+
export declare function placeIdFor(asset: FigureAsset, part: string, role: 'seat' | 'grip'): string;
|
|
218
|
+
/**
|
|
219
|
+
* Whether a board will hand this figure anything: a place is a slot only on a figure that declares it holds things
|
|
220
|
+
* (`Capacity`, or `FlowNode`, which includes it). Without it the places are declared and nothing arrives.
|
|
221
|
+
*/
|
|
222
|
+
export declare const holdsThings: (asset: FigureAsset) => boolean;
|
|
223
|
+
/** What `accepts` a person typed: names split on commas, trimmed, blanks and repeats dropped. */
|
|
224
|
+
export declare const acceptsOf: (typed: string) => string[];
|
|
225
|
+
/**
|
|
226
|
+
* The sizes a board may give this figure: the range it declares now, and the range measured afresh -- the default
|
|
227
|
+
* (1 mm to ten times the authored size) narrowed only where the figure cannot follow, by figure-model's own functions.
|
|
228
|
+
* A range measured when a part filled what the others left (ROBOT_ARM: Y from 1,854 mm) stays narrow after the part is
|
|
229
|
+
* made to grow with the figure; measuring again gives the figure its whole range back. Nothing when no size is declared.
|
|
230
|
+
*/
|
|
231
|
+
export declare function instanceRangeOf(asset: FigureAsset): {
|
|
232
|
+
declared: FigureSizeRange;
|
|
233
|
+
measured: FigureSizeRange;
|
|
234
|
+
} | undefined;
|
|
235
|
+
/**
|
|
236
|
+
* The size range to declare for a figure that has none yet: its parts' extent now as the size it is authored at, and
|
|
237
|
+
* as wide as its parts allow around it (the same measure 「다시 재기」 uses). Undefined when the figure already has a
|
|
238
|
+
* size or has nothing to measure. Without a declared size a board cannot resize the figure, and no part is offered
|
|
239
|
+
* to follow its size -- every figure made in the modeller was left there (user, 2026-09-25).
|
|
240
|
+
*/
|
|
241
|
+
export declare function instanceRangeToDeclare(asset: FigureAsset): {
|
|
242
|
+
range: FigureSizeRange;
|
|
243
|
+
at: Record<Axis, number>;
|
|
244
|
+
} | undefined;
|
|
245
|
+
/** Whether measuring again would change the declared range (to a micrometre). */
|
|
246
|
+
/**
|
|
247
|
+
* The declared range with one end typed by the author: the sizes a figure may be placed at are a claim about the
|
|
248
|
+
* product (a gantry spans metres, not 30 cm to 29 m), and measuring only ever widens them. Nothing when the typed
|
|
249
|
+
* value is not a number; whether the figure holds there is the command's to say.
|
|
250
|
+
*/
|
|
251
|
+
export declare function rangeWith(declared: FigureSizeRange, axis: Axis, bound: 'min' | 'max', value: number): FigureSizeRange | undefined;
|
|
252
|
+
/**
|
|
253
|
+
* For a figure that grows by one ratio: how many of its lengths would follow the ratio, and which it leaves with their
|
|
254
|
+
* own number (not those that follow another length -- they grow with it). Nothing for a figure of another sizing.
|
|
255
|
+
*/
|
|
256
|
+
export declare function proportionToFollow(asset: FigureAsset): {
|
|
257
|
+
count: number;
|
|
258
|
+
kept: string[];
|
|
259
|
+
} | undefined;
|
|
260
|
+
/** A value of the figure as it stands, by its graph reference. */
|
|
261
|
+
export declare function valueNow(asset: FigureAsset, ref: string | undefined): number | undefined;
|
|
262
|
+
export declare function rangeDiffers(a: FigureSizeRange, b: FigureSizeRange): boolean;
|
|
263
|
+
/**
|
|
264
|
+
* Whether the figure is a mechanism -- a part turns about a joint. Such a figure should grow by one ratio (chief
|
|
265
|
+
* architect's ruling 2026-09-24); the modeller proposes it, the author declares it.
|
|
266
|
+
*/
|
|
267
|
+
export declare function turnsAboutAJoint(asset: FigureAsset): boolean;
|