opencalque 1.12.0 → 1.13.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/dist/cli.js +432 -60
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -21868,14 +21868,14 @@ function sightDepth(outline2, s, along2, off) {
|
|
|
21868
21868
|
if (nearest === -Infinity) nearest = Math.max(...outline2.map(off));
|
|
21869
21869
|
return -nearest;
|
|
21870
21870
|
}
|
|
21871
|
-
function covers(over,
|
|
21872
|
-
const spans = over.filter((b) => b.minY <=
|
|
21873
|
-
let reached =
|
|
21871
|
+
function covers(over, box2) {
|
|
21872
|
+
const spans = over.filter((b) => b.minY <= box2.minY + ON_FACE && b.maxY >= box2.maxY - ON_FACE).map((b) => [b.minX, b.maxX]).sort((p, q) => p[0] - q[0]);
|
|
21873
|
+
let reached = box2.minX;
|
|
21874
21874
|
for (const [x0, x1] of spans) {
|
|
21875
21875
|
if (x0 > reached + ON_FACE) break;
|
|
21876
21876
|
reached = Math.max(reached, x1);
|
|
21877
21877
|
}
|
|
21878
|
-
return reached >=
|
|
21878
|
+
return reached >= box2.maxX - ON_FACE;
|
|
21879
21879
|
}
|
|
21880
21880
|
var joined = (one, other) => [one.a, one.b].some((p) => distToBody(p, other) <= ON_FACE) || [other.a, other.b].some((p) => distToBody(p, one) <= ON_FACE);
|
|
21881
21881
|
function joinedRuns(pieces) {
|
|
@@ -21984,7 +21984,7 @@ function layout(view, doc, registry3, measure = () => []) {
|
|
|
21984
21984
|
const d = norm(sub(node2.b, node2.a));
|
|
21985
21985
|
const along2 = (p) => dot(sub(p, node2.a), d);
|
|
21986
21986
|
const at2 = (s, h) => ({ x: node2.x + s, y: node2.y - h });
|
|
21987
|
-
const
|
|
21987
|
+
const box2 = (s0, s1, h0, h1) => [at2(s0, h0), at2(s1, h0), at2(s1, h1), at2(s0, h1)];
|
|
21988
21988
|
const within = (s) => s >= -ON_FACE && s <= length2 + ON_FACE;
|
|
21989
21989
|
const placed = (object3, shapes, h) => {
|
|
21990
21990
|
const origin = applyTransform({ x: 0, y: 0 }, object3);
|
|
@@ -22008,10 +22008,10 @@ function layout(view, doc, registry3, measure = () => []) {
|
|
|
22008
22008
|
const items = [];
|
|
22009
22009
|
const drawnFirst = /* @__PURE__ */ new Map();
|
|
22010
22010
|
const shown = (object3, role, prims) => {
|
|
22011
|
-
const
|
|
22011
|
+
const box3 = prims.map(primitiveBounds).reduce((all, one) => one ? all ? unionBounds(all, one) : one : all, null);
|
|
22012
22012
|
const kind = object3.type === "parametric" ? registry3.parametric.get(object3.kind) : void 0;
|
|
22013
|
-
if (
|
|
22014
|
-
const item = { node: object3, role, box:
|
|
22013
|
+
if (box3) {
|
|
22014
|
+
const item = { node: object3, role, box: box3, raises: role !== "opening" || !!kind?.sill };
|
|
22015
22015
|
items.push(item);
|
|
22016
22016
|
if (prims[0]) drawnFirst.set(item, prims[0]);
|
|
22017
22017
|
}
|
|
@@ -22057,7 +22057,7 @@ function layout(view, doc, registry3, measure = () => []) {
|
|
|
22057
22057
|
const height = heightOf(doc, wall);
|
|
22058
22058
|
const faces = [];
|
|
22059
22059
|
layers.push({ from, to, depth: depthOn(ends2), prims: faces });
|
|
22060
|
-
faces.push({ kind: "path", points:
|
|
22060
|
+
faces.push({ kind: "path", points: box2(from, to, 0, height), closed: true, fill: WALL_SEEN, own: true });
|
|
22061
22061
|
for (const { node: opening } of wallOpenings(doc, wall, registry3)) {
|
|
22062
22062
|
if (!shownOnPlan(doc, opening)) continue;
|
|
22063
22063
|
const kind = registry3.parametric.get(opening.kind);
|
|
@@ -22068,7 +22068,7 @@ function layout(view, doc, registry3, measure = () => []) {
|
|
|
22068
22068
|
const own2 = kind.front?.(props);
|
|
22069
22069
|
const [bottom, top] = heightsOf(kind, props, height);
|
|
22070
22070
|
const [s0, s1] = span.map(along2);
|
|
22071
|
-
faces.push(...shown(opening, "opening", own2 ? placed(opening, own2, 0) : [{ kind: "path", points:
|
|
22071
|
+
faces.push(...shown(opening, "opening", own2 ? placed(opening, own2, 0) : [{ kind: "path", points: box2(Math.min(s0, s1), Math.max(s0, s1), bottom, top), closed: true }]));
|
|
22072
22072
|
}
|
|
22073
22073
|
for (const object3 of wallMounted(doc, wall, registry3)) {
|
|
22074
22074
|
if (!shownOnPlan(doc, object3)) continue;
|
|
@@ -22118,11 +22118,11 @@ function layout(view, doc, registry3, measure = () => []) {
|
|
|
22118
22118
|
}
|
|
22119
22119
|
const [bottom, top] = heightsOf(kind, registry3.resolveProps(kind, through.node.props), height);
|
|
22120
22120
|
for (const [h0, h1] of [[0, bottom], [top, height]].filter(([h02, h12]) => h12 - h02 > 1)) {
|
|
22121
|
-
layers.push({ from: taken[0], to: taken[1], depth: () => 0, prims: [{ kind: "path", points:
|
|
22121
|
+
layers.push({ from: taken[0], to: taken[1], depth: () => 0, prims: [{ kind: "path", points: box2(taken[0], taken[1], h0, h1), closed: true, fill: WALL_GREY, own: true }] });
|
|
22122
22122
|
}
|
|
22123
22123
|
}
|
|
22124
22124
|
for (const run of joinedRuns(inWay)) {
|
|
22125
|
-
layers.push({ from: run.from, to: run.to, depth: run.depth, prims: [{ kind: "path", points:
|
|
22125
|
+
layers.push({ from: run.from, to: run.to, depth: run.depth, prims: [{ kind: "path", points: box2(run.from, run.to, 0, run.height), closed: true, fill: WALL_GREY, own: true }] });
|
|
22126
22126
|
}
|
|
22127
22127
|
for (const leaf of drawnBy ? leavesOf(doc, rootOf(doc, node2.parent)?.id ?? "") : []) {
|
|
22128
22128
|
if (leaf.type !== "instance" && leaf.type !== "parametric" || !shownOnPlan(doc, leaf)) continue;
|
|
@@ -22149,7 +22149,7 @@ function layout(view, doc, registry3, measure = () => []) {
|
|
|
22149
22149
|
const from = Math.max(0, Math.min(...ss));
|
|
22150
22150
|
const to = Math.min(length2, Math.max(...ss));
|
|
22151
22151
|
if (to - from < 1) continue;
|
|
22152
|
-
const drawn = looks ? looks.map(standingWeight) : [{ kind: "path", points:
|
|
22152
|
+
const drawn = looks ? looks.map(standingWeight) : [{ kind: "path", points: box2(from, to, raised, raised + tall), closed: true, strokeWidth: STANDING_WEIGHT, own: true }];
|
|
22153
22153
|
layers.push({ from, to, depth: depthOn(seenOf(points)), prims: shown(leaf, "standing", drawn) });
|
|
22154
22154
|
}
|
|
22155
22155
|
const onFaces = new Set(items.filter((item) => item.role === "fixed").map((item) => item.node.id));
|
|
@@ -22171,7 +22171,7 @@ function layout(view, doc, registry3, measure = () => []) {
|
|
|
22171
22171
|
layers.push({ from: Math.max(0, Math.min(...ss)), to: Math.min(length2, Math.max(...ss)), depth: depthOn(seenOf(points)), prims });
|
|
22172
22172
|
}
|
|
22173
22173
|
const [x0, x1] = [node2.x, node2.x + length2];
|
|
22174
|
-
const ends =
|
|
22174
|
+
const ends = box2(0, length2, -VIEW_HEIGHT, VIEW_HEIGHT);
|
|
22175
22175
|
const clipped = (p) => {
|
|
22176
22176
|
const b = primitiveBounds(p);
|
|
22177
22177
|
return b && (b.minX < x0 - ON_FACE || b.maxX > x1 + ON_FACE) ? { ...p, clip: [...p.clip ?? [], ends] } : p;
|
|
@@ -22512,9 +22512,9 @@ function linkPort(doc, registry3, link, side) {
|
|
|
22512
22512
|
return (named2 === void 0 ? void 0 : ports.find((port) => port.key === named2)) ?? ports[0] ?? null;
|
|
22513
22513
|
}
|
|
22514
22514
|
function boxOf(prims) {
|
|
22515
|
-
return prims.reduce((
|
|
22515
|
+
return prims.reduce((box2, prim) => unionBounds(box2, primitiveBounds(prim)), null);
|
|
22516
22516
|
}
|
|
22517
|
-
var inside2 = (p,
|
|
22517
|
+
var inside2 = (p, box2) => p.x > box2.minX && p.x < box2.maxX && p.y > box2.minY && p.y < box2.maxY;
|
|
22518
22518
|
var middles = /* @__PURE__ */ new WeakMap();
|
|
22519
22519
|
function middleOf(doc, root) {
|
|
22520
22520
|
let known = middles.get(doc.nodes);
|
|
@@ -22541,7 +22541,7 @@ function linkEnds(doc, link, drawn) {
|
|
|
22541
22541
|
if (ends.some((end) => !isVisible(doc, end) || rootOf(doc, end.parent) !== root)) return null;
|
|
22542
22542
|
const [first, second] = ends.map((end) => boxOf(drawn(end)));
|
|
22543
22543
|
if (!first || !second) return null;
|
|
22544
|
-
const middle = (
|
|
22544
|
+
const middle = (box2) => ({ x: (box2.minX + box2.maxX) / 2, y: (box2.minY + box2.maxY) / 2 });
|
|
22545
22545
|
return { boxes: [first, second], a: middle(first), b: middle(second) };
|
|
22546
22546
|
}
|
|
22547
22547
|
var leftOf = (a, b) => {
|
|
@@ -22849,13 +22849,13 @@ function tablePrimitives(node2, doc, registry3, symbol) {
|
|
|
22849
22849
|
return out;
|
|
22850
22850
|
}
|
|
22851
22851
|
function fitted(prims, x, y, width, height) {
|
|
22852
|
-
const
|
|
22853
|
-
if (!
|
|
22854
|
-
const w =
|
|
22855
|
-
const h =
|
|
22852
|
+
const box2 = prims.map(primitiveBounds).reduce(unionBounds, null);
|
|
22853
|
+
if (!box2 || width <= 0 || height <= 0) return [];
|
|
22854
|
+
const w = box2.maxX - box2.minX;
|
|
22855
|
+
const h = box2.maxY - box2.minY;
|
|
22856
22856
|
const scale2 = Math.min(w > 0 ? width / w : Infinity, h > 0 ? height / h : Infinity);
|
|
22857
22857
|
if (!Number.isFinite(scale2) || scale2 <= 0) return [];
|
|
22858
|
-
const at2 = { x: x + width / 2 - (
|
|
22858
|
+
const at2 = { x: x + width / 2 - (box2.minX + box2.maxX) / 2 * scale2, y: y + height / 2 - (box2.minY + box2.maxY) / 2 * scale2, scale: scale2 };
|
|
22859
22859
|
return prims.map((p) => ({ ...transformPrimitive(p, at2), own: true }));
|
|
22860
22860
|
}
|
|
22861
22861
|
|
|
@@ -22952,9 +22952,9 @@ function heightLabel(node2, own2, ctx) {
|
|
|
22952
22952
|
const mount = node2.showHeight ? mountOf(node2, ctx.registry) : null;
|
|
22953
22953
|
const z = mount?.on === "wall" ? heightAboveFloor(node2, ctx.registry) : null;
|
|
22954
22954
|
if (!mount || z === null) return [];
|
|
22955
|
-
const
|
|
22955
|
+
const box2 = own2.map(primitiveBounds).reduce((all, one) => unionBounds(all, one), null);
|
|
22956
22956
|
const up = mount.out === "up";
|
|
22957
|
-
const local = { x:
|
|
22957
|
+
const local = { x: box2 ? (box2.minX + box2.maxX) / 2 : 0, y: up ? (box2?.minY ?? 0) - HEIGHT_LABEL * 0.9 : (box2?.maxY ?? 0) + HEIGHT_LABEL * 0.9 };
|
|
22958
22958
|
const at2 = applyTransform(local, node2);
|
|
22959
22959
|
return [{ kind: "text", x: at2.x, y: at2.y + HEIGHT_LABEL * 0.35, text: heightText(z, ctx.doc.settings), size: HEIGHT_LABEL, align: "center" }];
|
|
22960
22960
|
}
|
|
@@ -23757,10 +23757,10 @@ function massOf(shapes) {
|
|
|
23757
23757
|
return { shapes: kept, bounds, cells };
|
|
23758
23758
|
}
|
|
23759
23759
|
function near(mass, a, b, margin) {
|
|
23760
|
-
const
|
|
23760
|
+
const box2 = { minX: Math.min(a.x, b.x) - margin, minY: Math.min(a.y, b.y) - margin, maxX: Math.max(a.x, b.x) + margin, maxY: Math.max(a.y, b.y) + margin };
|
|
23761
23761
|
const found = /* @__PURE__ */ new Set();
|
|
23762
|
-
for (const key of cellsOf(
|
|
23763
|
-
return [...found].sort((i, j) => i - j).filter((i) => mass.bounds[i].minX <=
|
|
23762
|
+
for (const key of cellsOf(box2)) for (const i of mass.cells.get(key) ?? []) found.add(i);
|
|
23763
|
+
return [...found].sort((i, j) => i - j).filter((i) => mass.bounds[i].minX <= box2.maxX && mass.bounds[i].maxX >= box2.minX && mass.bounds[i].minY <= box2.maxY && mass.bounds[i].maxY >= box2.minY).map((i) => mass.shapes[i]);
|
|
23764
23764
|
}
|
|
23765
23765
|
function runsAlong(shape, p, q) {
|
|
23766
23766
|
const length2 = Math.hypot(q.x - p.x, q.y - p.y);
|
|
@@ -23857,12 +23857,31 @@ function mergedOutlines(merged) {
|
|
|
23857
23857
|
}
|
|
23858
23858
|
|
|
23859
23859
|
// packages/core/src/scene.ts
|
|
23860
|
+
function itemOf(node2, doc, registry3, prims) {
|
|
23861
|
+
const held = node2.type === "group" ? leavesOf(doc, node2.id).filter((leaf) => isVisible(doc, leaf)) : [node2];
|
|
23862
|
+
const area = held.flatMap((leaf) => openingArea(doc, leaf, registry3) ?? []);
|
|
23863
|
+
const bounds = area.reduce((b, outline2) => unionBounds(b, boundsOfPoints(outline2)), boundsOf(prims));
|
|
23864
|
+
return { id: node2.id, node: node2, prims, bounds, locked: isLocked(doc, node2), ...area.length > 0 ? { area } : {} };
|
|
23865
|
+
}
|
|
23866
|
+
function openingArea(doc, node2, registry3) {
|
|
23867
|
+
if (node2.type !== "parametric") return null;
|
|
23868
|
+
const kind = registry3.parametric.get(node2.kind);
|
|
23869
|
+
const span = kind?.opening?.(registry3.resolveProps(kind, node2.props));
|
|
23870
|
+
if (!span) return null;
|
|
23871
|
+
const host2 = hostWall(doc, node2, registry3);
|
|
23872
|
+
if (!host2) return null;
|
|
23873
|
+
const half = host2.thickness / 2;
|
|
23874
|
+
const corners = [
|
|
23875
|
+
{ x: span.from, y: -half },
|
|
23876
|
+
{ x: span.to, y: -half },
|
|
23877
|
+
{ x: span.to, y: half },
|
|
23878
|
+
{ x: span.from, y: half }
|
|
23879
|
+
];
|
|
23880
|
+
return [corners.map((p) => applyTransform(p, node2))];
|
|
23881
|
+
}
|
|
23860
23882
|
function buildScene(doc, containerId, registry3) {
|
|
23861
23883
|
const ctx = { doc, registry: registry3, depth: 0 };
|
|
23862
|
-
const items = childrenOf(doc, containerId).filter((node2) => isVisible(doc, node2)).map((node2) =>
|
|
23863
|
-
const prims = nodePrimitives(node2, ctx);
|
|
23864
|
-
return { id: node2.id, node: node2, prims, bounds: boundsOf(prims), locked: isLocked(doc, node2) };
|
|
23865
|
-
});
|
|
23884
|
+
const items = childrenOf(doc, containerId).filter((node2) => isVisible(doc, node2)).map((node2) => itemOf(node2, doc, registry3, nodePrimitives(node2, ctx)));
|
|
23866
23885
|
const sheet = templateSheet(doc, containerId);
|
|
23867
23886
|
return sheet ? [sheet, ...items] : items;
|
|
23868
23887
|
}
|
|
@@ -25740,7 +25759,7 @@ function dxfOps(doc, parent, text2, options = {}) {
|
|
|
25740
25759
|
let note = "";
|
|
25741
25760
|
let top;
|
|
25742
25761
|
let height = 0;
|
|
25743
|
-
let
|
|
25762
|
+
let arrow2 = 0;
|
|
25744
25763
|
let kind;
|
|
25745
25764
|
const points = [];
|
|
25746
25765
|
const end = { x: 0, y: 0 };
|
|
@@ -25762,7 +25781,7 @@ function dxfOps(doc, parent, text2, options = {}) {
|
|
|
25762
25781
|
else if (where === "leader" && code === 40) run = parseFloat(value);
|
|
25763
25782
|
else if (where === "line" && code === 10) points.push({ x: parseFloat(value), y: next() });
|
|
25764
25783
|
else if (where === "after" && code === 170) kind ??= parseFloat(value);
|
|
25765
|
-
else if (where === "after" && code === 42)
|
|
25784
|
+
else if (where === "after" && code === 42) arrow2 ||= parseFloat(value);
|
|
25766
25785
|
});
|
|
25767
25786
|
if (points.length === 0) return null;
|
|
25768
25787
|
const said2 = formatted(note);
|
|
@@ -25782,7 +25801,7 @@ function dxfOps(doc, parent, text2, options = {}) {
|
|
|
25782
25801
|
shape = { bend: round2(2 * most / dist(a, b)) };
|
|
25783
25802
|
} else if (run > 0 && Math.abs(b.y - at(ctx.m, end.x, end.y).y) < 1e-6 && Math.abs(a.x - at(ctx.m, end.x, end.y).x) < 0.1 * Math.abs(a.y - b.y)) shape = { shape: "elbow" };
|
|
25784
25803
|
const font2 = said2.font;
|
|
25785
|
-
const node2 = { type: "annotation", a, b, text: said2.text, size, ...shape, ...
|
|
25804
|
+
const node2 = { type: "annotation", a, b, text: said2.text, size, ...shape, ...arrow2 ? { markerSize: round2(arrow2 * growth(ctx.m)) } : {}, ...font2 ? { font: font2 } : {} };
|
|
25786
25805
|
return { node: styled(node2, look(entity, ctx)) };
|
|
25787
25806
|
};
|
|
25788
25807
|
const dimension = (entity, ctx) => {
|
|
@@ -26010,23 +26029,23 @@ function dxfOps(doc, parent, text2, options = {}) {
|
|
|
26010
26029
|
const [wide, high2, shrink] = [number3(entity, 40), number3(entity, 41), ratio(entity)];
|
|
26011
26030
|
const seen = mul(shift(number3(entity, 10), number3(entity, 20)), mul([shrink, 0, 0, shrink, 0, 0], mul(shift(-number3(entity, 12), -number3(entity, 22)), mul(turned2(number3(entity, 51)), shift(-number3(entity, 17), -number3(entity, 27))))));
|
|
26012
26031
|
const corners = [at(onPaper, number3(entity, 10) - wide / 2, number3(entity, 20) + high2 / 2), at(onPaper, number3(entity, 10) + wide / 2, number3(entity, 20) - high2 / 2)];
|
|
26013
|
-
const
|
|
26014
|
-
if (
|
|
26032
|
+
const box2 = { minX: Math.max(corners[0].x, hasPaper ? 0 : -Infinity), minY: Math.max(corners[0].y, hasPaper ? 0 : -Infinity), maxX: Math.min(corners[1].x, hasPaper ? size[0] * n3 : Infinity), maxY: Math.min(corners[1].y, hasPaper ? size[1] * n3 : Infinity) };
|
|
26033
|
+
if (box2.maxX <= box2.minX || box2.maxY <= box2.minY) continue;
|
|
26015
26034
|
const frozen = new Set((entity.codes.get(331) ?? []).map((handle) => layerOfHandle.get(handle) ?? ""));
|
|
26016
26035
|
const ctx = { m: mul(onPaper, seen), frozen, depth: 0, made: /* @__PURE__ */ new Map() };
|
|
26017
26036
|
const before = count2;
|
|
26018
26037
|
const inView = every(model, ctx).filter((made) => {
|
|
26019
26038
|
const bounds2 = reach(made);
|
|
26020
|
-
return bounds2 && bounds2.maxX >=
|
|
26039
|
+
return bounds2 && bounds2.maxX >= box2.minX && bounds2.minX <= box2.maxX && bounds2.maxY >= box2.minY && bounds2.minY <= box2.maxY;
|
|
26021
26040
|
});
|
|
26022
26041
|
const leaves = (made) => made.children ? made.children.reduce((sum, child) => sum + leaves(child), 0) : 1;
|
|
26023
26042
|
count2 = before + inView.reduce((sum, made) => sum + leaves(made), 0);
|
|
26024
26043
|
if (inView.length === 0) continue;
|
|
26025
26044
|
const bounds = inView.map(reach).reduce(joined2, null);
|
|
26026
26045
|
const slack = 0.01 * k;
|
|
26027
|
-
const inside3 = bounds.minX >=
|
|
26046
|
+
const inside3 = bounds.minX >= box2.minX - slack && bounds.minY >= box2.minY - slack && bounds.maxX <= box2.maxX + slack && bounds.maxY <= box2.maxY + slack;
|
|
26028
26047
|
const group = inView.length === 1 && (inside3 || inView[0].children) ? inView[0] : { node: { type: "group" }, children: inView };
|
|
26029
|
-
if (!inside3) group.node.modifiers = [...group.node.modifiers ?? [], { type: "crop", frame: { x:
|
|
26048
|
+
if (!inside3) group.node.modifiers = [...group.node.modifiers ?? [], { type: "crop", frame: { x: box2.minX, y: box2.minY }, params: { width: round2(box2.maxX - box2.minX), height: round2(box2.maxY - box2.minY) } }];
|
|
26030
26049
|
content.push(group);
|
|
26031
26050
|
}
|
|
26032
26051
|
}
|
|
@@ -27253,7 +27272,7 @@ function toSVG(doc, containerId, registry3, options = {}) {
|
|
|
27253
27272
|
const scene = buildScene(doc, containerId, registry3);
|
|
27254
27273
|
const b = options.area ?? sceneBounds(scene) ?? { minX: 0, minY: 0, maxX: 1e3, maxY: 1e3 };
|
|
27255
27274
|
const margin = options.area ? 0 : Math.max(b.maxX - b.minX, b.maxY - b.minY) * 0.05 + 1;
|
|
27256
|
-
const
|
|
27275
|
+
const box2 = [b.minX - margin, b.minY - margin, b.maxX - b.minX + 2 * margin, b.maxY - b.minY + 2 * margin];
|
|
27257
27276
|
const clips = /* @__PURE__ */ new Map();
|
|
27258
27277
|
const clipped = (step) => {
|
|
27259
27278
|
let drawn = stepToSvg(step);
|
|
@@ -27267,9 +27286,9 @@ function toSVG(doc, containerId, registry3, options = {}) {
|
|
|
27267
27286
|
const body = paintOrder2(scene.flatMap((item) => item.prims)).map(clipped);
|
|
27268
27287
|
const defs = clips.size > 0 ? [`<defs>${[...clips].map(([points, id]) => `<clipPath id="${id}"><polygon points="${points}"/></clipPath>`).join("")}</defs>`] : [];
|
|
27269
27288
|
return [
|
|
27270
|
-
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${
|
|
27289
|
+
`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${box2.map(num).join(" ")}" font-family="sans-serif">`,
|
|
27271
27290
|
...defs,
|
|
27272
|
-
`<rect x="${num(
|
|
27291
|
+
`<rect x="${num(box2[0])}" y="${num(box2[1])}" width="${num(box2[2])}" height="${num(box2[3])}" fill="white"/>`,
|
|
27273
27292
|
...body,
|
|
27274
27293
|
"</svg>",
|
|
27275
27294
|
""
|
|
@@ -27428,10 +27447,10 @@ async function runDrawingTool(name, given, host2) {
|
|
|
27428
27447
|
if (input.area !== void 0 && !areaOf(input.area)) return missing('"area" must give numbers with maxX above minX and maxY above minY.');
|
|
27429
27448
|
const svg = toSVG(doc, root, registry3, { area: areaOf(input.area) });
|
|
27430
27449
|
const picture = await host2.picture(svg, PICTURE_PIXELS);
|
|
27431
|
-
const
|
|
27450
|
+
const box2 = svgBox(svg);
|
|
27432
27451
|
const mm2 = (n3) => Math.round(n3);
|
|
27433
27452
|
return {
|
|
27434
|
-
content: `This is what is drawn on "${doc.nodes[root].name ?? root}". The picture is ${picture.width} \xD7 ${picture.height} pixels and covers x from ${mm2(
|
|
27453
|
+
content: `This is what is drawn on "${doc.nodes[root].name ?? root}". The picture is ${picture.width} \xD7 ${picture.height} pixels and covers x from ${mm2(box2.minX)} to ${mm2(box2.maxX)} and y from ${mm2(box2.minY)} to ${mm2(box2.maxY)} mm, so one pixel is ${Math.round((box2.maxX - box2.minX) / picture.width * 10) / 10} mm, with y growing downward.`,
|
|
27435
27454
|
image: { mime: picture.mime, data: picture.data },
|
|
27436
27455
|
note: { kind: "looked-at-drawing" }
|
|
27437
27456
|
};
|
|
@@ -28190,6 +28209,94 @@ function cornerSofaSide(props) {
|
|
|
28190
28209
|
const { r, d } = cornerSofaSize(props);
|
|
28191
28210
|
return [rect(0, -LEGS, d, -ARM_TOP), line([pt(d, -SEAT2), pt(r - SOFA_ARM, -SEAT2), pt(r - SOFA_ARM, -ARM_TOP), pt(r, -ARM_TOP), pt(r, -LEGS), pt(d, -LEGS)]), line([pt(0, -ARM_TOP), pt(0, -BACK_TOP), pt(r, -BACK_TOP), pt(r, -ARM_TOP)]), ...feet(0, r)];
|
|
28192
28211
|
}
|
|
28212
|
+
var BANQUETTE_BASE = 370;
|
|
28213
|
+
var BANQUETTE_SEAT = 450;
|
|
28214
|
+
var BANQUETTE_PLINTH = 80;
|
|
28215
|
+
var BANQUETTE_END_TOP = 650;
|
|
28216
|
+
var BANQUETTE_PLACE = 600;
|
|
28217
|
+
var BANQUETTE_BACK = { Cushions: 150, Panel: 60 };
|
|
28218
|
+
var BANQUETTE_END = 40;
|
|
28219
|
+
var MIN_BANQUETTE = 600;
|
|
28220
|
+
var MIN_BANQUETTE_DEPTH = 350;
|
|
28221
|
+
var MAX_PLACES = 30;
|
|
28222
|
+
function banquetteParts({ width, depth, height, back, ends }) {
|
|
28223
|
+
const w = atLeast(MIN_BANQUETTE, width);
|
|
28224
|
+
const d = atLeast(MIN_BANQUETTE_DEPTH, depth);
|
|
28225
|
+
const left = ends === "Left" || ends === "Both" ? BANQUETTE_END : 0;
|
|
28226
|
+
const right = ends === "Right" || ends === "Both" ? BANQUETTE_END : 0;
|
|
28227
|
+
const [a, b] = [left, w - right];
|
|
28228
|
+
const n3 = Math.min(MAX_PLACES, Math.max(1, Math.round((b - a) / BANQUETTE_PLACE)));
|
|
28229
|
+
const places = Array.from({ length: n3 }, (_, i) => [a + (b - a) * i / n3, a + (b - a) * (i + 1) / n3]);
|
|
28230
|
+
const thick = BANQUETTE_BACK[back] ?? 0;
|
|
28231
|
+
const top = thick > 0 ? Math.max(BANQUETTE_SEAT + 100, Number(height) || 0) : BANQUETTE_SEAT;
|
|
28232
|
+
return { w, d, left, right, a, b, places, thick, top };
|
|
28233
|
+
}
|
|
28234
|
+
var banquette = {
|
|
28235
|
+
kind: "arch.banquette",
|
|
28236
|
+
label: "Banquette",
|
|
28237
|
+
category: "dining",
|
|
28238
|
+
description: "A bench built along the wall, its back against it. Pull its sides to make it longer: it takes a seat for about every 60 cm.",
|
|
28239
|
+
params: [
|
|
28240
|
+
{ ...WIDTH, label: "Length", default: 1800 },
|
|
28241
|
+
DEPTH(500),
|
|
28242
|
+
{ key: "height", label: "Height", type: "number", default: 900, unit: "length", shown: ({ back }) => back !== "None" },
|
|
28243
|
+
{ key: "back", label: "Back", type: "string", default: "Cushions", options: ["Cushions", "Panel", "None"] },
|
|
28244
|
+
{ key: "base", label: "Base", type: "string", default: "Closed", options: ["Closed", "Drawers", "Legs"] },
|
|
28245
|
+
{ key: "ends", label: "End panels", type: "string", default: "None", options: ["None", "Left", "Right", "Both"] }
|
|
28246
|
+
],
|
|
28247
|
+
box: sizedBox("width", "depth", MIN_BANQUETTE, MIN_BANQUETTE_DEPTH),
|
|
28248
|
+
mount: { on: "floor" },
|
|
28249
|
+
height: (props) => banquetteParts(props).top,
|
|
28250
|
+
build(props) {
|
|
28251
|
+
const { w, d, left, right, places, thick, back } = { ...banquetteParts(props), back: props.back };
|
|
28252
|
+
const prims = [outline([pt(0, 0), pt(w, 0), pt(w, d), pt(0, d)])];
|
|
28253
|
+
if (left) prims.push(line([pt(left, 0), pt(left, d)]));
|
|
28254
|
+
if (right) prims.push(line([pt(w - right, 0), pt(w - right, d)]));
|
|
28255
|
+
for (const [x0, x1] of places) {
|
|
28256
|
+
if (back === "Cushions") prims.push(roundBox(x0 + 6, 6, x1 - 6, thick - 6, 40));
|
|
28257
|
+
prims.push(roundBox(x0 + 6, thick + 6, x1 - 6, d - 8, 40));
|
|
28258
|
+
}
|
|
28259
|
+
if (back === "Panel") prims.push(line([pt(left, thick), pt(w - right, thick)], THIN2));
|
|
28260
|
+
return prims;
|
|
28261
|
+
},
|
|
28262
|
+
front(props) {
|
|
28263
|
+
const { w, a, b, places, top, left, right } = banquetteParts(props);
|
|
28264
|
+
const prims = [];
|
|
28265
|
+
if (props.base === "Legs") {
|
|
28266
|
+
const rail = BANQUETTE_BASE - 70;
|
|
28267
|
+
prims.push(rect(a, -rail, b, -BANQUETTE_BASE));
|
|
28268
|
+
const between = Math.max(0, Math.round((b - a) / 1200) - 1);
|
|
28269
|
+
const legs = [a + 30, ...Array.from({ length: between }, (_, i) => a + (b - a) * (i + 1) / (between + 1) - 20), b - 70];
|
|
28270
|
+
for (const x of legs) prims.push(rect(x, 0, x + 40, -rail, THIN2));
|
|
28271
|
+
} else {
|
|
28272
|
+
prims.push(outline([pt(a + 50, 0), pt(b - 50, 0), pt(b - 50, -BANQUETTE_PLINTH), pt(b, -BANQUETTE_PLINTH), pt(b, -BANQUETTE_BASE), pt(a, -BANQUETTE_BASE), pt(a, -BANQUETTE_PLINTH), pt(a + 50, -BANQUETTE_PLINTH)]));
|
|
28273
|
+
prims.push(line([pt(a + 50, -BANQUETTE_PLINTH), pt(b - 50, -BANQUETTE_PLINTH)], THIN2));
|
|
28274
|
+
if (props.base === "Drawers") for (const [x0, x1] of places) prims.push(...drawer(x0 + 20, x1 - 20, -BANQUETTE_PLINTH - 30, -BANQUETTE_BASE + 30));
|
|
28275
|
+
}
|
|
28276
|
+
for (const [x0, x1] of places) {
|
|
28277
|
+
prims.push(roundBox(x0 + 4, -BANQUETTE_BASE, x1 - 4, -BANQUETTE_SEAT, 15));
|
|
28278
|
+
if (props.back === "Cushions") prims.push(roundBox(x0 + 4, -BANQUETTE_SEAT - 10, x1 - 4, -top, 30));
|
|
28279
|
+
}
|
|
28280
|
+
if (props.back === "Panel") prims.push(rect(a, -BANQUETTE_SEAT, b, -top), line([pt(a, -top + 40), pt(b, -top + 40)], THIN2));
|
|
28281
|
+
const end = Math.min(top, BANQUETTE_END_TOP);
|
|
28282
|
+
if (left) prims.push(rect(0, 0, left, -end));
|
|
28283
|
+
if (right) prims.push(rect(w - right, 0, w, -end));
|
|
28284
|
+
return prims;
|
|
28285
|
+
},
|
|
28286
|
+
side(props) {
|
|
28287
|
+
const { d, thick, top, left, right } = banquetteParts(props);
|
|
28288
|
+
const prims = [];
|
|
28289
|
+
if (props.base === "Legs") {
|
|
28290
|
+
const rail = BANQUETTE_BASE - 70;
|
|
28291
|
+
prims.push(rect(0, -rail, d, -BANQUETTE_BASE), rect(30, 0, 70, -rail, THIN2), rect(d - 70, 0, d - 30, -rail, THIN2));
|
|
28292
|
+
} else prims.push(outline([pt(0, 0), pt(d - 50, 0), pt(d - 50, -BANQUETTE_PLINTH), pt(d, -BANQUETTE_PLINTH), pt(d, -BANQUETTE_BASE), pt(0, -BANQUETTE_BASE)]));
|
|
28293
|
+
prims.push(roundBox(thick, -BANQUETTE_BASE, d, -BANQUETTE_SEAT, 15));
|
|
28294
|
+
if (props.back === "Cushions") prims.push(outline([pt(0, -BANQUETTE_SEAT), pt(thick, -BANQUETTE_SEAT), pt(thick * 0.55, -top), pt(0, -top)]));
|
|
28295
|
+
else if (props.back === "Panel") prims.push(rect(0, -BANQUETTE_SEAT, thick, -top));
|
|
28296
|
+
if (left || right) prims.push(rect(0, 0, d, -Math.min(top, BANQUETTE_END_TOP), THIN2));
|
|
28297
|
+
return prims;
|
|
28298
|
+
}
|
|
28299
|
+
};
|
|
28193
28300
|
|
|
28194
28301
|
// packages/ext-architecture/src/heating.ts
|
|
28195
28302
|
var MIN_LENGTH = 200;
|
|
@@ -28337,6 +28444,73 @@ var waterHeater = {
|
|
|
28337
28444
|
function tank(d, h) {
|
|
28338
28445
|
return [roundBox(0, -h, d, 0, Math.min(d * 0.2, h / 4)), line([pt(d * 0.38, -h), pt(d * 0.38, -h - 100)], THIN2), line([pt(d * 0.62, -h), pt(d * 0.62, -h - 100)], THIN2)];
|
|
28339
28446
|
}
|
|
28447
|
+
var MIN_FIREPLACE = 400;
|
|
28448
|
+
var MIN_FIREPLACE_DEPTH = 250;
|
|
28449
|
+
var MANTEL = 1200;
|
|
28450
|
+
var OPENING = 800;
|
|
28451
|
+
var CASSETTE_SILL = 450;
|
|
28452
|
+
var CASSETTE_HEIGHT = 600;
|
|
28453
|
+
var CASSETTE_FRAME = 50;
|
|
28454
|
+
var fireplace = {
|
|
28455
|
+
kind: "arch.fireplace",
|
|
28456
|
+
label: "Fireplace",
|
|
28457
|
+
category: "heating",
|
|
28458
|
+
description: "Its chimney breast goes against the wall by its back. A cassette is a closed insert behind glass, set in the breast; an open hearth has its slab on the floor in front. Pull its sides to make it wider or deeper.",
|
|
28459
|
+
params: [
|
|
28460
|
+
{ ...WIDTH, default: 1e3 },
|
|
28461
|
+
DEPTH(500),
|
|
28462
|
+
HEIGHT(2500),
|
|
28463
|
+
{ key: "style", label: "Style", type: "string", default: "Cassette", options: ["Cassette", "Open hearth"] },
|
|
28464
|
+
{ key: "hearth", label: "Hearth", type: "number", default: 400, unit: "length", shown: ({ style }) => style === "Open hearth" }
|
|
28465
|
+
],
|
|
28466
|
+
box: sizedBox("width", "depth", MIN_FIREPLACE, MIN_FIREPLACE_DEPTH),
|
|
28467
|
+
mount: { on: "floor" },
|
|
28468
|
+
height: ({ height }) => atLeast(1, height),
|
|
28469
|
+
build({ width, depth, style, hearth }) {
|
|
28470
|
+
const w = atLeast(1, width);
|
|
28471
|
+
const d = atLeast(1, depth);
|
|
28472
|
+
if (style === "Open hearth") {
|
|
28473
|
+
const slab = Math.max(0, Number(hearth) || 0);
|
|
28474
|
+
const prims = [outline([pt(w * 0.2, d), pt(0, d), pt(0, 0), pt(w, 0), pt(w, d), pt(w * 0.8, d), pt(w * 0.7, d * 0.25), pt(w * 0.3, d * 0.25)])];
|
|
28475
|
+
if (slab > 0) prims.push(outline([pt(0, d), pt(w, d), pt(w, d + slab), pt(0, d + slab)], THIN2));
|
|
28476
|
+
return prims;
|
|
28477
|
+
}
|
|
28478
|
+
const m = Math.min(150, w * 0.15);
|
|
28479
|
+
const glass = d - Math.min(30, d * 0.08);
|
|
28480
|
+
return [outline([pt(0, 0), pt(w, 0), pt(w, d), pt(0, d)]), outline([pt(m, d * 0.25), pt(w - m, d * 0.25), pt(w - m, d), pt(m, d)]), line([pt(m, glass), pt(w - m, glass)], THIN2)];
|
|
28481
|
+
},
|
|
28482
|
+
front: ({ width, height, style }) => {
|
|
28483
|
+
const w = atLeast(1, width);
|
|
28484
|
+
const h = atLeast(1, height);
|
|
28485
|
+
if (style === "Open hearth") {
|
|
28486
|
+
const mantel = Math.min(MANTEL, h);
|
|
28487
|
+
const opening = Math.min(OPENING, mantel * 0.7);
|
|
28488
|
+
const prims = [rect(0, 0, w, -mantel), line([pt(w * 0.2, 0), pt(w * 0.2, -opening), pt(w * 0.8, -opening), pt(w * 0.8, 0)]), rect(-30, -mantel, w + 30, -mantel - 50, THIN2)];
|
|
28489
|
+
if (h > mantel + 50) prims.push(rect(w * 0.15, -mantel - 50, w * 0.85, -h));
|
|
28490
|
+
return prims;
|
|
28491
|
+
}
|
|
28492
|
+
const m = Math.min(150, w * 0.15);
|
|
28493
|
+
const sill = Math.min(CASSETTE_SILL, h / 3);
|
|
28494
|
+
const top = Math.min(sill + CASSETTE_HEIGHT, h * 0.8);
|
|
28495
|
+
const frame = Math.min(CASSETTE_FRAME, (top - sill) / 4, (w - 2 * m) / 4);
|
|
28496
|
+
return [rect(0, 0, w, -h), rect(m, -sill, w - m, -top), rect(m + frame, -sill - frame, w - m - frame, -top + frame, THIN2)];
|
|
28497
|
+
},
|
|
28498
|
+
side: ({ depth, height, style, hearth }) => {
|
|
28499
|
+
const d = atLeast(1, depth);
|
|
28500
|
+
const h = atLeast(1, height);
|
|
28501
|
+
if (style === "Open hearth") {
|
|
28502
|
+
const mantel = Math.min(MANTEL, h);
|
|
28503
|
+
const slab = Math.max(0, Number(hearth) || 0);
|
|
28504
|
+
const prims = [rect(0, 0, d, -mantel)];
|
|
28505
|
+
if (h > mantel) prims.push(rect(0, -mantel, d * 0.7, -h));
|
|
28506
|
+
if (slab > 0) prims.push(rect(d, 0, d + slab, -30, THIN2));
|
|
28507
|
+
return prims;
|
|
28508
|
+
}
|
|
28509
|
+
const sill = Math.min(CASSETTE_SILL, h / 3);
|
|
28510
|
+
const top = Math.min(sill + CASSETTE_HEIGHT, h * 0.8);
|
|
28511
|
+
return [rect(0, 0, d, -h), rect(d * 0.25, -sill, d, -top, THIN2)];
|
|
28512
|
+
}
|
|
28513
|
+
};
|
|
28340
28514
|
|
|
28341
28515
|
// packages/ext-architecture/src/bedroom.ts
|
|
28342
28516
|
var TOP = 25;
|
|
@@ -28891,6 +29065,21 @@ var splashback = {
|
|
|
28891
29065
|
};
|
|
28892
29066
|
|
|
28893
29067
|
// packages/ext-architecture/src/openings.ts
|
|
29068
|
+
var HINGED = ["Single", "Double"];
|
|
29069
|
+
var ON_WALL = ["Sliding on wall", "Double sliding on wall"];
|
|
29070
|
+
var ONE_WAY = ["Sliding on wall", "Pocket"];
|
|
29071
|
+
var LEAVES = { min: 2, max: 4 };
|
|
29072
|
+
var box = (x0, y0, x1, y1, dash) => ({
|
|
29073
|
+
kind: "path",
|
|
29074
|
+
points: [pt(x0, y0), pt(x1, y0), pt(x1, y1), pt(x0, y1)],
|
|
29075
|
+
closed: true,
|
|
29076
|
+
...dash ? { dash, ...THIN2 } : {}
|
|
29077
|
+
});
|
|
29078
|
+
var OPEN = [40, 25];
|
|
29079
|
+
var arrow = (x0, x1, y) => {
|
|
29080
|
+
const head = Math.min(60, Math.abs(x1 - x0) / 3) * Math.sign(x1 - x0);
|
|
29081
|
+
return [line([pt(x0, y), pt(x1, y)], THIN2), line([pt(x1 - head, y - Math.abs(head) / 2), pt(x1, y), pt(x1 - head, y + Math.abs(head) / 2)], THIN2)];
|
|
29082
|
+
};
|
|
28894
29083
|
var door2 = {
|
|
28895
29084
|
kind: "arch.door",
|
|
28896
29085
|
category: "architecture",
|
|
@@ -28899,14 +29088,16 @@ var door2 = {
|
|
|
28899
29088
|
params: [
|
|
28900
29089
|
WIDTH,
|
|
28901
29090
|
HEIGHT(2040),
|
|
28902
|
-
{ key: "type", label: "Type", type: "string", default: "Single", options: ["Single", "Double", "Sliding", "Opening only"] },
|
|
28903
|
-
{ key: "hinge", label: "Hinge", type: "string", default: "Left", options: ["Left", "Right"] },
|
|
28904
|
-
{ key: "angle", label: "Open angle", type: "number", default: 90, unit: "angle" },
|
|
29091
|
+
{ key: "type", label: "Type", type: "string", default: "Single", options: ["Single", "Double", ...ON_WALL, "Pocket", "Sliding", "Opening only"] },
|
|
29092
|
+
{ key: "hinge", label: "Hinge", type: "string", default: "Left", options: ["Left", "Right"], shown: ({ type }) => type === "Single" },
|
|
29093
|
+
{ key: "angle", label: "Open angle", type: "number", default: 90, unit: "angle", shown: ({ type }) => HINGED.includes(type) },
|
|
29094
|
+
{ key: "slide", label: "Slides to", type: "string", default: "Right", options: ["Left", "Right"], shown: ({ type }) => ONE_WAY.includes(type) },
|
|
29095
|
+
{ key: "leaves", label: "Leaves", type: "number", default: 2, shown: ({ type }) => type === "Sliding" },
|
|
28905
29096
|
OTHER_SIDE
|
|
28906
29097
|
],
|
|
28907
29098
|
opening: ({ width }) => ({ from: 0, to: atLeast(1, width) }),
|
|
28908
29099
|
size: { x: "width" },
|
|
28909
|
-
build({ width, type, hinge, angle, flip }, env) {
|
|
29100
|
+
build({ width, type, hinge, angle, slide, leaves, flip }, env) {
|
|
28910
29101
|
const w = atLeast(1, width);
|
|
28911
29102
|
const h = (env.wallThickness ?? LOOSE_WALL) / 2;
|
|
28912
29103
|
const open2 = clamp(angle, 5, 180);
|
|
@@ -28917,25 +29108,55 @@ var door2 = {
|
|
|
28917
29108
|
const tip2 = arcPoints(hingePoint, length2, opened, opened, 1)[0];
|
|
28918
29109
|
return [line([hingePoint, tip2], HEAVY), line(arcPoints(hingePoint, length2, closed, opened), THIN2)];
|
|
28919
29110
|
};
|
|
29111
|
+
const hung = (x0, x1, by) => {
|
|
29112
|
+
const over = Math.min(50, w / 10);
|
|
29113
|
+
const [a, b] = [x0 === 0 ? -over : x0, x1 === w ? w + over : x1];
|
|
29114
|
+
const [near2, far] = [h + 10, h + 50];
|
|
29115
|
+
const mid2 = (a + b) / 2;
|
|
29116
|
+
return [box(a, near2, b, far), box(a + by, near2, b + by, far, OPEN), ...arrow(mid2, mid2 + by * 0.6, far + 60)];
|
|
29117
|
+
};
|
|
28920
29118
|
let prims = [line([pt(0, -h), pt(w, -h)], THIN2), line([pt(0, h), pt(w, h)], THIN2)];
|
|
28921
29119
|
if (type === "Single") prims.push(...leaf(0, w, 1));
|
|
28922
29120
|
else if (type === "Double") prims.push(...leaf(0, w / 2, 1), ...leaf(w, w / 2, -1));
|
|
28923
|
-
else if (type === "Sliding")
|
|
28924
|
-
|
|
28925
|
-
|
|
29121
|
+
else if (type === "Sliding on wall") prims.push(...hung(0, w, w));
|
|
29122
|
+
else if (type === "Double sliding on wall") prims.push(...hung(0, w / 2, -w / 2), ...hung(w / 2, w, w / 2));
|
|
29123
|
+
else if (type === "Pocket") {
|
|
29124
|
+
const t = Math.min(20, h / 2);
|
|
29125
|
+
prims.push(box(0, -t, w, t), box(w, -t, 2 * w, t, OPEN), ...arrow(w * 0.3, w * 0.7, h + 60));
|
|
29126
|
+
} else if (type === "Sliding") {
|
|
29127
|
+
const frame = Math.min(50, w / 8);
|
|
29128
|
+
const n3 = clamp(Math.round(Number(leaves) || LEAVES.min), LEAVES.min, LEAVES.max);
|
|
29129
|
+
const overlap2 = Math.min(50, (w - 2 * frame) / (2 * n3));
|
|
29130
|
+
const length2 = (w - 2 * frame + (n3 - 1) * overlap2) / n3;
|
|
29131
|
+
const rail = Math.min(h * 0.4, 30);
|
|
29132
|
+
const t = Math.min(rail * 0.8, 20);
|
|
29133
|
+
prims.push(line([pt(frame, -h), pt(frame, h)], THIN2), line([pt(w - frame, -h), pt(w - frame, h)], THIN2));
|
|
29134
|
+
for (let i = 0; i < n3; i++) {
|
|
29135
|
+
const x = frame + i * (length2 - overlap2);
|
|
29136
|
+
const y = i % 2 === 0 ? -rail : rail;
|
|
29137
|
+
prims.push(box(x, y - t / 2, x + length2, y + t / 2));
|
|
29138
|
+
}
|
|
28926
29139
|
}
|
|
28927
|
-
if (hinge === "Right") prims = mirrorAlong(prims, w);
|
|
29140
|
+
if (type === "Single" && hinge === "Right") prims = mirrorAlong(prims, w);
|
|
29141
|
+
if (ONE_WAY.includes(type) && slide === "Left") prims = mirrorAlong(prims, w);
|
|
28928
29142
|
return flip ? mirrorAcross(prims) : prims;
|
|
28929
29143
|
},
|
|
28930
29144
|
// Seen from in front: its frame from the floor to its height, the leaves, and a handle on the side that opens.
|
|
28931
|
-
front({ width, height, type, hinge }) {
|
|
29145
|
+
front({ width, height, type, hinge, slide, leaves }) {
|
|
28932
29146
|
const w = atLeast(1, width);
|
|
28933
29147
|
const top = -atLeast(1, height);
|
|
28934
|
-
|
|
28935
|
-
if (type === "Double" || type === "Sliding") prims.push(line([pt(w / 2, 0), pt(w / 2, top)], THIN2));
|
|
29148
|
+
let prims = [outline([pt(0, 0), pt(w, 0), pt(w, top), pt(0, top)])];
|
|
28936
29149
|
const handle = (x, toward) => line([pt(x, -1e3), pt(x + toward * 100, -1e3)], HEAVY);
|
|
29150
|
+
const grip = (x) => line([pt(x, -900), pt(x, -1150)], HEAVY);
|
|
28937
29151
|
if (type === "Single") prims.push(hinge === "Right" ? handle(80, 1) : handle(w - 80, -1));
|
|
28938
|
-
else if (type === "Double") prims.push(handle(w / 2 - 80, -1), handle(w / 2 + 80, 1));
|
|
29152
|
+
else if (type === "Double") prims.push(line([pt(w / 2, 0), pt(w / 2, top)], THIN2), handle(w / 2 - 80, -1), handle(w / 2 + 80, 1));
|
|
29153
|
+
else if (type === "Double sliding on wall") prims.push(line([pt(w / 2, 0), pt(w / 2, top)], THIN2), grip(w / 2 - 80), grip(w / 2 + 80));
|
|
29154
|
+
else if (ONE_WAY.includes(type)) prims.push(grip(80));
|
|
29155
|
+
else if (type === "Sliding") {
|
|
29156
|
+
const n3 = clamp(Math.round(Number(leaves) || LEAVES.min), LEAVES.min, LEAVES.max);
|
|
29157
|
+
for (let i = 1; i < n3; i++) prims.push(line([pt(w * i / n3, 0), pt(w * i / n3, top)], THIN2));
|
|
29158
|
+
}
|
|
29159
|
+
if (ONE_WAY.includes(type) && slide === "Left") prims = mirrorAlong(prims, w);
|
|
28939
29160
|
return prims;
|
|
28940
29161
|
}
|
|
28941
29162
|
};
|
|
@@ -29143,6 +29364,10 @@ var spiralStair = {
|
|
|
29143
29364
|
|
|
29144
29365
|
// packages/ext-architecture/src/translations.ts
|
|
29145
29366
|
var translations = {
|
|
29367
|
+
// English needs only what its value does not say well.
|
|
29368
|
+
en: {
|
|
29369
|
+
"Type: Sliding": "Sliding patio door"
|
|
29370
|
+
},
|
|
29146
29371
|
fr: {
|
|
29147
29372
|
Hob: "Plaque de cuisson",
|
|
29148
29373
|
"Pull its sides to make it wider, 80 or 90 cm: its zones keep their size, and from 75 cm it has a fifth in the middle.": "Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir, \xE0 80 ou 90 cm : ses foyers gardent leur taille, et d\xE8s 75 cm elle en a un cinqui\xE8me au milieu.",
|
|
@@ -29213,6 +29438,12 @@ var translations = {
|
|
|
29213
29438
|
Double: "Double",
|
|
29214
29439
|
Sliding: "Coulissante",
|
|
29215
29440
|
"Opening only": "Baie libre",
|
|
29441
|
+
"Sliding on wall": "Coulissante simple",
|
|
29442
|
+
"Double sliding on wall": "Coulissante double",
|
|
29443
|
+
Pocket: "\xC0 galandage",
|
|
29444
|
+
"Type: Sliding": "Baie coulissante",
|
|
29445
|
+
"Slides to": "Coulisse vers",
|
|
29446
|
+
Leaves: "Vantaux",
|
|
29216
29447
|
Left: "Gauche",
|
|
29217
29448
|
Right: "Droite",
|
|
29218
29449
|
"Insert 4 \xD7 3 m room": "Ins\xE9rer une pi\xE8ce de 4 \xD7 3 m",
|
|
@@ -29237,6 +29468,11 @@ var translations = {
|
|
|
29237
29468
|
"Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "Fix\xE9e au mur par son dos, son conduit de fum\xE9e au-dessus. Sa hauteur au-dessus du sol est celle de son dessous.",
|
|
29238
29469
|
"Water heater": "Chauffe-eau",
|
|
29239
29470
|
"A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "Un ballon rond contre le mur. Tirez ses c\xF4t\xE9s pour l\u2019agrandir. Donnez-lui une hauteur au-dessus du sol pour le fixer au mur.",
|
|
29471
|
+
Fireplace: "Chemin\xE9e",
|
|
29472
|
+
"Its chimney breast goes against the wall by its back. A cassette is a closed insert behind glass, set in the breast; an open hearth has its slab on the floor in front. Pull its sides to make it wider or deeper.": "Son coffrage va contre le mur par son dos. Une cassette est un foyer ferm\xE9 derri\xE8re une vitre, encastr\xE9 dans le coffrage ; un foyer ouvert a sa dalle au sol devant lui. Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir ou l\u2019approfondir.",
|
|
29473
|
+
Cassette: "Cassette",
|
|
29474
|
+
"Open hearth": "Foyer ouvert",
|
|
29475
|
+
Hearth: "Avant-foyer",
|
|
29240
29476
|
Diameter: "Diam\xE8tre",
|
|
29241
29477
|
"Base unit": "Meuble bas",
|
|
29242
29478
|
"A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "Un meuble de cuisine avec son plan de travail, contre le mur : portes, tiroirs ou four, comme le montrent les \xE9l\xE9vations. Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir.",
|
|
@@ -29279,6 +29515,16 @@ var translations = {
|
|
|
29279
29515
|
Sofa: "Canap\xE9",
|
|
29280
29516
|
Armchair: "Fauteuil",
|
|
29281
29517
|
Chair: "Chaise",
|
|
29518
|
+
Banquette: "Banquette",
|
|
29519
|
+
"A bench built along the wall, its back against it. Pull its sides to make it longer: it takes a seat for about every 60 cm.": "Un banc construit le long du mur, son dossier contre lui. Tirez ses c\xF4t\xE9s pour l\u2019allonger : il prend une place tous les 60 cm environ.",
|
|
29520
|
+
Back: "Dossier",
|
|
29521
|
+
Cushions: "Coussins",
|
|
29522
|
+
Panel: "Panneau",
|
|
29523
|
+
Base: "Socle",
|
|
29524
|
+
Closed: "Ferm\xE9",
|
|
29525
|
+
Legs: "Pieds",
|
|
29526
|
+
"End panels": "Joues",
|
|
29527
|
+
Both: "Les deux",
|
|
29282
29528
|
Desk: "Bureau",
|
|
29283
29529
|
Seats: "Places",
|
|
29284
29530
|
"Office chair": "Chaise de bureau",
|
|
@@ -29357,6 +29603,12 @@ var translations = {
|
|
|
29357
29603
|
Double: "Doble",
|
|
29358
29604
|
Sliding: "Corredera",
|
|
29359
29605
|
"Opening only": "Solo el hueco",
|
|
29606
|
+
"Sliding on wall": "Corredera vista",
|
|
29607
|
+
"Double sliding on wall": "Corredera vista doble",
|
|
29608
|
+
Pocket: "Corredera empotrada",
|
|
29609
|
+
"Type: Sliding": "Balconera corredera",
|
|
29610
|
+
"Slides to": "Se desliza hacia",
|
|
29611
|
+
Leaves: "Hojas",
|
|
29360
29612
|
Left: "Izquierda",
|
|
29361
29613
|
Right: "Derecha",
|
|
29362
29614
|
"Insert 4 \xD7 3 m room": "Insertar una habitaci\xF3n de 4 \xD7 3 m",
|
|
@@ -29381,6 +29633,11 @@ var translations = {
|
|
|
29381
29633
|
"Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "Colgada en la pared por su parte trasera, con la salida de humos arriba. Su altura sobre el suelo es la de su parte inferior.",
|
|
29382
29634
|
"Water heater": "Calentador de agua",
|
|
29383
29635
|
"A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "Un dep\xF3sito redondo contra la pared. Tire de sus lados para agrandarlo. Dele una altura sobre el suelo para colgarlo en la pared.",
|
|
29636
|
+
Fireplace: "Chimenea",
|
|
29637
|
+
"Its chimney breast goes against the wall by its back. A cassette is a closed insert behind glass, set in the breast; an open hearth has its slab on the floor in front. Pull its sides to make it wider or deeper.": "Su campana va contra la pared por su parte trasera. Un casete es un hogar cerrado tras un cristal, empotrado en la campana; un hogar abierto tiene su losa en el suelo delante. Tire de sus lados para ensancharla o hacerla m\xE1s profunda.",
|
|
29638
|
+
Cassette: "Casete",
|
|
29639
|
+
"Open hearth": "Hogar abierto",
|
|
29640
|
+
Hearth: "Solera",
|
|
29384
29641
|
Diameter: "Di\xE1metro",
|
|
29385
29642
|
"Base unit": "Mueble bajo",
|
|
29386
29643
|
"A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "Un mueble de cocina con su encimera, contra la pared: puertas, cajones o un horno, como lo muestran los alzados. Tire de sus lados para ensancharlo.",
|
|
@@ -29423,6 +29680,16 @@ var translations = {
|
|
|
29423
29680
|
Sofa: "Sof\xE1",
|
|
29424
29681
|
Armchair: "Sill\xF3n",
|
|
29425
29682
|
Chair: "Silla",
|
|
29683
|
+
Banquette: "Banqueta",
|
|
29684
|
+
"A bench built along the wall, its back against it. Pull its sides to make it longer: it takes a seat for about every 60 cm.": "Un banco construido a lo largo de la pared, con el respaldo contra ella. Tire de sus lados para alargarlo: tiene un asiento cada 60 cm aproximadamente.",
|
|
29685
|
+
Back: "Respaldo",
|
|
29686
|
+
Cushions: "Cojines",
|
|
29687
|
+
Panel: "Panel",
|
|
29688
|
+
Base: "Base",
|
|
29689
|
+
Closed: "Cerrada",
|
|
29690
|
+
Legs: "Patas",
|
|
29691
|
+
"End panels": "Paneles laterales",
|
|
29692
|
+
Both: "Ambos",
|
|
29426
29693
|
Desk: "Escritorio",
|
|
29427
29694
|
Seats: "Plazas",
|
|
29428
29695
|
"Office chair": "Silla de oficina",
|
|
@@ -29501,6 +29768,12 @@ var translations = {
|
|
|
29501
29768
|
Double: "Zweifl\xFCgelig",
|
|
29502
29769
|
Sliding: "Schiebet\xFCr",
|
|
29503
29770
|
"Opening only": "Nur \xD6ffnung",
|
|
29771
|
+
"Sliding on wall": "Schiebet\xFCr vor der Wand",
|
|
29772
|
+
"Double sliding on wall": "Doppelschiebet\xFCr vor der Wand",
|
|
29773
|
+
Pocket: "In der Wand laufend",
|
|
29774
|
+
"Type: Sliding": "Terrassenschiebet\xFCr",
|
|
29775
|
+
"Slides to": "\xD6ffnet nach",
|
|
29776
|
+
Leaves: "Fl\xFCgel",
|
|
29504
29777
|
Left: "Links",
|
|
29505
29778
|
Right: "Rechts",
|
|
29506
29779
|
"Insert 4 \xD7 3 m room": "Raum 4 \xD7 3 m einf\xFCgen",
|
|
@@ -29525,6 +29798,11 @@ var translations = {
|
|
|
29525
29798
|
"Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "Mit der R\xFCckseite an die Wand geh\xE4ngt, das Abgasrohr oben. Seine H\xF6he \xFCber dem Boden ist die seiner Unterkante.",
|
|
29526
29799
|
"Water heater": "Warmwasserspeicher",
|
|
29527
29800
|
"A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "Ein runder Speicher an der Wand. Ziehen Sie an den Seiten, um ihn zu vergr\xF6\xDFern. Geben Sie ihm eine H\xF6he \xFCber dem Boden, um ihn an die Wand zu h\xE4ngen.",
|
|
29801
|
+
Fireplace: "Kamin",
|
|
29802
|
+
"Its chimney breast goes against the wall by its back. A cassette is a closed insert behind glass, set in the breast; an open hearth has its slab on the floor in front. Pull its sides to make it wider or deeper.": "Sein Kaminmantel steht mit der R\xFCckseite an der Wand. Eine Kassette ist ein geschlossener Einsatz hinter Glas, in den Mantel eingebaut; ein offener Kamin hat seine Vorlegeplatte davor auf dem Boden. Ziehen Sie an seinen Seiten, um ihn breiter oder tiefer zu machen.",
|
|
29803
|
+
Cassette: "Kassette",
|
|
29804
|
+
"Open hearth": "Offener Kamin",
|
|
29805
|
+
Hearth: "Vorlegeplatte",
|
|
29528
29806
|
Diameter: "Durchmesser",
|
|
29529
29807
|
"Base unit": "Unterschrank",
|
|
29530
29808
|
"A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "Ein K\xFCchenschrank mit Arbeitsplatte an der Wand: T\xFCren, Schubladen oder ein Backofen, wie die Ansichten ihn zeigen. Ziehen Sie an seinen Seiten, um ihn zu verbreitern.",
|
|
@@ -29567,6 +29845,16 @@ var translations = {
|
|
|
29567
29845
|
Sofa: "Sofa",
|
|
29568
29846
|
Armchair: "Sessel",
|
|
29569
29847
|
Chair: "Stuhl",
|
|
29848
|
+
Banquette: "Sitzbank",
|
|
29849
|
+
"A bench built along the wall, its back against it. Pull its sides to make it longer: it takes a seat for about every 60 cm.": "Eine an der Wand entlang gebaute Bank, die Lehne an der Wand. Ziehen Sie an den Seiten, um sie zu verl\xE4ngern: Sie hat etwa alle 60 cm einen Sitzplatz.",
|
|
29850
|
+
Back: "Lehne",
|
|
29851
|
+
Cushions: "Kissen",
|
|
29852
|
+
Panel: "Paneel",
|
|
29853
|
+
Base: "Sockel",
|
|
29854
|
+
Closed: "Geschlossen",
|
|
29855
|
+
Legs: "Beine",
|
|
29856
|
+
"End panels": "Seitenwangen",
|
|
29857
|
+
Both: "Beide",
|
|
29570
29858
|
Desk: "Schreibtisch",
|
|
29571
29859
|
Seats: "Sitzpl\xE4tze",
|
|
29572
29860
|
"Office chair": "B\xFCrostuhl",
|
|
@@ -29645,6 +29933,12 @@ var translations = {
|
|
|
29645
29933
|
Double: "\u53CC\u6247",
|
|
29646
29934
|
Sliding: "\u63A8\u62C9",
|
|
29647
29935
|
"Opening only": "\u4EC5\u6D1E\u53E3",
|
|
29936
|
+
"Sliding on wall": "\u5899\u9762\u63A8\u62C9\u95E8",
|
|
29937
|
+
"Double sliding on wall": "\u53CC\u6247\u5899\u9762\u63A8\u62C9\u95E8",
|
|
29938
|
+
Pocket: "\u5165\u5899\u63A8\u62C9\u95E8",
|
|
29939
|
+
"Type: Sliding": "\u73BB\u7483\u63A8\u62C9\u95E8",
|
|
29940
|
+
"Slides to": "\u63A8\u5411",
|
|
29941
|
+
Leaves: "\u6247\u6570",
|
|
29648
29942
|
Left: "\u5DE6",
|
|
29649
29943
|
Right: "\u53F3",
|
|
29650
29944
|
"Insert 4 \xD7 3 m room": "\u63D2\u5165 4 \xD7 3 \u7C73\u7684\u623F\u95F4",
|
|
@@ -29669,6 +29963,11 @@ var translations = {
|
|
|
29669
29963
|
"Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "\u80CC\u9762\u6302\u5728\u5899\u4E0A\uFF0C\u70DF\u9053\u5728\u9876\u90E8\u3002\u5176\u79BB\u5730\u9AD8\u5EA6\u4E3A\u5E95\u9762\u7684\u9AD8\u5EA6\u3002",
|
|
29670
29964
|
"Water heater": "\u70ED\u6C34\u5668",
|
|
29671
29965
|
"A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "\u9760\u5899\u7684\u5706\u5F62\u6C34\u7BB1\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u653E\u5927\u3002\u8BBE\u7F6E\u79BB\u5730\u9AD8\u5EA6\u5373\u53EF\u6302\u5728\u5899\u4E0A\u3002",
|
|
29966
|
+
Fireplace: "\u58C1\u7089",
|
|
29967
|
+
"Its chimney breast goes against the wall by its back. A cassette is a closed insert behind glass, set in the breast; an open hearth has its slab on the floor in front. Pull its sides to make it wider or deeper.": "\u58C1\u7089\u7F69\u80CC\u9762\u9760\u5899\u3002\u5D4C\u5165\u5F0F\u662F\u88C5\u5728\u73BB\u7483\u540E\u7684\u5C01\u95ED\u7089\u819B\uFF0C\u5D4C\u5728\u58C1\u7089\u7F69\u5185\uFF1B\u5F00\u653E\u5F0F\u58C1\u7089\u524D\u65B9\u5730\u9762\u4E0A\u6709\u7089\u5E8A\u3002\u62D6\u52A8\u4E24\u4FA7\u53EF\u52A0\u5BBD\u6216\u52A0\u6DF1\u3002",
|
|
29968
|
+
Cassette: "\u5D4C\u5165\u5F0F",
|
|
29969
|
+
"Open hearth": "\u5F00\u653E\u5F0F",
|
|
29970
|
+
Hearth: "\u7089\u5E8A",
|
|
29672
29971
|
Diameter: "\u76F4\u5F84",
|
|
29673
29972
|
"Base unit": "\u5730\u67DC",
|
|
29674
29973
|
"A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "\u5E26\u53F0\u9762\u7684\u53A8\u623F\u67DC\uFF0C\u9760\u5899\u653E\u7F6E\uFF1A\u95E8\u3001\u62BD\u5C49\u6216\u70E4\u7BB1\uFF0C\u7ACB\u9762\u4E2D\u53EF\u89C1\u3002\u62D6\u52A8\u4E24\u4FA7\u53EF\u52A0\u5BBD\u3002",
|
|
@@ -29711,6 +30010,16 @@ var translations = {
|
|
|
29711
30010
|
Sofa: "\u6C99\u53D1",
|
|
29712
30011
|
Armchair: "\u6276\u624B\u6905",
|
|
29713
30012
|
Chair: "\u6905\u5B50",
|
|
30013
|
+
Banquette: "\u5361\u5EA7",
|
|
30014
|
+
"A bench built along the wall, its back against it. Pull its sides to make it longer: it takes a seat for about every 60 cm.": "\u6CBF\u5899\u5EFA\u9020\u7684\u957F\u51F3\uFF0C\u9760\u80CC\u8D34\u5899\u3002\u62D6\u52A8\u4E24\u4FA7\u53EF\u52A0\u957F\uFF1A\u5927\u7EA6\u6BCF 60 \u5398\u7C73\u4E00\u4E2A\u5EA7\u4F4D\u3002",
|
|
30015
|
+
Back: "\u9760\u80CC",
|
|
30016
|
+
Cushions: "\u9760\u57AB",
|
|
30017
|
+
Panel: "\u9762\u677F",
|
|
30018
|
+
Base: "\u5E95\u5EA7",
|
|
30019
|
+
Closed: "\u5C01\u95ED",
|
|
30020
|
+
Legs: "\u817F",
|
|
30021
|
+
"End panels": "\u4FA7\u677F",
|
|
30022
|
+
Both: "\u4E24\u4FA7",
|
|
29714
30023
|
Desk: "\u4E66\u684C",
|
|
29715
30024
|
Seats: "\u5EA7\u4F4D",
|
|
29716
30025
|
"Office chair": "\u529E\u516C\u6905",
|
|
@@ -29789,6 +30098,12 @@ var translations = {
|
|
|
29789
30098
|
Double: "\u4E21\u958B\u304D",
|
|
29790
30099
|
Sliding: "\u5F15\u304D\u6238",
|
|
29791
30100
|
"Opening only": "\u958B\u53E3\u306E\u307F",
|
|
30101
|
+
"Sliding on wall": "\u7247\u5F15\u304D\u6238",
|
|
30102
|
+
"Double sliding on wall": "\u5F15\u5206\u3051\u6238",
|
|
30103
|
+
Pocket: "\u5F15\u8FBC\u307F\u6238",
|
|
30104
|
+
"Type: Sliding": "\u5F15\u9055\u3044\u6238",
|
|
30105
|
+
"Slides to": "\u5F15\u304F\u65B9\u5411",
|
|
30106
|
+
Leaves: "\u679A\u6570",
|
|
29792
30107
|
Left: "\u5DE6",
|
|
29793
30108
|
Right: "\u53F3",
|
|
29794
30109
|
"Insert 4 \xD7 3 m room": "4 \xD7 3 m \u306E\u90E8\u5C4B\u3092\u633F\u5165",
|
|
@@ -29813,6 +30128,11 @@ var translations = {
|
|
|
29813
30128
|
"Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "\u80CC\u9762\u3067\u58C1\u306B\u639B\u3051\u3001\u4E0A\u306B\u6392\u6C17\u7B52\u304C\u3042\u308A\u307E\u3059\u3002\u5E8A\u304B\u3089\u306E\u9AD8\u3055\u306F\u5E95\u9762\u306E\u9AD8\u3055\u3067\u3059\u3002",
|
|
29814
30129
|
"Water heater": "\u7D66\u6E6F\u5668",
|
|
29815
30130
|
"A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "\u58C1\u969B\u306B\u7F6E\u304F\u5186\u7B52\u5F62\u306E\u30BF\u30F3\u30AF\u3002\u8FBA\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u5927\u304D\u304F\u3057\u307E\u3059\u3002\u5E8A\u304B\u3089\u306E\u9AD8\u3055\u3092\u6307\u5B9A\u3059\u308B\u3068\u58C1\u306B\u639B\u3051\u3089\u308C\u307E\u3059\u3002",
|
|
30131
|
+
Fireplace: "\u6696\u7089",
|
|
30132
|
+
"Its chimney breast goes against the wall by its back. A cassette is a closed insert behind glass, set in the breast; an open hearth has its slab on the floor in front. Pull its sides to make it wider or deeper.": "\u30D5\u30FC\u30C9\u306E\u80CC\u9762\u3092\u58C1\u306B\u4ED8\u3051\u307E\u3059\u3002\u30AB\u30BB\u30C3\u30C8\u5F0F\u306F\u30AC\u30E9\u30B9\u306E\u5965\u306E\u5BC6\u9589\u5F0F\u306E\u706B\u5BA4\u3067\u3001\u30D5\u30FC\u30C9\u306B\u7D44\u307F\u8FBC\u307E\u308C\u307E\u3059\u3002\u30AA\u30FC\u30D7\u30F3\u5F0F\u306F\u524D\u306E\u5E8A\u306B\u7089\u5E8A\u304C\u3042\u308A\u307E\u3059\u3002\u4E21\u5074\u3092\u5F15\u3044\u3066\u5E45\u3084\u5965\u884C\u304D\u3092\u5E83\u3052\u307E\u3059\u3002",
|
|
30133
|
+
Cassette: "\u30AB\u30BB\u30C3\u30C8\u5F0F",
|
|
30134
|
+
"Open hearth": "\u30AA\u30FC\u30D7\u30F3\u5F0F",
|
|
30135
|
+
Hearth: "\u7089\u5E8A",
|
|
29816
30136
|
Diameter: "\u76F4\u5F84",
|
|
29817
30137
|
"Base unit": "\u30D9\u30FC\u30B9\u30AD\u30E3\u30D3\u30CD\u30C3\u30C8",
|
|
29818
30138
|
"A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "\u5929\u677F\u4ED8\u304D\u306E\u30AD\u30C3\u30C1\u30F3\u30AD\u30E3\u30D3\u30CD\u30C3\u30C8\u3002\u58C1\u969B\u306B\u7F6E\u304D\u307E\u3059\u3002\u6249\u3001\u5F15\u304D\u51FA\u3057\u3001\u30AA\u30FC\u30D6\u30F3\u304C\u7ACB\u9762\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u5074\u9762\u3092\u5F15\u3044\u3066\u5E45\u3092\u5E83\u3052\u307E\u3059\u3002",
|
|
@@ -29855,6 +30175,16 @@ var translations = {
|
|
|
29855
30175
|
Sofa: "\u30BD\u30D5\u30A1",
|
|
29856
30176
|
Armchair: "\u30A2\u30FC\u30E0\u30C1\u30A7\u30A2",
|
|
29857
30177
|
Chair: "\u3044\u3059",
|
|
30178
|
+
Banquette: "\u30D9\u30F3\u30C1\u30B7\u30FC\u30C8",
|
|
30179
|
+
"A bench built along the wall, its back against it. Pull its sides to make it longer: it takes a seat for about every 60 cm.": "\u58C1\u6CBF\u3044\u306B\u9020\u308A\u4ED8\u3051\u305F\u30D9\u30F3\u30C1\u3067\u3001\u80CC\u3082\u305F\u308C\u3092\u58C1\u306B\u4ED8\u3051\u307E\u3059\u3002\u4E21\u5074\u3092\u5F15\u3044\u3066\u9577\u304F\u3057\u307E\u3059\u3002\u7D04 60 cm \u3054\u3068\u306B\u5EA7\u5E2D\u304C 1 \u3064\u5897\u3048\u307E\u3059\u3002",
|
|
30180
|
+
Back: "\u80CC\u3082\u305F\u308C",
|
|
30181
|
+
Cushions: "\u30AF\u30C3\u30B7\u30E7\u30F3",
|
|
30182
|
+
Panel: "\u30D1\u30CD\u30EB",
|
|
30183
|
+
Base: "\u53F0\u5EA7",
|
|
30184
|
+
Closed: "\u9589\u3058\u305F",
|
|
30185
|
+
Legs: "\u811A",
|
|
30186
|
+
"End panels": "\u5074\u677F",
|
|
30187
|
+
Both: "\u4E21\u65B9",
|
|
29858
30188
|
Desk: "\u30C7\u30B9\u30AF",
|
|
29859
30189
|
Seats: "\u5EA7\u5E2D\u6570",
|
|
29860
30190
|
"Office chair": "\u30AA\u30D5\u30A3\u30B9\u30C1\u30A7\u30A2",
|
|
@@ -29933,6 +30263,12 @@ var translations = {
|
|
|
29933
30263
|
Double: "\uC591\uC5EC\uB2EB\uC774",
|
|
29934
30264
|
Sliding: "\uBBF8\uB2EB\uC774",
|
|
29935
30265
|
"Opening only": "\uAC1C\uAD6C\uBD80\uB9CC",
|
|
30266
|
+
"Sliding on wall": "\uBCBD\uBA74 \uBBF8\uB2EB\uC774\uBB38",
|
|
30267
|
+
"Double sliding on wall": "\uC591\uAC1C \uBCBD\uBA74 \uBBF8\uB2EB\uC774\uBB38",
|
|
30268
|
+
Pocket: "\uBCBD\uC18D \uBBF8\uB2EB\uC774\uBB38",
|
|
30269
|
+
"Type: Sliding": "\uBBF8\uC11C\uAE30\uBB38",
|
|
30270
|
+
"Slides to": "\uC5EC\uB294 \uBC29\uD5A5",
|
|
30271
|
+
Leaves: "\uBB38\uC9DD \uC218",
|
|
29936
30272
|
Left: "\uC67C\uCABD",
|
|
29937
30273
|
Right: "\uC624\uB978\uCABD",
|
|
29938
30274
|
"Insert 4 \xD7 3 m room": "4 \xD7 3 m \uBC29 \uC0BD\uC785",
|
|
@@ -29957,6 +30293,11 @@ var translations = {
|
|
|
29957
30293
|
"Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "\uB4B7\uBA74\uC73C\uB85C \uBCBD\uC5D0 \uAC78\uB9AC\uACE0 \uC5F0\uB3C4\uB294 \uC704\uC5D0 \uC788\uC2B5\uB2C8\uB2E4. \uBC14\uB2E5\uC5D0\uC11C\uC758 \uB192\uC774\uB294 \uBC11\uBA74\uC758 \uB192\uC774\uC785\uB2C8\uB2E4.",
|
|
29958
30294
|
"Water heater": "\uC628\uC218\uAE30",
|
|
29959
30295
|
"A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "\uBCBD\uC5D0 \uBD99\uB294 \uC6D0\uD1B5\uD615 \uD0F1\uD06C\uC785\uB2C8\uB2E4. \uBCC0\uC744 \uB04C\uC5B4 \uD0A4\uC6B0\uC138\uC694. \uBC14\uB2E5\uC5D0\uC11C\uC758 \uB192\uC774\uB97C \uC8FC\uBA74 \uBCBD\uC5D0 \uAC78\uB9BD\uB2C8\uB2E4.",
|
|
30296
|
+
Fireplace: "\uBCBD\uB09C\uB85C",
|
|
30297
|
+
"Its chimney breast goes against the wall by its back. A cassette is a closed insert behind glass, set in the breast; an open hearth has its slab on the floor in front. Pull its sides to make it wider or deeper.": "\uBCBD\uB09C\uB85C \uBAB8\uCCB4\uC758 \uB4B7\uBA74\uC774 \uBCBD\uC5D0 \uBD99\uC2B5\uB2C8\uB2E4. \uCE74\uC138\uD2B8\uD615\uC740 \uC720\uB9AC \uB4A4\uC758 \uBC00\uD3D0\uD615 \uD654\uC2E4\uB85C \uBAB8\uCCB4\uC5D0 \uB9E4\uB9BD\uB418\uACE0, \uAC1C\uBC29\uD615\uC740 \uC55E\uCABD \uBC14\uB2E5\uC5D0 \uD654\uB355 \uD310\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC591\uC606\uC744 \uB04C\uC5B4 \uB113\uD788\uAC70\uB098 \uAE4A\uAC8C \uD569\uB2C8\uB2E4.",
|
|
30298
|
+
Cassette: "\uCE74\uC138\uD2B8\uD615",
|
|
30299
|
+
"Open hearth": "\uAC1C\uBC29\uD615",
|
|
30300
|
+
Hearth: "\uD654\uB355 \uD310",
|
|
29960
30301
|
Diameter: "\uC9C0\uB984",
|
|
29961
30302
|
"Base unit": "\uD558\uBD80\uC7A5",
|
|
29962
30303
|
"A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "\uC0C1\uD310\uC774 \uC788\uB294 \uC8FC\uBC29 \uC218\uB0A9\uC7A5\uC73C\uB85C \uBCBD\uC5D0 \uBD99\uC5EC \uB193\uC2B5\uB2C8\uB2E4. \uBB38, \uC11C\uB78D \uB610\uB294 \uC624\uBE10\uC774 \uC785\uBA74\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB2F9\uACA8 \uB113\uD799\uB2C8\uB2E4.",
|
|
@@ -29999,6 +30340,16 @@ var translations = {
|
|
|
29999
30340
|
Sofa: "\uC18C\uD30C",
|
|
30000
30341
|
Armchair: "\uC548\uB77D\uC758\uC790",
|
|
30001
30342
|
Chair: "\uC758\uC790",
|
|
30343
|
+
Banquette: "\uBCA4\uCE58 \uC18C\uD30C",
|
|
30344
|
+
"A bench built along the wall, its back against it. Pull its sides to make it longer: it takes a seat for about every 60 cm.": "\uBCBD\uC744 \uB530\uB77C \uC9DC \uB123\uC740 \uBCA4\uCE58\uB85C, \uB4F1\uBC1B\uC774\uAC00 \uBCBD\uC5D0 \uBD99\uC2B5\uB2C8\uB2E4. \uC591\uC606\uC744 \uB04C\uC5B4 \uB298\uC774\uC138\uC694. \uC57D 60cm\uB9C8\uB2E4 \uC790\uB9AC\uAC00 \uD558\uB098\uC529 \uC0DD\uAE41\uB2C8\uB2E4.",
|
|
30345
|
+
Back: "\uB4F1\uBC1B\uC774",
|
|
30346
|
+
Cushions: "\uCFE0\uC158",
|
|
30347
|
+
Panel: "\uD328\uB110",
|
|
30348
|
+
Base: "\uBC1B\uCE68",
|
|
30349
|
+
Closed: "\uB9C9\uD798",
|
|
30350
|
+
Legs: "\uB2E4\uB9AC",
|
|
30351
|
+
"End panels": "\uCE21\uD310",
|
|
30352
|
+
Both: "\uC591\uCABD",
|
|
30002
30353
|
Desk: "\uCC45\uC0C1",
|
|
30003
30354
|
Seats: "\uC88C\uC11D \uC218",
|
|
30004
30355
|
"Office chair": "\uC0AC\uBB34\uC6A9 \uC758\uC790",
|
|
@@ -30077,6 +30428,12 @@ var translations = {
|
|
|
30077
30428
|
Double: "\xC7ift kanatl\u0131",
|
|
30078
30429
|
Sliding: "S\xFCrg\xFCl\xFC",
|
|
30079
30430
|
"Opening only": "Yaln\u0131zca bo\u015Fluk",
|
|
30431
|
+
"Sliding on wall": "Duvar \xF6n\xFC s\xFCrg\xFCl\xFC",
|
|
30432
|
+
"Double sliding on wall": "Duvar \xF6n\xFC \xE7ift s\xFCrg\xFCl\xFC",
|
|
30433
|
+
Pocket: "Duvar i\xE7i s\xFCrg\xFCl\xFC",
|
|
30434
|
+
"Type: Sliding": "S\xFCrme cam kap\u0131",
|
|
30435
|
+
"Slides to": "Kayma y\xF6n\xFC",
|
|
30436
|
+
Leaves: "Kanat say\u0131s\u0131",
|
|
30080
30437
|
Left: "Sol",
|
|
30081
30438
|
Right: "Sa\u011F",
|
|
30082
30439
|
"Insert 4 \xD7 3 m room": "4 \xD7 3 m oda ekle",
|
|
@@ -30101,6 +30458,11 @@ var translations = {
|
|
|
30101
30458
|
"Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.": "Arkas\u0131yla duvara as\u0131l\u0131r, bacas\u0131 \xFCst\xFCndedir. Yerden y\xFCksekli\u011Fi alt y\xFCz\xFCn\xFCn y\xFCksekli\u011Fidir.",
|
|
30102
30459
|
"Water heater": "Su \u0131s\u0131t\u0131c\u0131",
|
|
30103
30460
|
"A round tank against the wall. Pull its sides to make it larger. Give it a height above the floor to hang it on the wall.": "Duvara dayanan yuvarlak bir tank. B\xFCy\xFCtmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin. Duvara asmak i\xE7in ona yerden bir y\xFCkseklik verin.",
|
|
30461
|
+
Fireplace: "\u015E\xF6mine",
|
|
30462
|
+
"Its chimney breast goes against the wall by its back. A cassette is a closed insert behind glass, set in the breast; an open hearth has its slab on the floor in front. Pull its sides to make it wider or deeper.": "G\xF6vdesi arkas\u0131yla duvara yaslan\u0131r. Kaset, g\xF6vdeye g\xF6m\xFCl\xFC, cam arkas\u0131nda kapal\u0131 bir ocakt\u0131r; a\xE7\u0131k oca\u011F\u0131n \xF6n\xFCnde yerde taban ta\u015F\u0131 vard\u0131r. Geni\u015Fletmek veya derinle\u015Ftirmek i\xE7in yanlar\u0131n\u0131 \xE7ekin.",
|
|
30463
|
+
Cassette: "Kaset",
|
|
30464
|
+
"Open hearth": "A\xE7\u0131k ocak",
|
|
30465
|
+
Hearth: "Ocak \xF6n\xFC",
|
|
30104
30466
|
Diameter: "\xC7ap",
|
|
30105
30467
|
"Base unit": "Alt dolap",
|
|
30106
30468
|
"A kitchen unit with its worktop, against the wall: doors, drawers or an oven, as elevations show it. Pull its sides to make it wider.": "Tezg\xE2h\u0131yla birlikte duvara dayal\u0131 bir mutfak dolab\u0131: kap\u0131lar, \xE7ekmeceler veya f\u0131r\u0131n, g\xF6r\xFCn\xFC\u015Flerde g\xF6r\xFCld\xFC\u011F\xFC gibi. Geni\u015Fletmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin.",
|
|
@@ -30143,6 +30505,16 @@ var translations = {
|
|
|
30143
30505
|
Sofa: "Kanepe",
|
|
30144
30506
|
Armchair: "Koltuk",
|
|
30145
30507
|
Chair: "Sandalye",
|
|
30508
|
+
Banquette: "Bank",
|
|
30509
|
+
"A bench built along the wall, its back against it. Pull its sides to make it longer: it takes a seat for about every 60 cm.": "Duvar boyunca yap\u0131lm\u0131\u015F, s\u0131rt\u0131 duvara dayal\u0131 bir oturak. Uzatmak i\xE7in yanlar\u0131n\u0131 \xE7ekin: yakla\u015F\u0131k her 60 cm i\xE7in bir oturma yeri al\u0131r.",
|
|
30510
|
+
Back: "S\u0131rt",
|
|
30511
|
+
Cushions: "Minderler",
|
|
30512
|
+
Panel: "Panel",
|
|
30513
|
+
Base: "Taban",
|
|
30514
|
+
Closed: "Kapal\u0131",
|
|
30515
|
+
Legs: "Ayaklar",
|
|
30516
|
+
"End panels": "Yan paneller",
|
|
30517
|
+
Both: "Her ikisi",
|
|
30146
30518
|
Desk: "\xC7al\u0131\u015Fma masas\u0131",
|
|
30147
30519
|
Seats: "Oturma yeri",
|
|
30148
30520
|
"Office chair": "Ofis sandalyesi",
|
|
@@ -30175,9 +30547,9 @@ var architecture = {
|
|
|
30175
30547
|
api.registerParametric(hood);
|
|
30176
30548
|
api.registerParametric(splashback);
|
|
30177
30549
|
api.registerParametric(tall(cornerSofa, 850, false));
|
|
30178
|
-
for (const kind of [sofa("arch.sofa", "Sofa", 1600, 2), sofa("arch.armchair", "Armchair", 850, 1), chair, desk, officeChair]) api.registerParametric(kind);
|
|
30550
|
+
for (const kind of [sofa("arch.sofa", "Sofa", 1600, 2), sofa("arch.armchair", "Armchair", 850, 1), chair, banquette, desk, officeChair]) api.registerParametric(kind);
|
|
30179
30551
|
api.registerParametric(tall(radiator, RADIATOR_TOP));
|
|
30180
|
-
for (const kind of [heatPump, gasBoiler, waterHeater]) api.registerParametric(kind);
|
|
30552
|
+
for (const kind of [heatPump, gasBoiler, waterHeater, fireplace]) api.registerParametric(kind);
|
|
30181
30553
|
api.registerParametric(compass);
|
|
30182
30554
|
api.registerCommand({
|
|
30183
30555
|
id: "arch.room",
|
|
@@ -34844,8 +35216,8 @@ function weighted(svg, millimetresPerPixel) {
|
|
|
34844
35216
|
return svg.replace(/stroke-width="([\d.]+)"/g, (_, width) => `stroke-width="${Number(width) * millimetresPerPixel}"`).replace(/ vector-effect="non-scaling-stroke"/g, "");
|
|
34845
35217
|
}
|
|
34846
35218
|
function renderPng(svg, pixels) {
|
|
34847
|
-
const
|
|
34848
|
-
const [width, height] = [
|
|
35219
|
+
const box2 = svgBox(svg);
|
|
35220
|
+
const [width, height] = [box2.maxX - box2.minX, box2.maxY - box2.minY];
|
|
34849
35221
|
const longer = Math.max(width, height);
|
|
34850
35222
|
const resvg = new Resvg(weighted(svg, longer / pixels), {
|
|
34851
35223
|
fitTo: width >= height ? { mode: "width", value: pixels } : { mode: "height", value: pixels },
|