@expofp/wayfinding-compiler 0.0.0-experimental.3b0db16 → 0.0.0-stage
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/README.md +2 -445
- package/package.json +3 -34
- package/dist/index.d.ts +0 -14
- package/dist/index.js +0 -3
- package/dist/lib/attach.d.ts +0 -43
- package/dist/lib/attach.js +0 -199
- package/dist/lib/axes.d.ts +0 -76
- package/dist/lib/axes.js +0 -103
- package/dist/lib/blockers.d.ts +0 -134
- package/dist/lib/blockers.js +0 -289
- package/dist/lib/cell-array.d.ts +0 -14
- package/dist/lib/cell-array.js +0 -25
- package/dist/lib/compile-layer.d.ts +0 -41
- package/dist/lib/compile-layer.js +0 -241
- package/dist/lib/compile-wayfinding.d.ts +0 -90
- package/dist/lib/compile-wayfinding.js +0 -203
- package/dist/lib/connect.d.ts +0 -35
- package/dist/lib/connect.js +0 -206
- package/dist/lib/diagnostics.d.ts +0 -190
- package/dist/lib/diagnostics.js +0 -634
- package/dist/lib/doorways.d.ts +0 -78
- package/dist/lib/doorways.js +0 -331
- package/dist/lib/emit-network.d.ts +0 -47
- package/dist/lib/emit-network.js +0 -105
- package/dist/lib/emit-v1.d.ts +0 -31
- package/dist/lib/emit-v1.js +0 -56
- package/dist/lib/entries.d.ts +0 -123
- package/dist/lib/entries.js +0 -448
- package/dist/lib/floor-grids.d.ts +0 -48
- package/dist/lib/floor-grids.js +0 -185
- package/dist/lib/framing.d.ts +0 -20
- package/dist/lib/framing.js +0 -187
- package/dist/lib/geom/boolean-ops.d.ts +0 -21
- package/dist/lib/geom/boolean-ops.js +0 -1
- package/dist/lib/geom/clipper2-ops.d.ts +0 -7
- package/dist/lib/geom/clipper2-ops.js +0 -50
- package/dist/lib/geom/footprint.d.ts +0 -26
- package/dist/lib/geom/footprint.js +0 -203
- package/dist/lib/geom/frames.d.ts +0 -116
- package/dist/lib/geom/frames.js +0 -233
- package/dist/lib/geom/mesh-outline.d.ts +0 -13
- package/dist/lib/geom/mesh-outline.js +0 -90
- package/dist/lib/geom/normalize.d.ts +0 -28
- package/dist/lib/geom/normalize.js +0 -118
- package/dist/lib/geom/point-key.d.ts +0 -16
- package/dist/lib/geom/point-key.js +0 -15
- package/dist/lib/geom/primitives.d.ts +0 -105
- package/dist/lib/geom/primitives.js +0 -184
- package/dist/lib/geom/split-crossings.d.ts +0 -14
- package/dist/lib/geom/split-crossings.js +0 -171
- package/dist/lib/geom/types.d.ts +0 -9
- package/dist/lib/geom/types.js +0 -1
- package/dist/lib/geom/walls.d.ts +0 -31
- package/dist/lib/geom/walls.js +0 -71
- package/dist/lib/graph-invariants.d.ts +0 -49
- package/dist/lib/graph-invariants.js +0 -129
- package/dist/lib/graph-types.d.ts +0 -143
- package/dist/lib/graph-types.js +0 -7
- package/dist/lib/mask.d.ts +0 -54
- package/dist/lib/mask.js +0 -210
- package/dist/lib/min-heap.d.ts +0 -24
- package/dist/lib/min-heap.js +0 -73
- package/dist/lib/network-build.d.ts +0 -21
- package/dist/lib/network-build.js +0 -4
- package/dist/lib/network-graph.d.ts +0 -80
- package/dist/lib/network-graph.js +0 -467
- package/dist/lib/network-sizes.d.ts +0 -29
- package/dist/lib/network-sizes.js +0 -22
- package/dist/lib/network-store.d.ts +0 -173
- package/dist/lib/network-store.js +0 -430
- package/dist/lib/openings.d.ts +0 -54
- package/dist/lib/openings.js +0 -387
- package/dist/lib/place-path.d.ts +0 -47
- package/dist/lib/place-path.js +0 -346
- package/dist/lib/post-passes.d.ts +0 -31
- package/dist/lib/post-passes.js +0 -305
- package/dist/lib/reachability.d.ts +0 -58
- package/dist/lib/reachability.js +0 -220
- package/dist/lib/report.d.ts +0 -49
- package/dist/lib/report.js +0 -374
- package/dist/lib/router.d.ts +0 -111
- package/dist/lib/router.js +0 -388
- package/dist/lib/runs.d.ts +0 -92
- package/dist/lib/runs.js +0 -232
- package/dist/lib/scale.d.ts +0 -58
- package/dist/lib/scale.js +0 -185
- package/dist/lib/steiner-network.d.ts +0 -19
- package/dist/lib/steiner-network.js +0 -183
- package/dist/lib/strip.d.ts +0 -43
- package/dist/lib/strip.js +0 -200
- package/dist/lib/stubs.d.ts +0 -84
- package/dist/lib/stubs.js +0 -316
- package/dist/lib/transitions.d.ts +0 -72
- package/dist/lib/transitions.js +0 -191
- package/dist/lib/types.d.ts +0 -126
- package/dist/lib/types.js +0 -1
- package/dist/lib/validate-source.d.ts +0 -41
- package/dist/lib/validate-source.js +0 -133
- package/dist/lib/walkable.d.ts +0 -104
- package/dist/lib/walkable.js +0 -140
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { WayfindingSource, WfV1Graph } from './types.js';
|
|
2
|
-
/** A POI by its place in the source, with the name the plan gave it. */
|
|
3
|
-
export interface PoiRef {
|
|
4
|
-
/** The layer the POI stands on. */
|
|
5
|
-
readonly layer: string;
|
|
6
|
-
/** Index in that layer's `destinations` — unique where names are not. */
|
|
7
|
-
readonly index: number;
|
|
8
|
-
/** `SourceDestination.id` — the POI name; may repeat or be empty. */
|
|
9
|
-
readonly id: string;
|
|
10
|
-
}
|
|
11
|
-
/** One connected part of the emitted graph. */
|
|
12
|
-
export interface NetworkPart {
|
|
13
|
-
/** Distinct graph nodes in it. */
|
|
14
|
-
readonly nodes: number;
|
|
15
|
-
/** Indices into `graph.lines`. */
|
|
16
|
-
readonly lines: readonly number[];
|
|
17
|
-
/** The layers it reaches, in source order. */
|
|
18
|
-
readonly layers: readonly string[];
|
|
19
|
-
/** The POI bound to it. */
|
|
20
|
-
readonly poi: readonly PoiRef[];
|
|
21
|
-
}
|
|
22
|
-
/** Where one POI meets the graph. */
|
|
23
|
-
export interface PoiBinding {
|
|
24
|
-
/** The POI. */
|
|
25
|
-
readonly ref: PoiRef;
|
|
26
|
-
/** Indices into `graph.lineEnds` that lie inside the POI's `dock ?? polygon`, on its layer. */
|
|
27
|
-
readonly ends: readonly number[];
|
|
28
|
-
/** Index into {@link Reachability.parts}, or -1 when {@link ends} is empty. */
|
|
29
|
-
readonly part: number;
|
|
30
|
-
/** True when its ends fall on more than one part; {@link part} is then the first of them. */
|
|
31
|
-
readonly split: boolean;
|
|
32
|
-
}
|
|
33
|
-
/** What the emitted graph connects: its parts, and which part every POI is bound to. */
|
|
34
|
-
export interface Reachability {
|
|
35
|
-
/**
|
|
36
|
-
* Connected parts, main first: most POI, then most nodes, then the earliest source POI, then the
|
|
37
|
-
* smallest node key — independent of line order.
|
|
38
|
-
*/
|
|
39
|
-
readonly parts: readonly NetworkPart[];
|
|
40
|
-
/** One entry per source POI: layers in source order, POI in source order within a layer. */
|
|
41
|
-
readonly poi: readonly PoiBinding[];
|
|
42
|
-
/** `lineEnds` inside no source ring and starting no shaft edge — bound to nothing. */
|
|
43
|
-
readonly unownedEnds: readonly number[];
|
|
44
|
-
/** `lineEnds` inside more than one source ring — either POI may be reached through them. */
|
|
45
|
-
readonly sharedEnds: readonly {
|
|
46
|
-
readonly end: number;
|
|
47
|
-
readonly poi: readonly PoiRef[];
|
|
48
|
-
}[];
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Read what the emitted graph connects: nodes joined by exact coordinates, a POI
|
|
52
|
-
* bound to the `lineEnds` inside its ring. Reads only the graph and the source rings.
|
|
53
|
-
* @param graph The emitted graph, in plan units.
|
|
54
|
-
* @param source The plan the graph was compiled from, in plan units.
|
|
55
|
-
* @returns The parts, the binding of every POI, and the ends nobody or several POI own.
|
|
56
|
-
*/
|
|
57
|
-
export declare function readReachability(graph: WfV1Graph, source: WayfindingSource): Reachability;
|
|
58
|
-
//# sourceMappingURL=reachability.d.ts.map
|
package/dist/lib/reachability.js
DELETED
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
import { boundsOf, pointInRing } from './geom/primitives.js';
|
|
2
|
-
import { crosses } from './graph-invariants.js';
|
|
3
|
-
/**
|
|
4
|
-
* A node's key: its exact emitted coordinates, since the graph joins nodes only there.
|
|
5
|
-
* @param p An emitted point.
|
|
6
|
-
* @returns Its key.
|
|
7
|
-
*/
|
|
8
|
-
function nodeKey(p) {
|
|
9
|
-
return `${p.layer}_${p.x}_${p.y}`;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Read what the emitted graph connects: nodes joined by exact coordinates, a POI
|
|
13
|
-
* bound to the `lineEnds` inside its ring. Reads only the graph and the source rings.
|
|
14
|
-
* @param graph The emitted graph, in plan units.
|
|
15
|
-
* @param source The plan the graph was compiled from, in plan units.
|
|
16
|
-
* @returns The parts, the binding of every POI, and the ends nobody or several POI own.
|
|
17
|
-
*/
|
|
18
|
-
export function readReachability(graph, source) {
|
|
19
|
-
const ids = new Map();
|
|
20
|
-
const parent = [];
|
|
21
|
-
const nodeLayer = [];
|
|
22
|
-
const nodePos = [];
|
|
23
|
-
const node = (p) => {
|
|
24
|
-
const key = nodeKey(p);
|
|
25
|
-
let id = ids.get(key);
|
|
26
|
-
if (id === undefined) {
|
|
27
|
-
id = parent.length;
|
|
28
|
-
ids.set(key, id);
|
|
29
|
-
parent.push(id);
|
|
30
|
-
nodeLayer.push(p.layer);
|
|
31
|
-
nodePos.push([p.x, p.y]);
|
|
32
|
-
}
|
|
33
|
-
return id;
|
|
34
|
-
};
|
|
35
|
-
const find = (id) => {
|
|
36
|
-
let root = id;
|
|
37
|
-
while (parent[root] !== root)
|
|
38
|
-
root = parent[root];
|
|
39
|
-
while (parent[id] !== root)
|
|
40
|
-
[id, parent[id]] = [parent[id], root];
|
|
41
|
-
return root;
|
|
42
|
-
};
|
|
43
|
-
const lineNodes = graph.lines.map((line) => [node(line.p0), node(line.p1)]);
|
|
44
|
-
const union = (p0, p1) => {
|
|
45
|
-
const a = find(p0);
|
|
46
|
-
const b = find(p1);
|
|
47
|
-
if (a !== b)
|
|
48
|
-
parent[Math.max(a, b)] = Math.min(a, b);
|
|
49
|
-
};
|
|
50
|
-
for (const [p0, p1] of lineNodes)
|
|
51
|
-
union(p0, p1);
|
|
52
|
-
// A node lying on a line's span joins the line there, and two lines that cross join at the crossing:
|
|
53
|
-
// the converter that builds wf.data.js cuts the lines there, within a tenth of a plan unit.
|
|
54
|
-
const touch = 0.1;
|
|
55
|
-
const cell = END_CELL_METERS * (source.unitsPerMeter ?? 1);
|
|
56
|
-
const cells = new Map();
|
|
57
|
-
const linesIn = new Map();
|
|
58
|
-
nodePos.forEach(([x, y], id) => {
|
|
59
|
-
const key = `${nodeLayer[id]}|${Math.floor(x / cell)}|${Math.floor(y / cell)}`;
|
|
60
|
-
cells.set(key, [...(cells.get(key) ?? []), id]);
|
|
61
|
-
});
|
|
62
|
-
graph.lines.forEach(({ p0, p1 }, index) => {
|
|
63
|
-
if (p0.layer !== p1.layer)
|
|
64
|
-
return;
|
|
65
|
-
const dx = p1.x - p0.x;
|
|
66
|
-
const dy = p1.y - p0.y;
|
|
67
|
-
const length = Math.hypot(dx, dy);
|
|
68
|
-
if (length <= 2 * touch)
|
|
69
|
-
return;
|
|
70
|
-
const x0 = Math.floor((Math.min(p0.x, p1.x) - touch) / cell);
|
|
71
|
-
const x1 = Math.floor((Math.max(p0.x, p1.x) + touch) / cell);
|
|
72
|
-
const y0 = Math.floor((Math.min(p0.y, p1.y) - touch) / cell);
|
|
73
|
-
const y1 = Math.floor((Math.max(p0.y, p1.y) + touch) / cell);
|
|
74
|
-
for (let cx = x0; cx <= x1; cx++)
|
|
75
|
-
for (let cy = y0; cy <= y1; cy++) {
|
|
76
|
-
const key = `${p0.layer}|${cx}|${cy}`;
|
|
77
|
-
for (const id of cells.get(key) ?? []) {
|
|
78
|
-
const [px, py] = nodePos[id];
|
|
79
|
-
const along = ((px - p0.x) * dx + (py - p0.y) * dy) / length;
|
|
80
|
-
const off = Math.abs((px - p0.x) * dy - (py - p0.y) * dx) / length;
|
|
81
|
-
if (off <= touch && along > touch && along < length - touch)
|
|
82
|
-
union(id, lineNodes[index][0]);
|
|
83
|
-
}
|
|
84
|
-
for (const other of linesIn.get(key) ?? []) {
|
|
85
|
-
const o = graph.lines[other];
|
|
86
|
-
if (crosses([p0.x, p0.y, p1.x, p1.y], [o.p0.x, o.p0.y, o.p1.x, o.p1.y]))
|
|
87
|
-
union(lineNodes[index][0], lineNodes[other][0]);
|
|
88
|
-
}
|
|
89
|
-
linesIn.set(key, [...(linesIn.get(key) ?? []), index]);
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
// A docking point no line reaches is a part of its own, connected to nothing else.
|
|
93
|
-
const endNodes = graph.lineEnds.map(node);
|
|
94
|
-
const bindings = bind(graph, source);
|
|
95
|
-
const byRoot = new Map();
|
|
96
|
-
const partAt = (root) => {
|
|
97
|
-
let part = byRoot.get(root);
|
|
98
|
-
if (!part) {
|
|
99
|
-
part = { nodes: 0, lines: [], layers: new Set(), poi: [], firstPoi: Infinity, minKey: '' };
|
|
100
|
-
byRoot.set(root, part);
|
|
101
|
-
}
|
|
102
|
-
return part;
|
|
103
|
-
};
|
|
104
|
-
for (const [key, id] of ids) {
|
|
105
|
-
const part = partAt(find(id));
|
|
106
|
-
part.nodes++;
|
|
107
|
-
part.layers.add(nodeLayer[id]);
|
|
108
|
-
if (!part.minKey || key < part.minKey)
|
|
109
|
-
part.minKey = key;
|
|
110
|
-
}
|
|
111
|
-
lineNodes.forEach(([p0], index) => partAt(find(p0)).lines.push(index));
|
|
112
|
-
bindings.forEach(({ ref, ends }, order) => {
|
|
113
|
-
for (const root of new Set(ends.map((end) => find(endNodes[end])))) {
|
|
114
|
-
const part = partAt(root);
|
|
115
|
-
part.poi.push(ref);
|
|
116
|
-
part.firstPoi = Math.min(part.firstPoi, order);
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
const ranked = [...byRoot].sort(([, a], [, b]) => b.poi.length - a.poi.length ||
|
|
120
|
-
b.nodes - a.nodes ||
|
|
121
|
-
a.firstPoi - b.firstPoi ||
|
|
122
|
-
(a.minKey < b.minKey ? -1 : a.minKey > b.minKey ? 1 : 0));
|
|
123
|
-
const rank = new Map(ranked.map(([root], index) => [root, index]));
|
|
124
|
-
const sourceLayers = [...new Set(source.layers.map((layer) => layer.layer))];
|
|
125
|
-
const parts = ranked.map(([, part]) => ({
|
|
126
|
-
nodes: part.nodes,
|
|
127
|
-
lines: part.lines,
|
|
128
|
-
layers: sourceLayers.filter((layer) => part.layers.has(layer)),
|
|
129
|
-
poi: part.poi,
|
|
130
|
-
}));
|
|
131
|
-
const poi = bindings.map(({ ref, ends }) => {
|
|
132
|
-
const on = [...new Set(ends.map((end) => rank.get(find(endNodes[end]))))].sort((a, b) => a - b);
|
|
133
|
-
return { ref, ends, part: on[0] ?? -1, split: on.length > 1 };
|
|
134
|
-
});
|
|
135
|
-
const owners = new Map();
|
|
136
|
-
for (const { ref, ends } of bindings)
|
|
137
|
-
for (const end of ends) {
|
|
138
|
-
const list = owners.get(end);
|
|
139
|
-
if (list)
|
|
140
|
-
list.push(ref);
|
|
141
|
-
else
|
|
142
|
-
owners.set(end, [ref]);
|
|
143
|
-
}
|
|
144
|
-
// A shaft edge starts at its stop's dock, often inside a pad no source ring holds: such ends are the shaft's.
|
|
145
|
-
const shaftEnds = new Set();
|
|
146
|
-
graph.lines.forEach((line, index) => {
|
|
147
|
-
if (line.p0.layer === line.p1.layer)
|
|
148
|
-
return;
|
|
149
|
-
shaftEnds.add(lineNodes[index][0]);
|
|
150
|
-
shaftEnds.add(lineNodes[index][1]);
|
|
151
|
-
});
|
|
152
|
-
const unownedEnds = endNodes
|
|
153
|
-
.map((id, end) => ({ id, end }))
|
|
154
|
-
.filter(({ id, end }) => !owners.has(end) && !shaftEnds.has(id))
|
|
155
|
-
.map(({ end }) => end);
|
|
156
|
-
const sharedEnds = [...owners]
|
|
157
|
-
.filter(([, refs]) => refs.length > 1)
|
|
158
|
-
.sort(([a], [b]) => a - b)
|
|
159
|
-
.map(([end, refs]) => ({ end, poi: refs }));
|
|
160
|
-
return { parts, poi, unownedEnds, sharedEnds };
|
|
161
|
-
}
|
|
162
|
-
/** Side of a cell the line ends are bucketed in, in meters: a booth or two across. */
|
|
163
|
-
const END_CELL_METERS = 4;
|
|
164
|
-
/**
|
|
165
|
-
* Which `lineEnds` lie inside each source POI's ring, on its layer — the graph's binding rule, run
|
|
166
|
-
* only on the ends in cells the ring's bounds cover.
|
|
167
|
-
* @param graph The emitted graph.
|
|
168
|
-
* @param source The source plan.
|
|
169
|
-
* @returns One binding per source POI, in source order; each POI's ends in ascending order.
|
|
170
|
-
*/
|
|
171
|
-
function bind(graph, source) {
|
|
172
|
-
const cell = END_CELL_METERS * (source.unitsPerMeter ?? 1);
|
|
173
|
-
const cellKey = (layer, cx, cy) => `${layer}\u0000${cx}\u0000${cy}`;
|
|
174
|
-
const cells = new Map();
|
|
175
|
-
// The cells holding line ends, per layer: a ring is looked up no farther, whatever its bounds are.
|
|
176
|
-
const spans = new Map();
|
|
177
|
-
graph.lineEnds.forEach((end, index) => {
|
|
178
|
-
const cx = Math.floor(end.x / cell);
|
|
179
|
-
const cy = Math.floor(end.y / cell);
|
|
180
|
-
const key = cellKey(end.layer, cx, cy);
|
|
181
|
-
const list = cells.get(key);
|
|
182
|
-
const span = spans.get(end.layer);
|
|
183
|
-
if (list)
|
|
184
|
-
list.push(index);
|
|
185
|
-
else
|
|
186
|
-
cells.set(key, [index]);
|
|
187
|
-
if (span) {
|
|
188
|
-
span[0] = Math.min(span[0], cx);
|
|
189
|
-
span[1] = Math.min(span[1], cy);
|
|
190
|
-
span[2] = Math.max(span[2], cx);
|
|
191
|
-
span[3] = Math.max(span[3], cy);
|
|
192
|
-
}
|
|
193
|
-
else
|
|
194
|
-
spans.set(end.layer, [cx, cy, cx, cy]);
|
|
195
|
-
});
|
|
196
|
-
return source.layers.flatMap((layer) => layer.destinations.map((destination, index) => {
|
|
197
|
-
const ring = destination.dock ?? destination.polygon;
|
|
198
|
-
const ref = { layer: layer.layer, index, id: destination.id };
|
|
199
|
-
const span = spans.get(layer.layer);
|
|
200
|
-
// Fewer than three vertices enclose nothing, and a layer with no line ends binds nothing.
|
|
201
|
-
if (ring.length < 3 || !span)
|
|
202
|
-
return { ref, ends: [] };
|
|
203
|
-
const [x0, y0, x1, y1] = boundsOf(ring);
|
|
204
|
-
const ends = [];
|
|
205
|
-
// Clamped to the layer's line ends: a ring that is huge, or holds a coordinate that is not a
|
|
206
|
-
// number, costs no more than the graph is large.
|
|
207
|
-
const cx0 = Math.max(Math.floor(x0 / cell), span[0]);
|
|
208
|
-
const cy0 = Math.max(Math.floor(y0 / cell), span[1]);
|
|
209
|
-
const cx1 = Math.min(Math.floor(x1 / cell), span[2]);
|
|
210
|
-
const cy1 = Math.min(Math.floor(y1 / cell), span[3]);
|
|
211
|
-
for (let cx = cx0; cx <= cx1; cx++)
|
|
212
|
-
for (let cy = cy0; cy <= cy1; cy++)
|
|
213
|
-
for (const end of cells.get(cellKey(layer.layer, cx, cy)) ?? []) {
|
|
214
|
-
const { x, y } = graph.lineEnds[end];
|
|
215
|
-
if (x >= x0 && x <= x1 && y >= y0 && y <= y1 && pointInRing(ring, [x, y]))
|
|
216
|
-
ends.push(end);
|
|
217
|
-
}
|
|
218
|
-
return { ref, ends: ends.sort((p, q) => p - q) };
|
|
219
|
-
}));
|
|
220
|
-
}
|
package/dist/lib/report.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { type Diagnostic, type Highlight } from './diagnostics.js';
|
|
2
|
-
import type { PoiRef, Reachability } from './reachability.js';
|
|
3
|
-
import type { WayfindingSource } from './types.js';
|
|
4
|
-
/** What came of the compile, in one word. */
|
|
5
|
-
export type Outcome = 'built' | 'built-with-gaps' | 'not-built';
|
|
6
|
-
/** The kinds of problem a designer is shown. */
|
|
7
|
-
export type ProblemKind = 'plan-invalid' | 'floor-not-built' | 'poi-not-connected' | 'network-split' | 'floors-not-connected' | 'nothing-to-build';
|
|
8
|
-
/** One problem: a floor, the POI it touches, the reason in words, and where to look. */
|
|
9
|
-
export interface Problem {
|
|
10
|
-
/** What kind of problem it is. */
|
|
11
|
-
readonly kind: ProblemKind;
|
|
12
|
-
/** The layer it belongs to; absent for whole-plan problems. */
|
|
13
|
-
readonly layer?: string;
|
|
14
|
-
/** Machine-readable cause within the kind; the designer reads {@link message}. */
|
|
15
|
-
readonly cause: string;
|
|
16
|
-
/** Ready English text: the floor, the names, the reason. */
|
|
17
|
-
readonly message: string;
|
|
18
|
-
/** The POI it touches, with the names the plan gave them. */
|
|
19
|
-
readonly poi: readonly PoiRef[];
|
|
20
|
-
/** Where to look, in plan units; empty when nothing exact is known. */
|
|
21
|
-
readonly highlight: readonly Highlight[];
|
|
22
|
-
}
|
|
23
|
-
/** What the designer reads about a compile. */
|
|
24
|
-
export interface CompileReport {
|
|
25
|
-
/** What came of the compile. */
|
|
26
|
-
readonly outcome: Outcome;
|
|
27
|
-
/** One line for the whole plan. */
|
|
28
|
-
readonly summary: string;
|
|
29
|
-
/** Problems grouped by floor and reason. */
|
|
30
|
-
readonly problems: readonly Problem[];
|
|
31
|
-
/** Source POI only; transition pads are not counted. */
|
|
32
|
-
readonly counts: {
|
|
33
|
-
readonly poi: number;
|
|
34
|
-
readonly poiConnected: number;
|
|
35
|
-
readonly poiNotConnected: number;
|
|
36
|
-
readonly poiOnDetachedParts: number;
|
|
37
|
-
readonly networkParts: number;
|
|
38
|
-
readonly floorsWithoutFloor: number;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Fold the compile's facts into what a designer reads: every problem is a diagnostic or a binding, grouped.
|
|
43
|
-
* @param diagnostics Every fact of the compile.
|
|
44
|
-
* @param reachability What the emitted graph connects.
|
|
45
|
-
* @param source The plan in plan units, for the outlines a problem points at.
|
|
46
|
-
* @returns The report.
|
|
47
|
-
*/
|
|
48
|
-
export declare function buildReport(diagnostics: readonly Diagnostic[], reachability: Reachability, source: WayfindingSource): CompileReport;
|
|
49
|
-
//# sourceMappingURL=report.d.ts.map
|