@kensnzk/koyu 0.22.0 → 0.24.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.
Files changed (74) hide show
  1. package/dist/cli.js +51 -2
  2. package/dist/cli.js.map +1 -1
  3. package/dist/core/bodies.d.ts +26 -0
  4. package/dist/core/bodies.d.ts.map +1 -0
  5. package/dist/core/bodies.js +67 -0
  6. package/dist/core/bodies.js.map +1 -0
  7. package/dist/core/model.d.ts +20 -1
  8. package/dist/core/model.d.ts.map +1 -1
  9. package/dist/core/model.js +27 -1
  10. package/dist/core/model.js.map +1 -1
  11. package/dist/core/parse.d.ts.map +1 -1
  12. package/dist/core/parse.js +11 -13
  13. package/dist/core/parse.js.map +1 -1
  14. package/dist/core/poly.d.ts +35 -0
  15. package/dist/core/poly.d.ts.map +1 -1
  16. package/dist/core/poly.js +67 -0
  17. package/dist/core/poly.js.map +1 -1
  18. package/dist/core/section.d.ts +88 -0
  19. package/dist/core/section.d.ts.map +1 -0
  20. package/dist/core/section.js +247 -0
  21. package/dist/core/section.js.map +1 -0
  22. package/dist/draw/axo.d.ts.map +1 -1
  23. package/dist/draw/axo.js +13 -31
  24. package/dist/draw/axo.js.map +1 -1
  25. package/dist/draw/index.d.ts +4 -0
  26. package/dist/draw/index.d.ts.map +1 -1
  27. package/dist/draw/index.js +4 -0
  28. package/dist/draw/index.js.map +1 -1
  29. package/dist/draw/marks.d.ts +126 -0
  30. package/dist/draw/marks.d.ts.map +1 -0
  31. package/dist/draw/marks.js +227 -0
  32. package/dist/draw/marks.js.map +1 -0
  33. package/dist/draw/plan.d.ts.map +1 -1
  34. package/dist/draw/plan.js +117 -133
  35. package/dist/draw/plan.js.map +1 -1
  36. package/dist/draw/scene.d.ts +133 -0
  37. package/dist/draw/scene.d.ts.map +1 -0
  38. package/dist/draw/scene.js +251 -0
  39. package/dist/draw/scene.js.map +1 -0
  40. package/dist/draw/section.d.ts +23 -0
  41. package/dist/draw/section.d.ts.map +1 -0
  42. package/dist/draw/section.js +168 -0
  43. package/dist/draw/section.js.map +1 -0
  44. package/dist/draw/sheet.d.ts +40 -0
  45. package/dist/draw/sheet.d.ts.map +1 -0
  46. package/dist/draw/sheet.js +93 -0
  47. package/dist/draw/sheet.js.map +1 -0
  48. package/dist/draw/written.d.ts +27 -0
  49. package/dist/draw/written.d.ts.map +1 -0
  50. package/dist/draw/written.js +50 -0
  51. package/dist/draw/written.js.map +1 -0
  52. package/dist/form.d.ts +1 -0
  53. package/dist/form.d.ts.map +1 -1
  54. package/dist/form.js +4 -0
  55. package/dist/form.js.map +1 -1
  56. package/dist/mcp.js +67 -3
  57. package/dist/mcp.js.map +1 -1
  58. package/package.json +2 -2
  59. package/src/cli.ts +57 -1
  60. package/src/core/bodies.ts +90 -0
  61. package/src/core/model.ts +32 -1
  62. package/src/core/parse.ts +13 -12
  63. package/src/core/poly.ts +76 -0
  64. package/src/core/section.ts +311 -0
  65. package/src/draw/axo.ts +13 -29
  66. package/src/draw/index.ts +24 -0
  67. package/src/draw/marks.ts +315 -0
  68. package/src/draw/plan.ts +111 -130
  69. package/src/draw/scene.ts +389 -0
  70. package/src/draw/section.ts +224 -0
  71. package/src/draw/sheet.ts +102 -0
  72. package/src/draw/written.ts +64 -0
  73. package/src/form.ts +18 -0
  74. package/src/mcp.ts +75 -2
