@hatiolab/figure-model 0.1.95 → 0.2.0
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 +14 -0
- package/dist/asset.d.ts.map +1 -1
- package/dist/asset.js +3 -1
- package/dist/asset.js.map +1 -1
- package/dist/authoring-actions.d.ts +19 -0
- package/dist/authoring-actions.d.ts.map +1 -1
- package/dist/authoring-actions.js +106 -63
- package/dist/authoring-actions.js.map +1 -1
- package/dist/command-preview.d.ts +3 -1
- package/dist/command-preview.d.ts.map +1 -1
- package/dist/command-preview.js +52 -27
- package/dist/command-preview.js.map +1 -1
- package/dist/cost.d.ts +1 -1
- package/dist/cost.d.ts.map +1 -1
- package/dist/cost.js +30 -25
- package/dist/cost.js.map +1 -1
- package/dist/create.d.ts.map +1 -1
- package/dist/create.js +112 -31
- package/dist/create.js.map +1 -1
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +3 -2
- package/dist/document.js.map +1 -1
- package/dist/fixtures/shape-nodes.d.ts +12 -0
- package/dist/fixtures/shape-nodes.d.ts.map +1 -0
- package/dist/fixtures/shape-nodes.js +20 -0
- package/dist/fixtures/shape-nodes.js.map +1 -0
- package/dist/follow.d.ts.map +1 -1
- package/dist/follow.js +5 -2
- package/dist/follow.js.map +1 -1
- package/dist/gate.d.ts.map +1 -1
- package/dist/gate.js +31 -59
- package/dist/gate.js.map +1 -1
- package/dist/graph-types.d.ts +7 -6
- package/dist/graph-types.d.ts.map +1 -1
- package/dist/graph.d.ts +17 -12
- package/dist/graph.d.ts.map +1 -1
- package/dist/graph.js +24 -292
- package/dist/graph.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/kernel-version.d.ts +1 -1
- package/dist/kernel-version.d.ts.map +1 -1
- package/dist/kernel-version.js +1 -1
- package/dist/kernel-version.js.map +1 -1
- package/dist/part-edit.d.ts.map +1 -1
- package/dist/part-edit.js +8 -6
- package/dist/part-edit.js.map +1 -1
- package/dist/proposal.d.ts +1 -1
- package/dist/proposal.d.ts.map +1 -1
- package/dist/proposal.js +14 -2
- package/dist/proposal.js.map +1 -1
- package/dist/recipe-from-parts.d.ts.map +1 -1
- package/dist/recipe-from-parts.js +107 -24
- package/dist/recipe-from-parts.js.map +1 -1
- package/dist/render-batches.d.ts.map +1 -1
- package/dist/render-batches.js +11 -2
- package/dist/render-batches.js.map +1 -1
- package/dist/resize-plan.d.ts.map +1 -1
- package/dist/resize-plan.js +22 -8
- package/dist/resize-plan.js.map +1 -1
- package/dist/section.d.ts +164 -0
- package/dist/section.d.ts.map +1 -0
- package/dist/section.js +277 -0
- package/dist/section.js.map +1 -0
- package/dist/shape-edit.d.ts +22 -0
- package/dist/shape-edit.d.ts.map +1 -0
- package/dist/shape-edit.js +225 -0
- package/dist/shape-edit.js.map +1 -0
- package/dist/shape-features.d.ts +83 -0
- package/dist/shape-features.d.ts.map +1 -0
- package/dist/shape-features.js +102 -0
- package/dist/shape-features.js.map +1 -0
- package/dist/shape-ops.d.ts +154 -0
- package/dist/shape-ops.d.ts.map +1 -0
- package/dist/shape-ops.js +571 -0
- package/dist/shape-ops.js.map +1 -0
- package/dist/shape-provider.d.ts +16 -23
- package/dist/shape-provider.d.ts.map +1 -1
- package/dist/shape-provider.js +18 -56
- package/dist/shape-provider.js.map +1 -1
- package/dist/shape-sampling.d.ts +0 -8
- package/dist/shape-sampling.d.ts.map +1 -1
- package/dist/shape-sampling.js +67 -101
- package/dist/shape-sampling.js.map +1 -1
- package/dist/size-edit.js +2 -2
- package/dist/size-edit.js.map +1 -1
- package/dist/surface.d.ts.map +1 -1
- package/dist/surface.js +10 -17
- package/dist/surface.js.map +1 -1
- package/dist/words.d.ts +7 -0
- package/dist/words.d.ts.map +1 -1
- package/dist/words.js +7 -0
- package/dist/words.js.map +1 -1
- package/docs/document-contract.md +1 -1
- package/docs/shape-contract.md +439 -0
- package/package.json +1 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { type Axis } from './words.ts';
|
|
2
|
+
import { type FigureCavityRefusal, type FigureSection } from './section.ts';
|
|
3
|
+
/** A straight push of a section along one of the part's axes, from `start` to `end` on it (`start < end`), evaluated. */
|
|
4
|
+
export interface FigureExtrusion {
|
|
5
|
+
axis: Axis;
|
|
6
|
+
section: FigureSection;
|
|
7
|
+
start: number;
|
|
8
|
+
end: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* An inside space of an extrusion, parallel to its axis (ADR-0100 §4.3): walls in from each flat side of the section,
|
|
12
|
+
* and at each end either open -- the cavity reaches that face -- or closed by the thickness left there. Open or closed
|
|
13
|
+
* is written, never inferred from two numbers happening to agree.
|
|
14
|
+
*/
|
|
15
|
+
export interface FigureCavity {
|
|
16
|
+
id: string;
|
|
17
|
+
wall: Record<string, number>;
|
|
18
|
+
start: 'open' | {
|
|
19
|
+
closed: number;
|
|
20
|
+
};
|
|
21
|
+
end: 'open' | {
|
|
22
|
+
closed: number;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export type FigureFeature =
|
|
26
|
+
/** A flat face: it can be fastened to. `normal` points out of the material, in the part's frame. */
|
|
27
|
+
{
|
|
28
|
+
id: string;
|
|
29
|
+
kind: 'plane';
|
|
30
|
+
normal: Record<Axis, number>;
|
|
31
|
+
open?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/** A curved face: never taken for a plane. */
|
|
34
|
+
| {
|
|
35
|
+
id: string;
|
|
36
|
+
kind: 'curved';
|
|
37
|
+
} | {
|
|
38
|
+
id: string;
|
|
39
|
+
kind: 'edge';
|
|
40
|
+
} | {
|
|
41
|
+
id: string;
|
|
42
|
+
kind: 'point';
|
|
43
|
+
};
|
|
44
|
+
export type FigureExtrusionRefusal = {
|
|
45
|
+
code: 'SPAN_NOT_POSITIVE';
|
|
46
|
+
} | {
|
|
47
|
+
code: 'CAVITY';
|
|
48
|
+
cavity: string;
|
|
49
|
+
refused: FigureCavityRefusal;
|
|
50
|
+
side?: string;
|
|
51
|
+
}
|
|
52
|
+
/** The thicknesses left at the two ends leave the cavity no length. */
|
|
53
|
+
| {
|
|
54
|
+
code: 'CAVITY_NO_LENGTH';
|
|
55
|
+
cavity: string;
|
|
56
|
+
} | {
|
|
57
|
+
code: 'CAVITY_END_NOT_POSITIVE';
|
|
58
|
+
cavity: string;
|
|
59
|
+
end: 'start' | 'end';
|
|
60
|
+
}
|
|
61
|
+
/** Only one cavity per part in the first contract (docs/shape-contract.md §3). */
|
|
62
|
+
| {
|
|
63
|
+
code: 'CAVITY_COUNT';
|
|
64
|
+
count: number;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Every feature of an extrusion and its cavity, or why the pair is not a shape. The section must be valid and written
|
|
68
|
+
* the kernel's one way (`normalizeFigureSection`): the normals of a drawn section's sides read its winding.
|
|
69
|
+
*
|
|
70
|
+
* start-face / end-face the two ends; `open` when the cavity reaches through it (its rim is all that is left)
|
|
71
|
+
* side-face:<side> each side of the section pushed along the axis
|
|
72
|
+
* edge:start:<side> / edge:end:<side> where a side meets an end
|
|
73
|
+
* edge:<point> a drawn section's corner, along the axis; a sharp rectangle's is edge:<corner>
|
|
74
|
+
* cavity-wall:<cavity>:<side> the inside of each wall, facing into the cavity
|
|
75
|
+
* cavity-start:<cavity> / cavity-end:<cavity> the face closing the cavity at that end, when it is closed
|
|
76
|
+
* centre the middle of the part's span on its axis, at the section's origin
|
|
77
|
+
*/
|
|
78
|
+
export declare function figureExtrusionFeaturesOf(extrusion: FigureExtrusion, cavities?: readonly FigureCavity[]): {
|
|
79
|
+
features: FigureFeature[];
|
|
80
|
+
} | {
|
|
81
|
+
refused: FigureExtrusionRefusal;
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=shape-features.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shape-features.d.ts","sourceRoot":"","sources":["../src/shape-features.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EAAE,MAAM,CAAA;CAAE;AACjF,uEAAuE;GACrE;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,yBAAyB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,OAAO,GAAG,KAAK,CAAA;CAAE;AAC3E,kFAAkF;GAChF;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AA4B3C;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,eAAe,EAC1B,QAAQ,GAAE,SAAS,YAAY,EAAO,GACrC;IAAE,QAAQ,EAAE,aAAa,EAAE,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,sBAAsB,CAAA;CAAE,CAuDrE"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/*
|
|
5
|
+
* The named features of a pushed section (ADR-0100 §4.1.1, docs/shape-contract.md §4): the faces, edges and points
|
|
6
|
+
* the shape operation itself defines, which a fastening, a joint, a size rule, a material or a capability may refer
|
|
7
|
+
* to. Their ids come from the section's own point and side names and from the cavity's id -- never from a triangle
|
|
8
|
+
* number or a place in a list -- so a renderer cannot invent one and an edit that keeps the topology keeps them all.
|
|
9
|
+
*/
|
|
10
|
+
import { AXES } from "./words.js";
|
|
11
|
+
import { FIGURE_SECTION_PLANE, figureCavitySectionOf, figureSectionSidesOf } from "./section.js";
|
|
12
|
+
const vec = (axis, k) => Object.fromEntries(AXES.map(a => [a, a === axis ? k : 0]));
|
|
13
|
+
/** The outward normal of a flat side, in the part's frame. */
|
|
14
|
+
function sideNormal(section, axis, side) {
|
|
15
|
+
const [u, v] = FIGURE_SECTION_PLANE[axis];
|
|
16
|
+
if (section.kind !== 'polygon') {
|
|
17
|
+
const a = side.id.slice(0, -1);
|
|
18
|
+
return vec(a, side.id.endsWith('+') ? 1 : -1);
|
|
19
|
+
}
|
|
20
|
+
/* A counter-clockwise loop seen from +n has the material on its left: the outside is the direction's right turn. */
|
|
21
|
+
const p = section.points.find(q => q.id === side.from), q = section.points.find(r => r.id === side.to);
|
|
22
|
+
const du = q[u] - p[u], dv = q[v] - p[v], l = Math.hypot(du, dv);
|
|
23
|
+
const n = { x: 0, y: 0, z: 0 };
|
|
24
|
+
n[u] = dv / l || 0;
|
|
25
|
+
n[v] = -du / l || 0;
|
|
26
|
+
return n;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Every feature of an extrusion and its cavity, or why the pair is not a shape. The section must be valid and written
|
|
30
|
+
* the kernel's one way (`normalizeFigureSection`): the normals of a drawn section's sides read its winding.
|
|
31
|
+
*
|
|
32
|
+
* start-face / end-face the two ends; `open` when the cavity reaches through it (its rim is all that is left)
|
|
33
|
+
* side-face:<side> each side of the section pushed along the axis
|
|
34
|
+
* edge:start:<side> / edge:end:<side> where a side meets an end
|
|
35
|
+
* edge:<point> a drawn section's corner, along the axis; a sharp rectangle's is edge:<corner>
|
|
36
|
+
* cavity-wall:<cavity>:<side> the inside of each wall, facing into the cavity
|
|
37
|
+
* cavity-start:<cavity> / cavity-end:<cavity> the face closing the cavity at that end, when it is closed
|
|
38
|
+
* centre the middle of the part's span on its axis, at the section's origin
|
|
39
|
+
*/
|
|
40
|
+
export function figureExtrusionFeaturesOf(extrusion, cavities = []) {
|
|
41
|
+
const { axis, section, start, end } = extrusion;
|
|
42
|
+
if (!(end - start > 0))
|
|
43
|
+
return { refused: { code: 'SPAN_NOT_POSITIVE' } };
|
|
44
|
+
if (cavities.length > 1)
|
|
45
|
+
return { refused: { code: 'CAVITY_COUNT', count: cavities.length } };
|
|
46
|
+
const cavity = cavities[0];
|
|
47
|
+
let inner;
|
|
48
|
+
if (cavity) {
|
|
49
|
+
const made = figureCavitySectionOf(section, axis, cavity.wall);
|
|
50
|
+
if ('refused' in made)
|
|
51
|
+
return {
|
|
52
|
+
refused: { code: 'CAVITY', cavity: cavity.id, refused: made.refused, ...(made.side ? { side: made.side } : {}) }
|
|
53
|
+
};
|
|
54
|
+
inner = made.section;
|
|
55
|
+
const left = (e) => (e === 'open' ? 0 : e.closed);
|
|
56
|
+
for (const e of ['start', 'end']) {
|
|
57
|
+
const at = cavity[e];
|
|
58
|
+
if (at !== 'open' && !(at.closed > 0))
|
|
59
|
+
return { refused: { code: 'CAVITY_END_NOT_POSITIVE', cavity: cavity.id, end: e } };
|
|
60
|
+
}
|
|
61
|
+
if (!(end - start - left(cavity.start) - left(cavity.end) > 0))
|
|
62
|
+
return { refused: { code: 'CAVITY_NO_LENGTH', cavity: cavity.id } };
|
|
63
|
+
}
|
|
64
|
+
const sides = figureSectionSidesOf(section, axis);
|
|
65
|
+
const features = [
|
|
66
|
+
{ id: 'start-face', kind: 'plane', normal: vec(axis, -1), ...(cavity?.start === 'open' ? { open: true } : {}) },
|
|
67
|
+
{ id: 'end-face', kind: 'plane', normal: vec(axis, 1), ...(cavity?.end === 'open' ? { open: true } : {}) }
|
|
68
|
+
];
|
|
69
|
+
for (const s of sides) {
|
|
70
|
+
features.push(s.shape === 'flat'
|
|
71
|
+
? { id: `side-face:${s.id}`, kind: 'plane', normal: sideNormal(section, axis, s) }
|
|
72
|
+
: { id: `side-face:${s.id}`, kind: 'curved' });
|
|
73
|
+
features.push({ id: `edge:start:${s.id}`, kind: 'edge' }, { id: `edge:end:${s.id}`, kind: 'edge' });
|
|
74
|
+
}
|
|
75
|
+
if (section.kind === 'polygon')
|
|
76
|
+
for (const p of section.points)
|
|
77
|
+
features.push({ id: `edge:${p.id}`, kind: 'edge' });
|
|
78
|
+
else if (section.kind === 'rectangle' && !sides.some(s => s.shape === 'curved')) {
|
|
79
|
+
const [a, b] = [...FIGURE_SECTION_PLANE[axis]].sort();
|
|
80
|
+
for (const sa of ['-', '+'])
|
|
81
|
+
for (const sb of ['-', '+'])
|
|
82
|
+
features.push({ id: `edge:${a}${sa}${b}${sb}`, kind: 'edge' });
|
|
83
|
+
}
|
|
84
|
+
if (cavity && inner) {
|
|
85
|
+
for (const s of figureSectionSidesOf(inner, axis)) {
|
|
86
|
+
const id = `cavity-wall:${cavity.id}:${s.id}`;
|
|
87
|
+
if (s.shape === 'curved')
|
|
88
|
+
features.push({ id, kind: 'curved' });
|
|
89
|
+
else {
|
|
90
|
+
const out = sideNormal(inner, axis, s);
|
|
91
|
+
features.push({ id, kind: 'plane', normal: { x: -out.x || 0, y: -out.y || 0, z: -out.z || 0 } });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (cavity.start !== 'open')
|
|
95
|
+
features.push({ id: `cavity-start:${cavity.id}`, kind: 'plane', normal: vec(axis, 1) });
|
|
96
|
+
if (cavity.end !== 'open')
|
|
97
|
+
features.push({ id: `cavity-end:${cavity.id}`, kind: 'plane', normal: vec(axis, -1) });
|
|
98
|
+
}
|
|
99
|
+
features.push({ id: 'centre', kind: 'point' });
|
|
100
|
+
return { features };
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=shape-features.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shape-features.js","sourceRoot":"","sources":["../src/shape-features.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AACH,OAAO,EAAE,IAAI,EAAa,MAAM,YAAY,CAAA;AAC5C,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EAGrB,MAAM,cAAc,CAAA;AAuCrB,MAAM,GAAG,GAAG,CAAC,IAAU,EAAE,CAAS,EAAwB,EAAE,CAC1D,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAyB,CAAA;AAEpF,8DAA8D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IACnH,CAAC;IACD,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAA;IAC9C,OAAO,EAAE,QAAQ,EAAE,CAAA;AACrB,CAAC"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { type FigureSection } from './section.ts';
|
|
2
|
+
import { type FigureCavity } from './shape-features.ts';
|
|
3
|
+
import { type Axis } from './words.ts';
|
|
4
|
+
type Dynamic = any;
|
|
5
|
+
/** The words the part's outer faces go by, low then high, along each of its own axes. */
|
|
6
|
+
export declare const FIGURE_OUTER_FACES: Readonly<Record<Axis, readonly [string, string]>>;
|
|
7
|
+
/** Where a flat face lies: along one of the shape's axes, facing one way, at a sum of its arguments times factors. */
|
|
8
|
+
export interface FigureShapeFace {
|
|
9
|
+
axis: Axis;
|
|
10
|
+
normal: 1 | -1;
|
|
11
|
+
plane: ReadonlyArray<{
|
|
12
|
+
arg: number;
|
|
13
|
+
k: number;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* `line`: the plane touches a curved side at its extreme -- a cylinder's side (Q3). A part fastened to it touches it
|
|
17
|
+
* along a line, and the screen says so; it is not a surface to hold things on.
|
|
18
|
+
*/
|
|
19
|
+
contact?: 'line';
|
|
20
|
+
}
|
|
21
|
+
/** A term of a measure: an argument times a factor (a radius is half a width). */
|
|
22
|
+
export type FigureShapeTerm = {
|
|
23
|
+
arg: number;
|
|
24
|
+
k: number;
|
|
25
|
+
};
|
|
26
|
+
export type FigureShapeEdit = {
|
|
27
|
+
arg: number;
|
|
28
|
+
k: number;
|
|
29
|
+
with?: readonly number[];
|
|
30
|
+
sameAs?: Axis;
|
|
31
|
+
} | {
|
|
32
|
+
refused: FigureShapeEditRefusal;
|
|
33
|
+
};
|
|
34
|
+
/** Why an axis cannot be edited by a size: its reach is a drawn section's points. */
|
|
35
|
+
export type FigureShapeEditRefusal = 'SECTION_CORNERS' | 'NO_MEASURE';
|
|
36
|
+
/**
|
|
37
|
+
* What a shape node offers the commands that size and place a part (ADR-0097 §6, ADR-0100 §4.2): how far it reaches
|
|
38
|
+
* along each of its own axes, how a size edits it, and its flat faces by name.
|
|
39
|
+
*/
|
|
40
|
+
export interface FigureShapeDescription {
|
|
41
|
+
/** Along each axis, candidates whose largest is the reach, or `profile` when a drawn section's points are the reach. */
|
|
42
|
+
measure: Readonly<Record<Axis, ReadonlyArray<FigureShapeTerm> | 'profile'>>;
|
|
43
|
+
edit: Readonly<Record<Axis, FigureShapeEdit>>;
|
|
44
|
+
faces: Readonly<Record<string, FigureShapeFace>>;
|
|
45
|
+
/** What a person calls it, for messages: 상자, 원기둥 … */
|
|
46
|
+
kind: 'rectangle' | 'ellipse' | 'polygon' | 'portal' | 'sphere' | 'taper';
|
|
47
|
+
}
|
|
48
|
+
export type FigureSectionKind = 'rectangle' | 'ellipse' | 'polygon' | 'portal';
|
|
49
|
+
export declare const FIGURE_SECTION_KINDS: readonly FigureSectionKind[];
|
|
50
|
+
/** Which argument is which, for one extrude node -- from its params alone. */
|
|
51
|
+
export interface FigureExtrudeLayout {
|
|
52
|
+
axis: Axis;
|
|
53
|
+
/** The two plane axes in name order: `x, z` for a push along Y. */
|
|
54
|
+
plane: readonly [Axis, Axis];
|
|
55
|
+
section: FigureSectionKind;
|
|
56
|
+
points: readonly string[];
|
|
57
|
+
rounded: boolean;
|
|
58
|
+
cavity?: {
|
|
59
|
+
id: string;
|
|
60
|
+
start: 'open' | 'closed';
|
|
61
|
+
end: 'open' | 'closed';
|
|
62
|
+
};
|
|
63
|
+
arg: {
|
|
64
|
+
start: 0;
|
|
65
|
+
length: 1;
|
|
66
|
+
/** rectangle: size; ellipse: radius; portal: width along the first plane axis, height along the second. */
|
|
67
|
+
across?: Partial<Record<Axis, number>>;
|
|
68
|
+
corner?: Partial<Record<Axis, number>>;
|
|
69
|
+
/** portal: its jambs' and head's thickness. */
|
|
70
|
+
jamb?: number;
|
|
71
|
+
head?: number;
|
|
72
|
+
point?: Record<string, Partial<Record<Axis, number>>>;
|
|
73
|
+
wall?: Record<string, number>;
|
|
74
|
+
startClosed?: number;
|
|
75
|
+
endClosed?: number;
|
|
76
|
+
};
|
|
77
|
+
count: number;
|
|
78
|
+
}
|
|
79
|
+
/** Read an extrude node's params into its layout, or fail naming what is wrong. */
|
|
80
|
+
export declare function figureExtrudeLayoutOf(params: Record<string, string> | undefined, path: string): FigureExtrudeLayout;
|
|
81
|
+
export type FigureRevolveProfile = 'half-ellipse' | 'taper';
|
|
82
|
+
/** The shape operators, by name. */
|
|
83
|
+
export declare const FIGURE_SHAPE_OPERATOR_NAMES: readonly string[];
|
|
84
|
+
/**
|
|
85
|
+
* What a shape node offers, or undefined for a node that is not a shape. Given the graph, a centred push's ends are
|
|
86
|
+
* written as ±half its length (`endsOf`); the planes are the same either way.
|
|
87
|
+
*/
|
|
88
|
+
export declare function figureShapeDescriptionOf(node: {
|
|
89
|
+
op: string;
|
|
90
|
+
id?: string;
|
|
91
|
+
args?: readonly string[];
|
|
92
|
+
params?: Record<string, string>;
|
|
93
|
+
} | undefined, model?: {
|
|
94
|
+
nodes: readonly unknown[];
|
|
95
|
+
constants: readonly unknown[];
|
|
96
|
+
}): FigureShapeDescription | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* An evaluated shape. `dimensions` are its numbers by name -- what a cache keys and a message reads; `extrusion` and
|
|
99
|
+
* `revolution` are its meaning, which a renderer draws; `faces` are where its flat faces lie, which a reader of a named
|
|
100
|
+
* face needs without knowing the operation.
|
|
101
|
+
*/
|
|
102
|
+
export interface FigureEvaluatedShape {
|
|
103
|
+
provider: 'extrude' | 'revolve';
|
|
104
|
+
dimensions: Record<string, number>;
|
|
105
|
+
extrusion?: {
|
|
106
|
+
axis: Axis;
|
|
107
|
+
section: FigureSection;
|
|
108
|
+
start: number;
|
|
109
|
+
end: number;
|
|
110
|
+
};
|
|
111
|
+
cavity?: FigureCavity;
|
|
112
|
+
revolution?: {
|
|
113
|
+
axis: Axis;
|
|
114
|
+
profile: {
|
|
115
|
+
kind: 'half-ellipse';
|
|
116
|
+
radial: number;
|
|
117
|
+
axial: number;
|
|
118
|
+
} | {
|
|
119
|
+
kind: 'taper';
|
|
120
|
+
start: number;
|
|
121
|
+
end: number;
|
|
122
|
+
startRadius: number;
|
|
123
|
+
endRadius: number;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
faces: Record<string, {
|
|
127
|
+
axis: Axis;
|
|
128
|
+
normal: 1 | -1;
|
|
129
|
+
at: number;
|
|
130
|
+
}>;
|
|
131
|
+
}
|
|
132
|
+
/** The two operators, in the graph's operator shape. */
|
|
133
|
+
export declare const FIGURE_SHAPE_OPERATORS: Record<string, Dynamic>;
|
|
134
|
+
/** How far an evaluated shape reaches along each of its own axes: least and most, in its own frame. */
|
|
135
|
+
export declare function figureShapeBoundsOf(shape: FigureEvaluatedShape): Record<Axis, {
|
|
136
|
+
min: number;
|
|
137
|
+
max: number;
|
|
138
|
+
}>;
|
|
139
|
+
/**
|
|
140
|
+
* How far a turned shape reaches along a direction `d` (a unit vector in the shape's frame), from its own origin: the
|
|
141
|
+
* support function. A box's is the sum over its corners; a round body's is its axis half-length times how much it
|
|
142
|
+
* points along `d` plus its section's own reach -- a wheel at 45° is not its square's diagonal (the forklift, 2026-09).
|
|
143
|
+
*/
|
|
144
|
+
export declare function figureShapeSupportOf(shape: FigureEvaluatedShape, d: readonly [number, number, number]): {
|
|
145
|
+
max: number;
|
|
146
|
+
min: number;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* Where a named feature of an evaluated shape sits, in its own frame: the middle of the face (of the inside, for an
|
|
150
|
+
* inside face), the middle of the shape for `centre`, and for a sphere, which has no flat face, its six extremes.
|
|
151
|
+
*/
|
|
152
|
+
export declare function figureShapeFeaturePointOf(shape: FigureEvaluatedShape, name: string): [number, number, number] | undefined;
|
|
153
|
+
export {};
|
|
154
|
+
//# sourceMappingURL=shape-ops.d.ts.map
|
|
@@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