@@ -0,0 +1,88 @@
1
+ import type { Form } from "./derive.js";
2
+ import type { Edge } from "./model.js";
3
+ /** Which axis names the plane. `"X"` means the plane `x = at`. */
4
+ export type SectionAxis = "X" | "Y";
5
+ /**
6
+ * What a vertical plane divides the mass into. **Two, where a plan has five.**
7
+ *
8
+ * A plan is looked at from above, so it carries what is below the cut, what is above it dropped
9
+ * back down, and the symbols of movement. A section is looked at from the side: what the plane
10
+ * crossed, and what stands behind it. What stands in front is not hidden by convention — it is
11
+ * behind the viewer — so it is not produced at all, and saying so here is what stops each
12
+ * consumer deciding it.
13
+ */
14
+ export type SectionClass = "cut" | "beyond";
15
+ export type SectionSubject = "space" | "boundary" | "opening" | "column" | "slab" | "run";
16
+ /** A point on the section. **Not a plan coordinate** — `u` runs across the sheet, `z` is height. */
17
+ export interface SectionPt {
18
+ u: number;
19
+ z: number;
20
+ }
21
+ /** The plane, and the direction it is looked at from. */
22
+ export interface SectionSpec {
23
+ axis: SectionAxis;
24
+ /** where the plane sits along `axis`, world mm */
25
+ at: number;
26
+ /** the grid reference it was named by, when it was named by one */
27
+ atRef?: string;
28
+ /** the direction of view. `W`/`E` across an X plane, `N`/`S` across a Y plane */
29
+ look: Edge;
30
+ }
31
+ export interface SectionEntity {
32
+ class: SectionClass;
33
+ of: SectionSubject;
34
+ /** identity of the subject, in the spelling the rest of `Form` uses */
35
+ ref: string;
36
+ /** what the subject already says it is — a slab's face, an opening's leaf, a run's device */
37
+ kind?: string;
38
+ /** counter-clockwise in (u, z), like every outline `Form` returns */
39
+ polygon: SectionPt[];
40
+ /**
41
+ * How far behind the plane the nearest point of the body stands, mm. `0` for anything the plane
42
+ * crossed. **It is a distance, not a draw order** — `Form` holds no draw order, and whether to
43
+ * sort by this, fade by it or ignore it is the drawing's business.
44
+ */
45
+ depth: number;
46
+ }
47
+ export interface FormSection {
48
+ axis: SectionAxis;
49
+ at: number;
50
+ atRef?: string;
51
+ look: Edge;
52
+ entities: SectionEntity[];
53
+ }
54
+ /**
55
+ * The axis a direction of view crosses. Looking east or west crosses an X plane.
56
+ *
57
+ * A `look` that runs along the plane rather than across it draws nothing, so it is refused rather
58
+ * than answered — the same treatment `svgPlan` gives a level that was never declared.
59
+ */
60
+ export declare function axisOf(edge: Edge): SectionAxis;
61
+ /**
62
+ * The direction a section is looked at from when nobody said.
63
+ *
64
+ * The rule is statable rather than conventional: **on the default, `u` is the world coordinate
65
+ * along the cut line**, so a dimension taken off the plan carries into the section without being
66
+ * reversed. Looking the other way mirrors the sheet, which is why it has to be asked for.
67
+ */
68
+ export declare function defaultLook(axis: SectionAxis): Edge;
69
+ /**
70
+ * The section a vertical plane makes of a `Form`.
71
+ *
72
+ * The plane is named by an axis and a coordinate; `look` says which way it is faced, and must
73
+ * cross the plane rather than run along it.
74
+ */
75
+ export declare function sectionForm(form: Form, spec: SectionSpec): FormSection;
76
+ /**
77
+ * The elevation of one face — **a section whose plane misses the mass.**
78
+ *
79
+ * `face` names the side the viewer stands on: `S` is the south elevation, seen from the south.
80
+ * The plane is put at the extreme of the mass along the line of sight, so **nothing can straddle
81
+ * it and `cut` comes back empty by construction** rather than by a branch in the code. Where
82
+ * exactly it goes is free: the projection is orthographic, so moving the plane further back
83
+ * changes no `u` and no `z`, only the datum that `depth` is counted from.
84
+ */
85
+ export declare function elevationForm(form: Form, face: Edge): FormSection;
86
+ /** The area of a section polygon, mm². Used by the tests that hold the cut against the Form. */
87
+ export declare function sectionArea(polygon: SectionPt[]): number;
88
+ //# sourceMappingURL=section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../src/core/section.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,IAAI,EAAM,MAAM,YAAY,CAAC;AAI3C,kEAAkE;AAClE,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,GAAG,CAAC;AAEpC;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE5C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC;AAE1F,oGAAoG;AACpG,MAAM,WAAW,SAAS;IACxB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,yDAAyD;AACzD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,WAAW,CAAC;IAClB,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,YAAY,CAAC;IACpB,EAAE,EAAE,cAAc,CAAC;IACnB,uEAAuE;IACvE,GAAG,EAAE,MAAM,CAAC;IACZ,6FAA6F;IAC7F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,WAAW,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B;AAaD;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,WAAW,CAE9C;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAEnD;AA8ID;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,GAAG,WAAW,CAatE;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,WAAW,CAoBjE;AAED,gGAAgG;AAChG,wBAAgB,WAAW,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,MAAM,CAExD"}
@@ -0,0 +1,247 @@
1
+ // koyu — the section and the elevation (ADR-0064)
2
+ //
3
+ // **This reads a `Form` and nothing else.** Every body it cuts was raised by `derive` and
4
+ // enumerated by `formBodies` (bodies.ts). It composes no matter; it re-frames what came out of the
5
+ // one entry point to shape, which is what `planOf` does for a horizontal plane and this does for a
6
+ // vertical one.
7
+ //
8
+ // **Why it is here and not in `src/draw/`.** Everything a section needs is public on `Form`, so a
9
+ // renderer could compute one without tripping a single import gate. What forbids it is not a test
10
+ // but docs/why/plan-is-not-a-section.md: "this is a section, this is a projection" is decided by
11
+ // comparing a range against a plane, and left to the drawing side the thresholds differ per
12
+ // implementation, so one source yields two drawings. The comparison here is the same one, turned
13
+ // on its side.
14
+ //
15
+ // **What a vertical plane needs that a slice does not give.** A slice hands back flat pieces at
16
+ // one x and an empty background. A section is mostly what stands *behind* the plane — the far wall
17
+ // with its windows, the stair beyond the cut — and none of that falls out of cutting. Nor does the
18
+ // decision to throw the near half away, which is a choice of viewpoint and has to be an input.
19
+ import { formBodies } from "./bodies.js";
20
+ import { crossing, hull, signedArea } from "./poly.js";
21
+ import { EPS } from "./tolerance.js";
22
+ /** The direction of view as a unit vector in plan. */
23
+ function look(edge) {
24
+ return edge === "N"
25
+ ? { x: 0, y: 1 }
26
+ : edge === "S"
27
+ ? { x: 0, y: -1 }
28
+ : edge === "E"
29
+ ? { x: 1, y: 0 }
30
+ : { x: -1, y: 0 };
31
+ }
32
+ /**
33
+ * The axis a direction of view crosses. Looking east or west crosses an X plane.
34
+ *
35
+ * A `look` that runs along the plane rather than across it draws nothing, so it is refused rather
36
+ * than answered — the same treatment `svgPlan` gives a level that was never declared.
37
+ */
38
+ export function axisOf(edge) {
39
+ return edge === "E" || edge === "W" ? "X" : "Y";
40
+ }
41
+ /**
42
+ * The direction a section is looked at from when nobody said.
43
+ *
44
+ * The rule is statable rather than conventional: **on the default, `u` is the world coordinate
45
+ * along the cut line**, so a dimension taken off the plan carries into the section without being
46
+ * reversed. Looking the other way mirrors the sheet, which is why it has to be asked for.
47
+ */
48
+ export function defaultLook(axis) {
49
+ return axis === "X" ? "W" : "N";
50
+ }
51
+ /**
52
+ * Where the sheet's `u` axis points, in plan. **It is the viewer's right hand**: `u = d × ẑ`.
53
+ *
54
+ * Facing north, east is on your right; facing east, south is. Fixing it here is what makes one
55
+ * spec give one drawing — a renderer that guessed would mirror the building and no test would
56
+ * catch it.
57
+ */
58
+ function rightOf(d) {
59
+ return { x: d.y, y: -d.x };
60
+ }
61
+ /**
62
+ * The bodies a vertical plane may cut. **Outside and semi-outdoor spaces are dropped.** A storey's
63
+ * ceiling height reaches them, so they carry a z range, but no ceiling is derived over them
64
+ * (fabric.ts excludes both) and there is nothing above them to bound the air. Cutting one paints a
65
+ * garden as a room. A 3D scene keeps them, which is why the enumeration itself does not judge.
66
+ */
67
+ function cuttableBodies(form) {
68
+ const airless = new Set(form.spaces.filter((s) => s.outside || s.semiOutdoor).map((s) => s.path));
69
+ return formBodies(form).filter((b) => !(b.of === "space" && airless.has(b.ref)));
70
+ }
71
+ /** The polygon a body leaves on the plane, or `undefined` where the plane only grazes a corner. */
72
+ function cutOf(body, axis, at, u) {
73
+ const met = crossing(body.poly, axis, at);
74
+ if (!met)
75
+ return undefined;
76
+ const n = body.poly.length;
77
+ // The height at a crossing, read off the edge it sits on. **This is exact, not sampled** — a
78
+ // per-vertex height means the height is linear along each edge, which is all the reading assumes.
79
+ const at01 = (v, c) => v[c.edge] + c.t * (v[(c.edge + 1) % n] - v[c.edge]);
80
+ const ends = met.map((c) => ({
81
+ u: u(body.poly[c.edge]) + c.t * (u(body.poly[(c.edge + 1) % n]) - u(body.poly[c.edge])),
82
+ z0: at01(body.bottom, c),
83
+ z1: at01(body.top, c),
84
+ }));
85
+ const [a, b] = ends[0].u <= ends[1].u ? [ends[0], ends[1]] : [ends[1], ends[0]];
86
+ if (b.u - a.u <= EPS)
87
+ return undefined;
88
+ // Bottom-left, bottom-right, top-right, top-left — counter-clockwise with z up.
89
+ return [
90
+ { u: a.u, z: a.z0 },
91
+ { u: b.u, z: b.z0 },
92
+ { u: b.u, z: b.z1 },
93
+ { u: a.u, z: a.z1 },
94
+ ];
95
+ }
96
+ /**
97
+ * The shape a body throws onto the plane, seen head-on.
98
+ *
99
+ * A body of the `Form` is a prism over a convex ring whose top and bottom vary linearly, so it is
100
+ * a convex solid and **its shadow is the hull of its projected vertices** — exact, not an outline
101
+ * fitted to it. Where the top and bottom do not vary (everything but a ramp or an escalator) that
102
+ * hull is a rectangle, and it is taken directly.
103
+ */
104
+ function shadowOf(body, u) {
105
+ let uLo = Infinity;
106
+ let uHi = -Infinity;
107
+ let zLo = Infinity;
108
+ let zHi = -Infinity;
109
+ let level = true;
110
+ for (let i = 0; i < body.poly.length; i++) {
111
+ const v = u(body.poly[i]);
112
+ if (v < uLo)
113
+ uLo = v;
114
+ if (v > uHi)
115
+ uHi = v;
116
+ const b = body.bottom[i];
117
+ const t = body.top[i];
118
+ if (b < zLo)
119
+ zLo = b;
120
+ if (t > zHi)
121
+ zHi = t;
122
+ if (b !== body.bottom[0] || t !== body.top[0])
123
+ level = false;
124
+ }
125
+ if (uHi - uLo <= EPS || zHi - zLo <= EPS)
126
+ return undefined;
127
+ if (level) {
128
+ return [
129
+ { u: uLo, z: zLo },
130
+ { u: uHi, z: zLo },
131
+ { u: uHi, z: zHi },
132
+ { u: uLo, z: zHi },
133
+ ];
134
+ }
135
+ const pts = [];
136
+ for (let i = 0; i < body.poly.length; i++) {
137
+ const v = u(body.poly[i]);
138
+ pts.push({ x: v, y: body.bottom[i] }, { x: v, y: body.top[i] });
139
+ }
140
+ const ring = hull(pts);
141
+ return ring.length >= 3 ? ring.map((p) => ({ u: p.x, z: p.y })) : undefined;
142
+ }
143
+ function entitiesOf(bodies, spec) {
144
+ const d = look(spec.look);
145
+ const r = rightOf(d);
146
+ const u = (p) => p.x * r.x + p.y * r.y;
147
+ /** How far behind the plane a point stands. Positive is away from the viewer. */
148
+ const behind = (p) => (spec.axis === "X" ? (p.x - spec.at) * d.x : (p.y - spec.at) * d.y);
149
+ const out = [];
150
+ for (const body of bodies) {
151
+ let lo = Infinity;
152
+ let hi = -Infinity;
153
+ for (const p of body.poly) {
154
+ const f = behind(p);
155
+ if (f < lo)
156
+ lo = f;
157
+ if (f > hi)
158
+ hi = f;
159
+ }
160
+ // **The body is asked which side it is wholly on, not how far it reaches past the plane.**
161
+ // Asking the second question needs the body to extend more than the tolerance on both sides,
162
+ // which a body no wider than the tolerance itself can never do — a `t:1` wall standing on the
163
+ // plane reaches −0.5 and +0.5, and would be reported as standing behind a plane that goes
164
+ // straight through it.
165
+ const wholly = { behind: lo >= -EPS && hi > EPS, front: hi <= EPS && lo < -EPS };
166
+ if (!wholly.behind && !wholly.front) {
167
+ // It reaches both sides: the plane crossed it.
168
+ const polygon = cutOf(body, spec.axis, spec.at, u);
169
+ if (polygon) {
170
+ out.push({ class: "cut", of: body.of, ref: body.ref, ...(body.kind ? { kind: body.kind } : {}), polygon, depth: 0 });
171
+ }
172
+ continue;
173
+ }
174
+ // Wholly at or behind the plane. A space is a void — from outside there is nothing to see.
175
+ if (wholly.behind && body.of !== "space") {
176
+ const polygon = shadowOf(body, u);
177
+ if (polygon) {
178
+ out.push({
179
+ class: "beyond",
180
+ of: body.of,
181
+ ref: body.ref,
182
+ ...(body.kind ? { kind: body.kind } : {}),
183
+ polygon,
184
+ // A face within the tolerance of the plane counts as on it, so the nearest point can
185
+ // measure a hair negative. `depth` is a distance behind the plane and never less than 0.
186
+ depth: Math.max(0, lo),
187
+ });
188
+ }
189
+ }
190
+ // Otherwise it stands in front of the plane, behind the viewer, and is not produced.
191
+ }
192
+ return out;
193
+ }
194
+ /**
195
+ * The section a vertical plane makes of a `Form`.
196
+ *
197
+ * The plane is named by an axis and a coordinate; `look` says which way it is faced, and must
198
+ * cross the plane rather than run along it.
199
+ */
200
+ export function sectionForm(form, spec) {
201
+ if (axisOf(spec.look) !== spec.axis) {
202
+ throw new Error(`Looking ${spec.look} runs along the ${spec.axis} plane rather than across it (an X plane is looked at from E or W, a Y plane from N or S)`);
203
+ }
204
+ return {
205
+ axis: spec.axis,
206
+ at: spec.at,
207
+ ...(spec.atRef !== undefined ? { atRef: spec.atRef } : {}),
208
+ look: spec.look,
209
+ entities: entitiesOf(cuttableBodies(form), spec),
210
+ };
211
+ }
212
+ /**
213
+ * The elevation of one face — **a section whose plane misses the mass.**
214
+ *
215
+ * `face` names the side the viewer stands on: `S` is the south elevation, seen from the south.
216
+ * The plane is put at the extreme of the mass along the line of sight, so **nothing can straddle
217
+ * it and `cut` comes back empty by construction** rather than by a branch in the code. Where
218
+ * exactly it goes is free: the projection is orthographic, so moving the plane further back
219
+ * changes no `u` and no `z`, only the datum that `depth` is counted from.
220
+ */
221
+ export function elevationForm(form, face) {
222
+ // Standing to the south means looking north.
223
+ const from = face === "N" ? "S" : face === "S" ? "N" : face === "E" ? "W" : "E";
224
+ const axis = axisOf(from);
225
+ const d = look(from);
226
+ const bodies = cuttableBodies(form);
227
+ // The near extreme along the line of sight: looking towards the larger coordinate puts the plane
228
+ // at the smallest, and looking towards the smaller puts it at the largest.
229
+ const towardsLarger = (axis === "X" ? d.x : d.y) > 0;
230
+ let at = 0;
231
+ let seen = false;
232
+ for (const body of bodies) {
233
+ for (const p of body.poly) {
234
+ const c = axis === "X" ? p.x : p.y;
235
+ if (!seen || (towardsLarger ? c < at : c > at))
236
+ at = c;
237
+ seen = true;
238
+ }
239
+ }
240
+ const spec = { axis, at, look: from };
241
+ return { axis, at, look: from, entities: entitiesOf(bodies, spec) };
242
+ }
243
+ /** The area of a section polygon, mm². Used by the tests that hold the cut against the Form. */
244
+ export function sectionArea(polygon) {
245
+ return Math.abs(signedArea(polygon.map((p) => ({ x: p.u, y: p.z }))));
246
+ }
247
+ //# sourceMappingURL=section.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section.js","sourceRoot":"","sources":["../../src/core/section.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,0FAA0F;AAC1F,mGAAmG;AACnG,mGAAmG;AACnG,gBAAgB;AAChB,EAAE;AACF,kGAAkG;AAClG,kGAAkG;AAClG,iGAAiG;AACjG,4FAA4F;AAC5F,iGAAiG;AACjG,eAAe;AACf,EAAE;AACF,gGAAgG;AAChG,mGAAmG;AACnG,mGAAmG;AACnG,+FAA+F;AAE/F,OAAO,EAAE,UAAU,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AAE,CAAC;gBAAE,EAAE,GAAG,CAAC,CAAC;YACvD,IAAI,GAAG,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,MAAM,IAAI,GAAgB,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACnD,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC;AACtE,CAAC;AAED,gGAAgG;AAChG,MAAM,UAAU,WAAW,CAAC,OAAoB;IAC9C,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACxE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"axo.d.ts","sourceRoot":"","sources":["../../src/draw/axo.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,KAAK,EAAW,MAAM,kBAAkB,CAAC;AAEvD,MAAM,WAAW,UAAU;IACzB,mCAAmC;IACnC,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAChC,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oBAAoB;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qBAAqB;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AA2BD,gDAAgD;AAChD,wBAAgB,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,GAAE,UAAe,GAAG,MAAM,CA+IlE"}
1
+ {"version":3,"file":"axo.d.ts","sourceRoot":"","sources":["../../src/draw/axo.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,KAAK,EAAW,MAAM,kBAAkB,CAAC;AAGvD,MAAM,WAAW,UAAU;IACzB,mCAAmC;IACnC,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAChC,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oBAAoB;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qBAAqB;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAyBD,gDAAgD;AAChD,wBAAgB,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,GAAE,UAAe,GAAG,MAAM,CAmIlE"}
package/dist/draw/axo.js CHANGED
@@ -13,8 +13,7 @@
13
13
  // as a body with its junctions already settled — there is no corner to repair here. What this page
14
14
  // decides is the projection, the shading, the stacking order and the page.
15
15
  import { columnRect, derive, runPrism } from "../core/derive.js";
16
- const INK = "#1f1f1f";
17
- const PAPER = "#faf8f4";
16
+ import { esc, Extent, INK, openSheet, r2 } from "./sheet.js";
18
17
  /** 地盤面を見せる版の下端・上端 mm — 導出値ではなく紙の側の約束 */
19
18
  const GROUND_Z0 = -400;
20
19
  const GROUND_Z1 = -100;
@@ -106,37 +105,22 @@ export function svgAxo(model, opts = {}) {
106
105
  throw new Error("There is nothing to draw");
107
106
  // ---- 投影して奥から描く (画家のアルゴリズム) ----
108
107
  prisms.sort((a, b) => a.depth - b.depth);
109
- // **外接範囲は畳んで取る。**Math.min(...pts) は引数の数がスタックの限界に当たる —
110
- // 開口で割られた壁は区間ごとに一片なので、大きな例では十万点を超える
111
- let minX = Infinity;
112
- let maxX = -Infinity;
113
- let minY = Infinity;
114
- let maxY = -Infinity;
115
- const see = (p) => {
116
- if (p[0] < minX)
117
- minX = p[0];
118
- if (p[0] > maxX)
119
- maxX = p[0];
120
- if (p[1] < minY)
121
- minY = p[1];
122
- if (p[1] > maxY)
123
- maxY = p[1];
124
- };
108
+ // **外接範囲は畳んで取る** (Extent) — 引数を展開すると点の数がスタックの限界に当たる
109
+ const ext = new Extent();
125
110
  for (const pr of prisms) {
126
111
  for (let i = 0; i < pr.poly.length; i++) {
127
- see(proj(pr.poly[i], pr.top[i]));
128
- see(proj(pr.poly[i], pr.bottom[i]));
112
+ const t = proj(pr.poly[i], pr.top[i]);
113
+ const b = proj(pr.poly[i], pr.bottom[i]);
114
+ ext.see(t[0], t[1]);
115
+ ext.see(b[0], b[1]);
129
116
  }
130
117
  }
131
118
  const M = 40;
132
- const W = (maxX - minX) * scale + M * 2;
133
- const H = (maxY - minY) * scale + M * 2;
134
- const sx = (v) => (v - minX) * scale + M;
135
- const sy = (v) => (v - minY) * scale + M;
136
- const out = [
137
- `<svg xmlns="http://www.w3.org/2000/svg" width="${W}" height="${H}" viewBox="0 0 ${W} ${H}" font-family="'Hiragino Sans','Noto Sans JP',sans-serif">`,
138
- `<rect width="${W}" height="${H}" fill="${PAPER}"/>`,
139
- ];
119
+ const W = (ext.max0 - ext.min0) * scale + M * 2;
120
+ const H = (ext.max1 - ext.min1) * scale + M * 2;
121
+ const sx = (v) => (v - ext.min0) * scale + M;
122
+ const sy = (v) => (v - ext.min1) * scale + M;
123
+ const out = openSheet(W, H);
140
124
  const face = (ring, fill, shade) => {
141
125
  const d = ring.map(([x, y], i) => `${i === 0 ? "M" : "L"} ${r2(sx(x))} ${r2(sy(y))}`).join(" ");
142
126
  return `<path d="${d} Z" fill="${tint(fill, shade)}" stroke="${INK}" stroke-width="0.35" stroke-opacity="0.5"/>`;
@@ -167,7 +151,7 @@ export function svgAxo(model, opts = {}) {
167
151
  const top = pr.poly.map((p, i) => proj(p, pr.top[i]));
168
152
  out.push(face(top, pr.fill, 1));
169
153
  }
170
- out.push(`<text x="${M - 24}" y="${H - 12}" font-size="11" fill="${INK}">${esc(model.name ?? "Untitled")} — axonometric (from ${dir})</text>`, `<text x="${W - M + 24}" y="${H - 12}" text-anchor="end" font-size="8.5" fill="#a49b8a">koyu — generated from spaces (floors, roofs, walls, columns, vertical circulation)</text>`, "</svg>");
154
+ out.push(`<text x="${M - 24}" y="${H - 12}" font-size="11" fill="${INK}">${esc(model.name ?? "Untitled")} — axonometric (from ${dir})</text>`, "</svg>");
171
155
  return out.join("\n") + "\n";
172
156
  }
173
157
  function signedArea(ring) {
@@ -185,6 +169,4 @@ function tint(hex, k) {
185
169
  const ch = [n >> 16, (n >> 8) & 255, n & 255].map((v) => Math.round(Math.min(255, v * k)));
186
170
  return `#${ch.map((v) => v.toString(16).padStart(2, "0")).join("")}`;
187
171
  }
188
- const r2 = (v) => Math.round(v * 100) / 100;
189
- const esc = (s) => s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
190
172
  //# sourceMappingURL=axo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"axo.js","sourceRoot":"","sources":["../../src/draw/axo.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,mGAAmG;AACnG,mGAAmG;AACnG,kDAAkD;AAClD,EAAE;AACF,8FAA8F;AAC9F,8FAA8F;AAC9F,4BAA4B;AAC5B,EAAE;AACF,6FAA6F;AAC7F,kGAAkG;AAClG,kGAAkG;AAClG,mGAAmG;AACnG,2EAA2E;AAE3E,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AA0BjE,MAAM,GAAG,GAAG,SAAS,CAAC;AACtB,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,wCAAwC;AACxC,MAAM,SAAS,GAAG,CAAC,GAAG,CAAC;AACvB,MAAM,SAAS,GAAG,CAAC,GAAG,CAAC;AACvB,MAAM,CAAC,GAAG;IACR,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,SAAS;IAC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AAC,CAAC;IAC3F,OAAO,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;AACvE,CAAC"}
@@ -1,3 +1,7 @@
1
1
  export { svgPlan, type PlanOptions } from "./plan.js";
2
+ export { planMarks, SLIDE_POCKET, type Mark, type MarkArc, type MarkNote, type MarkOptions, type MarkRole, type MarkSubject, } from "./marks.js";
2
3
  export { svgAxo, type AxoOptions } from "./axo.js";
4
+ export { sceneOf, type Scene, type SceneFacts, type SceneLevel, type SceneLine, type SceneMark, type SceneNode, type ScenePrism, type SceneRole, type SceneSubject, } from "./scene.js";
5
+ export { svgSection, svgElevation, type SectionOptions, type ElevationOptions } from "./section.js";
6
+ export { writtenOf, type Written } from "./written.js";
3
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/draw/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/draw/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EACL,SAAS,EACT,YAAY,EACZ,KAAK,IAAI,EACT,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EACL,OAAO,EACP,KAAK,KAAK,EACV,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,YAAY,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,KAAK,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACpG,OAAO,EAAE,SAAS,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC"}
@@ -7,5 +7,9 @@
7
7
  // ルートからも同じものが出ている (`@kensnzk/koyu`)。分けてあるのは、
8
8
  // **凍る面と凍らない面を、import 一行で見分けられるようにするため**である。
9
9
  export { svgPlan } from "./plan.js";
10
+ export { planMarks, SLIDE_POCKET, } from "./marks.js";
10
11
  export { svgAxo } from "./axo.js";
12
+ export { sceneOf, } from "./scene.js";
13
+ export { svgSection, svgElevation } from "./section.js";
14
+ export { writtenOf } from "./written.js";
11
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/draw/index.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,EAAE;AACF,uEAAuE;AACvE,2CAA2C;AAC3C,uBAAuB;AACvB,EAAE;AACF,6CAA6C;AAC7C,6CAA6C;AAE7C,OAAO,EAAE,OAAO,EAAoB,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,MAAM,EAAmB,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/draw/index.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,EAAE;AACF,uEAAuE;AACvE,2CAA2C;AAC3C,uBAAuB;AACvB,EAAE;AACF,6CAA6C;AAC7C,6CAA6C;AAE7C,OAAO,EAAE,OAAO,EAAoB,MAAM,WAAW,CAAC;AACtD,OAAO,EACL,SAAS,EACT,YAAY,GAOb,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAmB,MAAM,UAAU,CAAC;AACnD,OAAO,EACL,OAAO,GAUR,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,YAAY,EAA8C,MAAM,cAAc,CAAC;AACpG,OAAO,EAAE,SAAS,EAAgB,MAAM,cAAc,CAAC"}
@@ -0,0 +1,126 @@
1
+ import { type Form, type PlanClass, type PlanEntity } from "../core/derive.js";
2
+ import { type Pt } from "../core/model.js";
3
+ import type { RunDevice, Seg2 } from "../core/vertical.js";
4
+ /**
5
+ * A mark's role. The consumer decides stroke weight, colour, dash and every word from it.
6
+ *
7
+ * **Closed, and meant to be.** A consumer that spells `Record<MarkRole, …>` stops compiling when
8
+ * koyu adds one, which is the point — the alternative is a mark that silently never appears.
9
+ */
10
+ export type MarkRole =
11
+ /** a space's face, cut by the plane */
12
+ "space"
13
+ /** the same, where the space is declared semi-outdoor */
14
+ | "space-semi-outdoor"
15
+ /** a void's face — no floor, so no room */
16
+ | "space-void"
17
+ /** the void's two bounding-box diagonals (a drafting convention, not a shape of the building) */
18
+ | "void-hatch"
19
+ /** the body of a wall interval the plane cut */
20
+ | "wall"
21
+ /** the centreline of something that does not enclose (`air:1`) */
22
+ | "rail"
23
+ /** a relation with no matter (`type:open`) — a centreline and nothing else */
24
+ | "open"
25
+ /** the band of a segment that does not count */
26
+ | "seg"
27
+ /** a non-door opening's centreline */
28
+ | "window"
29
+ /** hinge to leaf tip */
30
+ | "door-leaf"
31
+ /** the swing trace */
32
+ | "door-arc"
33
+ /** a sliding door's pocket panel */
34
+ | "slide-panel"
35
+ /** its setback line */
36
+ | "slide-tail" | "column" | "run-outline" | "run-tread"
37
+ /** where the plane crosses the run — one line; making two of it is the consumer's convention */
38
+ | "run-break" | "run-arrow"
39
+ /** a seat only. The note has no geometry, and no words either */
40
+ | "run-note"
41
+ /** the projection of an upper void onto the plan below */
42
+ | "void-above";
43
+ /** Pinned to `Form` by construction, so it cannot drift from what `derive` produced. */
44
+ export type MarkArc = NonNullable<PlanEntity["arc"]>;
45
+ /** What a mark stands for. `PlanSubject` plus the two Form arrays that make marks without entities. */
46
+ export type MarkSubject = "space" | "boundary" | "opening" | "column" | "run" | "seg";
47
+ /**
48
+ * The facts an annotation is worded from. **No wording, no units, no rounding** — a ramp at
49
+ * `slope = 1/12.5` is "1/13" to one consumer and "1/12.5" to another, and that disagreement
50
+ * belongs to them, not here.
51
+ */
52
+ export type MarkNote =
53
+ /** direction of travel at an arrow's tail */
54
+ {
55
+ of: "direction";
56
+ up: boolean;
57
+ }
58
+ /** a stair's proportions, exactly as `FormRun` carries them */
59
+ | {
60
+ of: "stair";
61
+ risers: number;
62
+ riser: number;
63
+ tread: number;
64
+ going: number;
65
+ rise: number;
66
+ }
67
+ /** a ramp, escalator or lift. `slope` is rise over run; "1/N" is a spelling, not a number */
68
+ | {
69
+ of: "incline";
70
+ device: RunDevice;
71
+ lanes: number;
72
+ slope: number;
73
+ rise: number;
74
+ };
75
+ export interface Mark {
76
+ role: MarkRole;
77
+ of: MarkSubject;
78
+ /** the subject's identity: a space's or run's `path`, otherwise the Form `ref` */
79
+ ref: string;
80
+ /**
81
+ * The classification `Form` gave the subject, carried through unchanged. Marks with no backing
82
+ * entity (`seg`, `void-hatch`, the two sliding marks) carry `"cut"` — they show at the cut.
83
+ */
84
+ class: PlanClass;
85
+ polygon?: Pt[];
86
+ lines?: Seg2[];
87
+ arc?: MarkArc;
88
+ /** where a symbol or annotation is seated. A point, never a string */
89
+ at?: Pt;
90
+ note?: MarkNote;
91
+ /**
92
+ * Place in the canonical order — the only route back to what was written. `boundary` indexes
93
+ * `canonicalBoundaryOrder(model)`, **never `model.boundaries`** (ADR-0041): declaration order is
94
+ * information the canonical form discards, so indexing by it reads a different boundary's `spec`
95
+ * and nothing throws. Never parse `ref` for this.
96
+ */
97
+ written?: {
98
+ boundary: number;
99
+ index?: number;
100
+ };
101
+ /** the two spaces a boundary-derived mark relates */
102
+ pair?: {
103
+ a: string;
104
+ b: string;
105
+ };
106
+ }
107
+ /**
108
+ * Setback of a sliding door's pocket panel from the wall face, mm.
109
+ *
110
+ * **A drafting convention, not a derivation default.** It is not in the ledger of derivation
111
+ * constants because no shape of the building depends on it; all three implementations spell 110.
112
+ */
113
+ export declare const SLIDE_POCKET = 110;
114
+ export interface MarkOptions {
115
+ /** override `SLIDE_POCKET` */
116
+ slidePocket?: number;
117
+ }
118
+ /**
119
+ * The marks drawn on one level's plan, from `Form`.
120
+ *
121
+ * **The model is not read.** Grid lines, `area` frames, space names, the north arrow and the sheet
122
+ * title are written givens, and the consumer draws them separately from what it wrote. Returns an
123
+ * empty list where the level has no plan.
124
+ */
125
+ export declare function planMarks(form: Form, level: string, opts?: MarkOptions): Mark[];
126
+ //# sourceMappingURL=marks.d.ts.map