opencalque 1.11.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 +1422 -358
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -7447,11 +7447,11 @@ var require_fast_deep_equal = __commonJS({
|
|
|
7447
7447
|
if (a === b) return true;
|
|
7448
7448
|
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
7449
7449
|
if (a.constructor !== b.constructor) return false;
|
|
7450
|
-
var
|
|
7450
|
+
var length2, i, keys;
|
|
7451
7451
|
if (Array.isArray(a)) {
|
|
7452
|
-
|
|
7453
|
-
if (
|
|
7454
|
-
for (i =
|
|
7452
|
+
length2 = a.length;
|
|
7453
|
+
if (length2 != b.length) return false;
|
|
7454
|
+
for (i = length2; i-- !== 0; )
|
|
7455
7455
|
if (!equal(a[i], b[i])) return false;
|
|
7456
7456
|
return true;
|
|
7457
7457
|
}
|
|
@@ -7459,11 +7459,11 @@ var require_fast_deep_equal = __commonJS({
|
|
|
7459
7459
|
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
7460
7460
|
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
7461
7461
|
keys = Object.keys(a);
|
|
7462
|
-
|
|
7463
|
-
if (
|
|
7464
|
-
for (i =
|
|
7462
|
+
length2 = keys.length;
|
|
7463
|
+
if (length2 !== Object.keys(b).length) return false;
|
|
7464
|
+
for (i = length2; i-- !== 0; )
|
|
7465
7465
|
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
7466
|
-
for (i =
|
|
7466
|
+
for (i = length2; i-- !== 0; ) {
|
|
7467
7467
|
var key = keys[i];
|
|
7468
7468
|
if (!equal(a[key], b[key])) return false;
|
|
7469
7469
|
}
|
|
@@ -10468,11 +10468,11 @@ var require_ucs2length = __commonJS({
|
|
|
10468
10468
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10469
10469
|
function ucs2length(str) {
|
|
10470
10470
|
const len2 = str.length;
|
|
10471
|
-
let
|
|
10471
|
+
let length2 = 0;
|
|
10472
10472
|
let pos = 0;
|
|
10473
10473
|
let value;
|
|
10474
10474
|
while (pos < len2) {
|
|
10475
|
-
|
|
10475
|
+
length2++;
|
|
10476
10476
|
value = str.charCodeAt(pos++);
|
|
10477
10477
|
if (value >= 55296 && value <= 56319 && pos < len2) {
|
|
10478
10478
|
value = str.charCodeAt(pos);
|
|
@@ -10480,7 +10480,7 @@ var require_ucs2length = __commonJS({
|
|
|
10480
10480
|
pos++;
|
|
10481
10481
|
}
|
|
10482
10482
|
}
|
|
10483
|
-
return
|
|
10483
|
+
return length2;
|
|
10484
10484
|
}
|
|
10485
10485
|
exports.default = ucs2length;
|
|
10486
10486
|
ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default';
|
|
@@ -12807,9 +12807,9 @@ function parallelPath(points, closed, distance, smooth = false) {
|
|
|
12807
12807
|
const before = norm(sub(p, at2(i - 1)));
|
|
12808
12808
|
const after = norm(sub(at2(i + 1), p));
|
|
12809
12809
|
if (smooth) {
|
|
12810
|
-
const
|
|
12811
|
-
if (len(
|
|
12812
|
-
moved.push(add(p, scale(
|
|
12810
|
+
const across2 = perp(norm(sub(at2(i + 1), at2(i - 1))));
|
|
12811
|
+
if (len(across2) === 0) return null;
|
|
12812
|
+
moved.push(add(p, scale(across2, distance)));
|
|
12813
12813
|
continue;
|
|
12814
12814
|
}
|
|
12815
12815
|
const [a, b] = [perp(len(before) === 0 ? after : before), perp(len(after) === 0 ? before : after)];
|
|
@@ -12829,7 +12829,7 @@ function besidePath(points, closed, p) {
|
|
|
12829
12829
|
const n3 = points.length;
|
|
12830
12830
|
let best = Infinity;
|
|
12831
12831
|
let foot = points[0];
|
|
12832
|
-
let
|
|
12832
|
+
let across2 = { x: 0, y: 0 };
|
|
12833
12833
|
for (let i = 0; i < (closed ? n3 : n3 - 1); i++) {
|
|
12834
12834
|
const a = points[i];
|
|
12835
12835
|
const b = points[(i + 1) % n3];
|
|
@@ -12842,10 +12842,10 @@ function besidePath(points, closed, p) {
|
|
|
12842
12842
|
if (gap < best - 1e-9) {
|
|
12843
12843
|
best = gap;
|
|
12844
12844
|
foot = q;
|
|
12845
|
-
|
|
12846
|
-
} else if (gap <= best + 1e-9)
|
|
12845
|
+
across2 = perp(norm(d));
|
|
12846
|
+
} else if (gap <= best + 1e-9) across2 = add(across2, perp(norm(d)));
|
|
12847
12847
|
}
|
|
12848
|
-
const side = (p.x - foot.x) *
|
|
12848
|
+
const side = (p.x - foot.x) * across2.x + (p.y - foot.y) * across2.y;
|
|
12849
12849
|
return side < 0 ? -best : best;
|
|
12850
12850
|
}
|
|
12851
12851
|
function ellipseArc(e) {
|
|
@@ -13417,10 +13417,10 @@ function promiseAllObject(promisesObj) {
|
|
|
13417
13417
|
return resolvedObj;
|
|
13418
13418
|
});
|
|
13419
13419
|
}
|
|
13420
|
-
function randomString(
|
|
13420
|
+
function randomString(length2 = 10) {
|
|
13421
13421
|
const chars = "abcdefghijklmnopqrstuvwxyz";
|
|
13422
13422
|
let str = "";
|
|
13423
|
-
for (let i = 0; i <
|
|
13423
|
+
for (let i = 0; i < length2; i++) {
|
|
13424
13424
|
str += chars[Math.floor(Math.random() * chars.length)];
|
|
13425
13425
|
}
|
|
13426
13426
|
return str;
|
|
@@ -14425,8 +14425,8 @@ var ulid = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;
|
|
|
14425
14425
|
var xid = /^[0-9a-vA-V]{20}$/;
|
|
14426
14426
|
var ksuid = /^[A-Za-z0-9]{27}$/;
|
|
14427
14427
|
var nanoid = /^[a-zA-Z0-9_-]{21}$/;
|
|
14428
|
-
function nanoidOfLength(
|
|
14429
|
-
return new RegExp(`^[a-zA-Z0-9_-]{${
|
|
14428
|
+
function nanoidOfLength(length2) {
|
|
14429
|
+
return new RegExp(`^[a-zA-Z0-9_-]{${length2}}$`);
|
|
14430
14430
|
}
|
|
14431
14431
|
var duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
|
|
14432
14432
|
var guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
|
|
@@ -14628,8 +14628,8 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
14628
14628
|
inst._zod.check = (payload) => {
|
|
14629
14629
|
const input = payload.value;
|
|
14630
14630
|
const units = input.length;
|
|
14631
|
-
const
|
|
14632
|
-
if (
|
|
14631
|
+
const length2 = typeof input === "string" && units > def.maximum ? codePointLength(input) : units;
|
|
14632
|
+
if (length2 <= def.maximum)
|
|
14633
14633
|
return;
|
|
14634
14634
|
const origin = getLengthableOrigin(input);
|
|
14635
14635
|
payload.issues.push({
|
|
@@ -14650,8 +14650,8 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
14650
14650
|
inst._zod.check = (payload) => {
|
|
14651
14651
|
const input = payload.value;
|
|
14652
14652
|
const units = input.length;
|
|
14653
|
-
const
|
|
14654
|
-
if (
|
|
14653
|
+
const length2 = typeof input === "string" && units >= def.minimum && units < def.minimum * 2 ? codePointLength(input) : units;
|
|
14654
|
+
if (length2 >= def.minimum)
|
|
14655
14655
|
return;
|
|
14656
14656
|
const origin = getLengthableOrigin(input);
|
|
14657
14657
|
payload.issues.push({
|
|
@@ -14672,11 +14672,11 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
14672
14672
|
inst._zod.check = (payload) => {
|
|
14673
14673
|
const input = payload.value;
|
|
14674
14674
|
const units = input.length;
|
|
14675
|
-
const
|
|
14676
|
-
if (
|
|
14675
|
+
const length2 = typeof input === "string" && units >= def.length && units <= def.length * 2 ? codePointLength(input) : units;
|
|
14676
|
+
if (length2 === def.length)
|
|
14677
14677
|
return;
|
|
14678
14678
|
const origin = getLengthableOrigin(input);
|
|
14679
|
-
const tooBig =
|
|
14679
|
+
const tooBig = length2 > def.length;
|
|
14680
14680
|
payload.issues.push({
|
|
14681
14681
|
origin,
|
|
14682
14682
|
...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length },
|
|
@@ -17434,11 +17434,11 @@ function _minLength(minimum, params) {
|
|
|
17434
17434
|
});
|
|
17435
17435
|
}
|
|
17436
17436
|
// @__NO_SIDE_EFFECTS__
|
|
17437
|
-
function _length(
|
|
17437
|
+
function _length(length2, params) {
|
|
17438
17438
|
return new $ZodCheckLengthEquals({
|
|
17439
17439
|
check: "length_equals",
|
|
17440
17440
|
...normalizeParams(params),
|
|
17441
|
-
length
|
|
17441
|
+
length: length2
|
|
17442
17442
|
});
|
|
17443
17443
|
}
|
|
17444
17444
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -19928,7 +19928,7 @@ function duration2(params) {
|
|
|
19928
19928
|
config({ jitless: true });
|
|
19929
19929
|
var FORMAT = "opencalque";
|
|
19930
19930
|
var FORMER_FORMAT = "opencad";
|
|
19931
|
-
var FORMAT_VERSION =
|
|
19931
|
+
var FORMAT_VERSION = 5;
|
|
19932
19932
|
var Id = string2().min(1);
|
|
19933
19933
|
var Vec2Schema = object({ x: number2(), y: number2() });
|
|
19934
19934
|
var PatternSchema = object({
|
|
@@ -20164,9 +20164,10 @@ var NodeSchema = discriminatedUnion("type", [
|
|
|
20164
20164
|
author: string2().optional().describe("Overrides the author of the drawing on this sheet."),
|
|
20165
20165
|
date: string2().optional(),
|
|
20166
20166
|
number: string2().optional(),
|
|
20167
|
-
|
|
20167
|
+
revisions: string2().optional().describe(`The sheet's revisions, one per line, each its mark, date and description separated by '|' ("2 | 2026-11-17 | Issued for permit"). Only the strip shows them (the drawing's "settings", titleBlock).`),
|
|
20168
|
+
hide: array(string2()).optional().describe("Entries this sheet leaves out, among project, client, address, sheet, page, author, scale, format, date, number and revisions. Defaults to ['page'].")
|
|
20168
20169
|
}).optional().describe(
|
|
20169
|
-
`When present (even empty), the sheet gets a border and a title block in its bottom right corner. The block is made of the entries that have something to say and are not hidden: the project, client and address (from the document's "info"; the project falls back on the document name), the name of the paper and of its page, the author, the scale and format, and the date
|
|
20170
|
+
`When present (even empty), the sheet gets a border and a title block, in its bottom right corner or down its right edge, as the drawing's "settings" say (titleBlock). The block is made of the entries that have something to say and are not hidden: the project, client and address (from the document's "info"; the project falls back on the document name), the name of the paper and of its page, the author, the scale and format, and the date, sheet number and revisions given here. An entry with nothing in it takes no room. Texts may hold fields such as {date} or {page-number}.`
|
|
20170
20171
|
)
|
|
20171
20172
|
}).describe(
|
|
20172
20173
|
"A sheet of paper laid on the drawing, with its top-left corner at (x, y): it frames the part of the drawing meant for one printed sheet. Width and height are in drawing millimetres like everything else. It has no children: whatever lies entirely inside its rectangle is on it, and is moved and copied with it in the editor."
|
|
@@ -20296,7 +20297,11 @@ var NodeSchema = discriminatedUnion("type", [
|
|
|
20296
20297
|
]).describe("All coordinates and lengths are millimetres. X grows to the right, Y grows downward.");
|
|
20297
20298
|
var DrawingSettingsSchema = object({
|
|
20298
20299
|
system: _enum(["metric", "imperial"]).optional().describe("'imperial': areas in square feet, and the lengths, volumes and thicknesses of tables of quantities in feet and inches. Defaults to 'metric' (square metres, metres)."),
|
|
20299
|
-
decimal: _enum([".", ","]).optional().describe("The decimal separator of the areas, tables and dimensions. Defaults to '.'.")
|
|
20300
|
+
decimal: _enum([".", ","]).optional().describe("The decimal separator of the areas, tables and dimensions. Defaults to '.'."),
|
|
20301
|
+
titleBlock: object({
|
|
20302
|
+
layout: _enum(["corner", "strip"]).optional().describe("'corner' (the default): a block of values in the bottom right corner. 'strip': a column down the right edge of the sheet, as US sheets have it, each entry under its caption, the project at the top, the revisions under it and the sheet title and number at the bottom."),
|
|
20303
|
+
labels: record(string2(), string2()).optional().describe("The captions of the strip, by entry (project, client, address, sheet, page, author, scale, format, date, number, revisions). Left out, English ones; an empty one is not drawn.")
|
|
20304
|
+
}).optional().describe('How the title blocks of every sheet are laid out, the same throughout the set. Left out, in the corner. What each sheet shows is its own ("titleBlock" of a paper).')
|
|
20300
20305
|
});
|
|
20301
20306
|
var DocumentSchema = object({
|
|
20302
20307
|
format: literal(FORMAT),
|
|
@@ -20311,7 +20316,7 @@ var DocumentSchema = object({
|
|
|
20311
20316
|
assets: record(Id, AssetSchema).optional().describe("Embedded files by id. Large; tools that only need the drawing can ignore it."),
|
|
20312
20317
|
nodes: record(Id, NodeSchema).describe(`Every node by id, as a flat map. The tree is expressed by each node's "parent" and "order".`),
|
|
20313
20318
|
info: object({ project: string2().optional(), client: string2().optional(), address: string2().optional(), author: string2().optional() }).optional().describe("What the drawing says about itself, shown in the title block of every sheet: the project (the document name when not given), the client, the address of the site (lines separated by a line break), the author."),
|
|
20314
|
-
settings: DrawingSettingsSchema.optional().describe("How the drawing writes its numbers
|
|
20319
|
+
settings: DrawingSettingsSchema.optional().describe("How the drawing writes its numbers (the floor areas of its rooms, its tables of quantities, its dimensions) and lays out the title blocks of its sheets. Left out, in metric with a decimal point, the block in the corner."),
|
|
20315
20320
|
meta: record(string2(), unknown()).optional()
|
|
20316
20321
|
}).describe("An OpenCalque document (.opencalque file).");
|
|
20317
20322
|
var NODE_TYPES = NodeSchema.options.map((option) => option.shape.type.value);
|
|
@@ -20452,12 +20457,13 @@ function withoutAssets(doc) {
|
|
|
20452
20457
|
const { assets: _, ...rest } = doc;
|
|
20453
20458
|
return rest;
|
|
20454
20459
|
}
|
|
20460
|
+
var deskDrewChair = (node2) => node2.type === "parametric" && node2.kind === "arch.desk" && !(typeof node2.props === "object" && node2.props !== null && node2.props.chair === false);
|
|
20455
20461
|
function serializeDocument(doc) {
|
|
20456
20462
|
const used = new Set(Object.values(doc.nodes).flatMap((n3) => n3.type === "image" ? [n3.asset] : []));
|
|
20457
20463
|
const assets = Object.fromEntries(Object.entries(doc.assets ?? {}).filter(([id]) => used.has(id)));
|
|
20458
20464
|
const { assets: _, ...rest } = doc;
|
|
20459
20465
|
const nodes = Object.values(doc.nodes);
|
|
20460
|
-
const needed = nodes.some((n3) => n3.type === "link") ? 4 : nodes.some((n3) => n3.type === "elevation" || n3.type === "viewline") ? 3 : 2;
|
|
20466
|
+
const needed = nodes.some(deskDrewChair) ? 5 : nodes.some((n3) => n3.type === "link") ? 4 : nodes.some((n3) => n3.type === "elevation" || n3.type === "viewline") ? 3 : 2;
|
|
20461
20467
|
const version2 = Math.min(doc.version, needed);
|
|
20462
20468
|
return JSON.stringify(used.size > 0 ? { ...rest, version: version2, assets } : { ...rest, version: version2 }, null, 2) + "\n";
|
|
20463
20469
|
}
|
|
@@ -20486,37 +20492,37 @@ function courseOf(wall) {
|
|
|
20486
20492
|
function makeCourse(wall) {
|
|
20487
20493
|
const arc = wallArc(wall);
|
|
20488
20494
|
if (!arc) {
|
|
20489
|
-
const
|
|
20495
|
+
const length3 = dist(wall.a, wall.b);
|
|
20490
20496
|
const d = norm(sub(wall.b, wall.a));
|
|
20491
20497
|
const n3 = perp(d);
|
|
20492
20498
|
const at2 = (s) => add(wall.a, scale(d, s));
|
|
20493
20499
|
return {
|
|
20494
|
-
length:
|
|
20500
|
+
length: length3,
|
|
20495
20501
|
at: at2,
|
|
20496
20502
|
dir: () => d,
|
|
20497
|
-
offset: (s,
|
|
20503
|
+
offset: (s, across2) => add(at2(s), scale(n3, across2)),
|
|
20498
20504
|
project: (p) => ({ along: dot(sub(p, wall.a), d), across: cross(d, sub(p, wall.a)) }),
|
|
20499
20505
|
stops: []
|
|
20500
20506
|
};
|
|
20501
20507
|
}
|
|
20502
20508
|
const { centre, radius, from, sweep: sweep2 } = arc;
|
|
20503
|
-
const
|
|
20509
|
+
const length2 = radius * Math.abs(sweep2);
|
|
20504
20510
|
const way = Math.sign(sweep2);
|
|
20505
|
-
const angle = (s) => from + sweep2 * s /
|
|
20511
|
+
const angle = (s) => from + sweep2 * s / length2;
|
|
20506
20512
|
const round3 = (s, r) => ({ x: centre.x + r * Math.cos(angle(s)), y: centre.y + r * Math.sin(angle(s)) });
|
|
20507
20513
|
const steps = Math.max(4, Math.ceil(Math.abs(sweep2) / ARC_STEP));
|
|
20508
20514
|
return {
|
|
20509
|
-
length,
|
|
20515
|
+
length: length2,
|
|
20510
20516
|
at: (s) => round3(s, radius),
|
|
20511
20517
|
dir: (s) => ({ x: -way * Math.sin(angle(s)), y: way * Math.cos(angle(s)) }),
|
|
20512
20518
|
// The inner face of a wall thicker than its radius would cross the centre: it stops there.
|
|
20513
|
-
offset: (s,
|
|
20519
|
+
offset: (s, across2) => round3(s, Math.max(0, radius - way * across2)),
|
|
20514
20520
|
project: (p) => {
|
|
20515
20521
|
let turn2 = Math.atan2(p.y - centre.y, p.x - centre.x) - (from + sweep2 / 2);
|
|
20516
20522
|
turn2 = Math.atan2(Math.sin(turn2), Math.cos(turn2));
|
|
20517
|
-
return { along:
|
|
20523
|
+
return { along: length2 / 2 + turn2 / sweep2 * length2, across: way * (radius - dist(p, centre)) };
|
|
20518
20524
|
},
|
|
20519
|
-
stops: Array.from({ length: steps + 1 }, (_, i) =>
|
|
20525
|
+
stops: Array.from({ length: steps + 1 }, (_, i) => length2 * i / steps)
|
|
20520
20526
|
};
|
|
20521
20527
|
}
|
|
20522
20528
|
function wallLength(wall) {
|
|
@@ -20530,10 +20536,10 @@ function wallPoints(wall) {
|
|
|
20530
20536
|
const course = courseOf(wall);
|
|
20531
20537
|
return [wall.a, ...course.stops.slice(1, -1).map((s) => course.at(s)), wall.b];
|
|
20532
20538
|
}
|
|
20533
|
-
function wallParallel(wall,
|
|
20539
|
+
function wallParallel(wall, across2, extend2 = 0) {
|
|
20534
20540
|
const course = courseOf(wall);
|
|
20535
20541
|
const stops = course.stops.length > 0 ? course.stops : [0, course.length];
|
|
20536
|
-
const line2 = stops.map((s) => course.offset(s,
|
|
20542
|
+
const line2 = stops.map((s) => course.offset(s, across2));
|
|
20537
20543
|
return extend2 > 0 ? [sub(line2[0], scale(course.dir(0), extend2)), ...line2, add(line2[line2.length - 1], scale(course.dir(course.length), extend2))] : line2;
|
|
20538
20544
|
}
|
|
20539
20545
|
function wallSides(wall) {
|
|
@@ -20548,16 +20554,16 @@ var middleAcross = (wall) => {
|
|
|
20548
20554
|
function wallContains(wall, p, tolerance = 0) {
|
|
20549
20555
|
if (dist(wall.a, wall.b) < 1e-6) return false;
|
|
20550
20556
|
const course = courseOf(wall);
|
|
20551
|
-
const { along: along2, across } = course.project(p);
|
|
20557
|
+
const { along: along2, across: across2 } = course.project(p);
|
|
20552
20558
|
const { left, right } = wallSides(wall);
|
|
20553
|
-
return along2 >= -tolerance && along2 <= course.length + tolerance &&
|
|
20559
|
+
return along2 >= -tolerance && along2 <= course.length + tolerance && across2 >= -left - tolerance && across2 <= right + tolerance;
|
|
20554
20560
|
}
|
|
20555
20561
|
function distToBody(p, wall) {
|
|
20556
20562
|
if (dist(wall.a, wall.b) < 1e-6) return Infinity;
|
|
20557
20563
|
const course = courseOf(wall);
|
|
20558
|
-
const { along: along2, across } = course.project(p);
|
|
20564
|
+
const { along: along2, across: across2 } = course.project(p);
|
|
20559
20565
|
const { left, right } = wallSides(wall);
|
|
20560
|
-
return Math.hypot(Math.max(0, -left -
|
|
20566
|
+
return Math.hypot(Math.max(0, -left - across2, across2 - right), along2 < 0 ? -along2 : Math.max(0, along2 - course.length));
|
|
20561
20567
|
}
|
|
20562
20568
|
function bulgeThrough(wall, p) {
|
|
20563
20569
|
const chord = dist(wall.a, wall.b);
|
|
@@ -20679,10 +20685,10 @@ function abuts(wall, p, other) {
|
|
|
20679
20685
|
const d = norm(sub(wall.b, wall.a));
|
|
20680
20686
|
const n3 = perp(d);
|
|
20681
20687
|
const own2 = wallSides(wall);
|
|
20682
|
-
const
|
|
20688
|
+
const across2 = [add(p, scale(n3, own2.right)), add(p, scale(n3, -own2.left))];
|
|
20683
20689
|
const course = courseOf(other);
|
|
20684
20690
|
const { left, right } = wallSides(other);
|
|
20685
|
-
const at2 =
|
|
20691
|
+
const at2 = across2.map((q) => course.project(q));
|
|
20686
20692
|
if (at2.some(({ along: along2 }) => along2 < -ABUT_TOLERANCE || along2 > course.length + ABUT_TOLERANCE)) return false;
|
|
20687
20693
|
for (const [face, body] of [[right, -1], [-left, 1]]) {
|
|
20688
20694
|
if (!at2.every(({ across: c }) => Math.abs(c - face) < ABUT_TOLERANCE)) continue;
|
|
@@ -20864,8 +20870,8 @@ function cap(p, wall, away, doc, seams, stopped) {
|
|
|
20864
20870
|
const other = next;
|
|
20865
20871
|
const passes = me.join === "through" || me.join !== "butt" && other.join === "butt";
|
|
20866
20872
|
const [passing, stopping] = passes ? [me, other] : [other, me];
|
|
20867
|
-
const
|
|
20868
|
-
const face = dot(stopping.d,
|
|
20873
|
+
const across2 = perp(passing.d);
|
|
20874
|
+
const face = dot(stopping.d, across2) >= 0 ? add(p, scale(across2, passing.plus)) : sub(p, scale(across2, passing.minus));
|
|
20869
20875
|
const turn2 = cross(stopping.d, passing.d);
|
|
20870
20876
|
const lands = (sign) => {
|
|
20871
20877
|
const from = add(p, scale(perp(stopping.d), sign > 0 ? stopping.plus : -stopping.minus));
|
|
@@ -20876,7 +20882,7 @@ function cap(p, wall, away, doc, seams, stopped) {
|
|
|
20876
20882
|
const cut = [lands(-1), lands(1)];
|
|
20877
20883
|
if (lineShown(true) && drawsLine(!passes)) seams?.push([cut[0], cut[1]]);
|
|
20878
20884
|
if (passes) return square(sub(p, scale(away, reach2)));
|
|
20879
|
-
const plusSide = dot(stopping.d,
|
|
20885
|
+
const plusSide = dot(stopping.d, across2) >= 0;
|
|
20880
20886
|
if (stopped && passing.wall) stopped.stop = { wall: passing.wall, side: plusSide === (passing.end === "a") ? 1 : -1 };
|
|
20881
20887
|
return cut;
|
|
20882
20888
|
}
|
|
@@ -20982,16 +20988,16 @@ function openingSpan(node2, registry3) {
|
|
|
20982
20988
|
function overlap(wall, span) {
|
|
20983
20989
|
if (dist(wall.a, wall.b) < 1e-6) return null;
|
|
20984
20990
|
const course = courseOf(wall);
|
|
20985
|
-
const
|
|
20991
|
+
const length2 = course.length;
|
|
20986
20992
|
const ts = [];
|
|
20987
20993
|
const { left, right } = wallSides(wall);
|
|
20988
20994
|
for (const p of span) {
|
|
20989
|
-
const { along: along2, across } = course.project(p);
|
|
20990
|
-
if (
|
|
20995
|
+
const { along: along2, across: across2 } = course.project(p);
|
|
20996
|
+
if (across2 < -left - 1e-6 || across2 > right + 1e-6) return null;
|
|
20991
20997
|
ts.push(along2);
|
|
20992
20998
|
}
|
|
20993
20999
|
const from = Math.max(0, Math.min(...ts));
|
|
20994
|
-
const to = Math.min(
|
|
21000
|
+
const to = Math.min(length2, Math.max(...ts));
|
|
20995
21001
|
return to - from > 1e-6 ? [from, to] : null;
|
|
20996
21002
|
}
|
|
20997
21003
|
function wallOpenings(doc, wall, registry3) {
|
|
@@ -21338,12 +21344,12 @@ var arrayModifier = {
|
|
|
21338
21344
|
const columns = Math.min(whole(params.count), MAX_COPIES);
|
|
21339
21345
|
const rows = Math.min(whole(params.rows), Math.max(1, Math.floor(MAX_COPIES / columns)));
|
|
21340
21346
|
const origin = applyTransform({ x: 0, y: 0 }, frame);
|
|
21341
|
-
const
|
|
21347
|
+
const across2 = sub(applyTransform({ x: Number(params.dx) || 0, y: 0 }, frame), origin);
|
|
21342
21348
|
const down = sub(applyTransform({ x: 0, y: Number(params.dy) || 0 }, frame), origin);
|
|
21343
21349
|
const out = [];
|
|
21344
21350
|
for (let row = 0; row < rows; row++) {
|
|
21345
21351
|
for (let column = 0; column < columns; column++) {
|
|
21346
|
-
const by = { x:
|
|
21352
|
+
const by = { x: across2.x * column + down.x * row, y: across2.y * column + down.y * row };
|
|
21347
21353
|
out.push(...row === 0 && column === 0 ? prims : prims.map((prim) => transformPrimitive(prim, by)));
|
|
21348
21354
|
}
|
|
21349
21355
|
}
|
|
@@ -21571,19 +21577,19 @@ function withoutSpikes(points) {
|
|
|
21571
21577
|
}
|
|
21572
21578
|
function wallPieces(wall, doc, cuts) {
|
|
21573
21579
|
const course = courseOf(wall);
|
|
21574
|
-
const
|
|
21580
|
+
const length2 = course.length;
|
|
21575
21581
|
const { left: l, right: r } = wallSides(wall);
|
|
21576
21582
|
const stopA = {};
|
|
21577
21583
|
const stopB = {};
|
|
21578
21584
|
const capA = cap(wall.a, wall, course.dir(0), doc, void 0, stopA);
|
|
21579
|
-
const capB = cap(wall.b, wall, scale(course.dir(
|
|
21585
|
+
const capB = cap(wall.b, wall, scale(course.dir(length2), -1), doc, void 0, stopB);
|
|
21580
21586
|
const pieces = [];
|
|
21581
21587
|
const piece = (from, to) => {
|
|
21582
21588
|
const start2 = from <= 0 ? capA : [course.offset(from, -l), course.offset(from, r)];
|
|
21583
|
-
const end = to >=
|
|
21589
|
+
const end = to >= length2 ? capB : [course.offset(to, r), course.offset(to, -l)];
|
|
21584
21590
|
const face = (side, begin, stop) => {
|
|
21585
21591
|
const lo = from <= 0 ? course.project(begin).along : from;
|
|
21586
|
-
const hi = to >=
|
|
21592
|
+
const hi = to >= length2 ? course.project(stop).along : to;
|
|
21587
21593
|
return course.stops.filter((s) => s > lo + 1e-3 && s < hi - 1e-3).map((s) => course.offset(s, side > 0 ? r : -l));
|
|
21588
21594
|
};
|
|
21589
21595
|
pieces.push({ start: start2, end, from, to, outline: withoutSpikes([...start2, ...face(1, start2[start2.length - 1], end[0]), ...end, ...face(-1, start2[0], end[end.length - 1]).reverse()]) });
|
|
@@ -21593,7 +21599,7 @@ function wallPieces(wall, doc, cuts) {
|
|
|
21593
21599
|
if (from > start + 1e-6) piece(start, from);
|
|
21594
21600
|
start = Math.max(start, to);
|
|
21595
21601
|
}
|
|
21596
|
-
if (start <
|
|
21602
|
+
if (start < length2 - 1e-6) piece(start, length2);
|
|
21597
21603
|
return { pieces, stops: { ...stopA.stop ? { a: stopA.stop } : {}, ...stopB.stop ? { b: stopB.stop } : {} } };
|
|
21598
21604
|
}
|
|
21599
21605
|
function wallSeams(wall, doc) {
|
|
@@ -21685,8 +21691,8 @@ function farSide(node2) {
|
|
|
21685
21691
|
var SHORTEST = 100;
|
|
21686
21692
|
var KEEP_WAY = Math.sin(4 * Math.PI / 180);
|
|
21687
21693
|
function moveViewEnd(node2, end, p) {
|
|
21688
|
-
const
|
|
21689
|
-
if (
|
|
21694
|
+
const length2 = dist(node2.a, node2.b);
|
|
21695
|
+
if (length2 < 1e-6) return {};
|
|
21690
21696
|
const d = norm(sub(node2.b, node2.a));
|
|
21691
21697
|
const s = dot(sub(p, node2.a), d);
|
|
21692
21698
|
const at2 = (t2) => ({ x: tidy(node2.a.x + d.x * t2), y: tidy(node2.a.y + d.y * t2) });
|
|
@@ -21694,14 +21700,14 @@ function moveViewEnd(node2, end, p) {
|
|
|
21694
21700
|
const way = sub(p, other);
|
|
21695
21701
|
const keeps = dist(p, other) < 1e-6 || Math.abs(cross(norm(way), d)) <= KEEP_WAY;
|
|
21696
21702
|
if (end === "b") return { b: keeps ? at2(Math.max(SHORTEST, s)) : { x: tidy(p.x), y: tidy(p.y) } };
|
|
21697
|
-
const t = Math.min(s,
|
|
21703
|
+
const t = Math.min(s, length2 - SHORTEST);
|
|
21698
21704
|
return { a: keeps ? at2(t) : { x: tidy(p.x), y: tidy(p.y) } };
|
|
21699
21705
|
}
|
|
21700
21706
|
var KEEP_TURN = Math.sin(3 * Math.PI / 180);
|
|
21701
21707
|
function moveViewCorner(node2, corner, p, how = "turn") {
|
|
21702
21708
|
if (how === "turn") return turnViewCorner(node2, corner, p);
|
|
21703
|
-
const
|
|
21704
|
-
if (
|
|
21709
|
+
const length2 = dist(node2.a, node2.b);
|
|
21710
|
+
if (length2 < 1e-6) return {};
|
|
21705
21711
|
const d = norm(sub(node2.b, node2.a));
|
|
21706
21712
|
const n3 = viewer(node2.a, node2.b);
|
|
21707
21713
|
const look = { x: -n3.x, y: -n3.y };
|
|
@@ -21710,8 +21716,8 @@ function moveViewCorner(node2, corner, p, how = "turn") {
|
|
|
21710
21716
|
const t = dot(sub(p, node2.a), look);
|
|
21711
21717
|
const point2 = (along2, beyond) => ({ x: tidy(node2.a.x + d.x * along2 + look.x * beyond), y: tidy(node2.a.y + d.y * along2 + look.y * beyond) });
|
|
21712
21718
|
const atStart = corner === 0 || corner === 3;
|
|
21713
|
-
const from = atStart ? Math.min(s,
|
|
21714
|
-
const to = atStart ?
|
|
21719
|
+
const from = atStart ? Math.min(s, length2 - SHORTEST) : 0;
|
|
21720
|
+
const to = atStart ? length2 : Math.max(SHORTEST, s);
|
|
21715
21721
|
if (corner === 0 || corner === 1) {
|
|
21716
21722
|
const near2 = Math.min(t, deep);
|
|
21717
21723
|
return { a: point2(from, near2), b: point2(to, near2), depth: tidy(deep - near2) };
|
|
@@ -21719,8 +21725,8 @@ function moveViewCorner(node2, corner, p, how = "turn") {
|
|
|
21719
21725
|
return { ...atStart ? { a: point2(from, 0) } : { b: point2(to, 0) }, depth: tidy(Math.max(0, t)) };
|
|
21720
21726
|
}
|
|
21721
21727
|
function turnViewCorner(node2, corner, p) {
|
|
21722
|
-
const
|
|
21723
|
-
if (
|
|
21728
|
+
const length2 = dist(node2.a, node2.b);
|
|
21729
|
+
if (length2 < 1e-6) return {};
|
|
21724
21730
|
const was = norm(sub(node2.b, node2.a));
|
|
21725
21731
|
const lookOf = (u2) => ({ x: u2.y, y: -u2.x });
|
|
21726
21732
|
const deep = depthOf(node2);
|
|
@@ -21755,13 +21761,13 @@ function turnViewCorner(node2, corner, p) {
|
|
|
21755
21761
|
};
|
|
21756
21762
|
}
|
|
21757
21763
|
function moveViewEdge(node2, edge, p) {
|
|
21758
|
-
const
|
|
21759
|
-
if (
|
|
21764
|
+
const length2 = dist(node2.a, node2.b);
|
|
21765
|
+
if (length2 < 1e-6) return {};
|
|
21760
21766
|
if (edge === "far") return { depth: depthThrough(node2, p) };
|
|
21761
21767
|
const d = norm(sub(node2.b, node2.a));
|
|
21762
21768
|
const s = dot(sub(p, node2.a), d);
|
|
21763
21769
|
const at2 = (t2) => ({ x: tidy(node2.a.x + d.x * t2), y: tidy(node2.a.y + d.y * t2) });
|
|
21764
|
-
if (edge === "start") return { a: at2(Math.min(s,
|
|
21770
|
+
if (edge === "start") return { a: at2(Math.min(s, length2 - SHORTEST)) };
|
|
21765
21771
|
if (edge === "end") return { b: at2(Math.max(SHORTEST, s)) };
|
|
21766
21772
|
const n3 = viewer(node2.a, node2.b);
|
|
21767
21773
|
const deep = depthOf(node2);
|
|
@@ -21783,8 +21789,8 @@ function faceUnder(wall, a, b) {
|
|
|
21783
21789
|
const course = courseOf(wall);
|
|
21784
21790
|
if (Math.abs(cross(course.dir(0), norm(sub(b, a)))) > 1e-3) return null;
|
|
21785
21791
|
const face = dot(viewer(a, b), perp(course.dir(0))) > 0 ? "right" : "left";
|
|
21786
|
-
const
|
|
21787
|
-
return [a, b].every((p) => Math.abs(course.project(p).across -
|
|
21792
|
+
const across2 = faceAcross(wall, face);
|
|
21793
|
+
return [a, b].every((p) => Math.abs(course.project(p).across - across2) <= ON_FACE) ? face : null;
|
|
21788
21794
|
}
|
|
21789
21795
|
function heightsOf(kind, props, wall) {
|
|
21790
21796
|
const bottom = kind.sill ? Math.max(0, Number(props[kind.sill]) || 0) : 0;
|
|
@@ -21827,8 +21833,8 @@ function clipConvex(subject, clip) {
|
|
|
21827
21833
|
}
|
|
21828
21834
|
return out;
|
|
21829
21835
|
}
|
|
21830
|
-
function clipLine(p, d,
|
|
21831
|
-
let [from, to] = [0,
|
|
21836
|
+
function clipLine(p, d, length2, polygon) {
|
|
21837
|
+
let [from, to] = [0, length2];
|
|
21832
21838
|
const middle = polygon.reduce((m, q) => ({ x: m.x + q.x / polygon.length, y: m.y + q.y / polygon.length }), { x: 0, y: 0 });
|
|
21833
21839
|
for (let i = 0; i < polygon.length; i++) {
|
|
21834
21840
|
const [u, v] = [polygon[i], polygon[(i + 1) % polygon.length]];
|
|
@@ -21862,14 +21868,14 @@ function sightDepth(outline2, s, along2, off) {
|
|
|
21862
21868
|
if (nearest === -Infinity) nearest = Math.max(...outline2.map(off));
|
|
21863
21869
|
return -nearest;
|
|
21864
21870
|
}
|
|
21865
|
-
function covers(over,
|
|
21866
|
-
const spans = over.filter((b) => b.minY <=
|
|
21867
|
-
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;
|
|
21868
21874
|
for (const [x0, x1] of spans) {
|
|
21869
21875
|
if (x0 > reached + ON_FACE) break;
|
|
21870
21876
|
reached = Math.max(reached, x1);
|
|
21871
21877
|
}
|
|
21872
|
-
return reached >=
|
|
21878
|
+
return reached >= box2.maxX - ON_FACE;
|
|
21873
21879
|
}
|
|
21874
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);
|
|
21875
21881
|
function joinedRuns(pieces) {
|
|
@@ -21958,8 +21964,8 @@ function convexHull(points) {
|
|
|
21958
21964
|
return [...half(sorted), ...half([...sorted].reverse())];
|
|
21959
21965
|
}
|
|
21960
21966
|
function seenFrom(facing, viewer2) {
|
|
21961
|
-
const
|
|
21962
|
-
const c =
|
|
21967
|
+
const length2 = Math.hypot(facing.x, facing.y);
|
|
21968
|
+
const c = length2 < 1e-9 ? 1 : dot(facing, viewer2) / length2;
|
|
21963
21969
|
return c >= Math.SQRT1_2 - 1e-9 ? "front" : c <= -Math.SQRT1_2 + 1e-9 ? "back" : "side";
|
|
21964
21970
|
}
|
|
21965
21971
|
var standingWeight = (p) => (p.kind === "path" || p.kind === "ellipse") && p.strokeWidth === void 0 ? { ...p, strokeWidth: STANDING_WEIGHT } : p;
|
|
@@ -21973,13 +21979,13 @@ function layout(view, doc, registry3, measure = () => []) {
|
|
|
21973
21979
|
const line2 = lineOf(doc, view);
|
|
21974
21980
|
if (!line2) return { prims: [], items: [] };
|
|
21975
21981
|
const node2 = { ...line2, x: view.x, y: view.y, walls: view.walls, dimensions: view.dimensions };
|
|
21976
|
-
const
|
|
21977
|
-
if (
|
|
21982
|
+
const length2 = dist(node2.a, node2.b);
|
|
21983
|
+
if (length2 < 1e-6) return { prims: [], items: [] };
|
|
21978
21984
|
const d = norm(sub(node2.b, node2.a));
|
|
21979
21985
|
const along2 = (p) => dot(sub(p, node2.a), d);
|
|
21980
21986
|
const at2 = (s, h) => ({ x: node2.x + s, y: node2.y - h });
|
|
21981
|
-
const
|
|
21982
|
-
const within = (s) => s >= -ON_FACE && s <=
|
|
21987
|
+
const box2 = (s0, s1, h0, h1) => [at2(s0, h0), at2(s1, h0), at2(s1, h1), at2(s0, h1)];
|
|
21988
|
+
const within = (s) => s >= -ON_FACE && s <= length2 + ON_FACE;
|
|
21983
21989
|
const placed = (object3, shapes, h) => {
|
|
21984
21990
|
const origin = applyTransform({ x: 0, y: 0 }, object3);
|
|
21985
21991
|
const mirrored2 = dot(sub(applyTransform({ x: 1, y: 0 }, object3), origin), d) < 0;
|
|
@@ -22002,10 +22008,10 @@ function layout(view, doc, registry3, measure = () => []) {
|
|
|
22002
22008
|
const items = [];
|
|
22003
22009
|
const drawnFirst = /* @__PURE__ */ new Map();
|
|
22004
22010
|
const shown = (object3, role, prims) => {
|
|
22005
|
-
const
|
|
22011
|
+
const box3 = prims.map(primitiveBounds).reduce((all, one) => one ? all ? unionBounds(all, one) : one : all, null);
|
|
22006
22012
|
const kind = object3.type === "parametric" ? registry3.parametric.get(object3.kind) : void 0;
|
|
22007
|
-
if (
|
|
22008
|
-
const item = { node: object3, role, box:
|
|
22013
|
+
if (box3) {
|
|
22014
|
+
const item = { node: object3, role, box: box3, raises: role !== "opening" || !!kind?.sill };
|
|
22009
22015
|
items.push(item);
|
|
22010
22016
|
if (prims[0]) drawnFirst.set(item, prims[0]);
|
|
22011
22017
|
}
|
|
@@ -22030,8 +22036,8 @@ function layout(view, doc, registry3, measure = () => []) {
|
|
|
22030
22036
|
for (const face of ["right", "left"]) {
|
|
22031
22037
|
const outward = perp(course.dir(0));
|
|
22032
22038
|
if (dot(outward, front) * (face === "right" ? 1 : -1) <= 0) continue;
|
|
22033
|
-
const
|
|
22034
|
-
const [p, q] = faceStretch(doc, wall, face).map((t) => course.offset(t,
|
|
22039
|
+
const across2 = faceAcross(wall, face);
|
|
22040
|
+
const [p, q] = faceStretch(doc, wall, face).map((t) => course.offset(t, across2));
|
|
22035
22041
|
const [op, oq] = [off(p), off(q)];
|
|
22036
22042
|
const [lo, hi] = [-deep - ON_FACE, ON_FACE];
|
|
22037
22043
|
const at3 = (k) => ({ x: p.x + (q.x - p.x) * k, y: p.y + (q.y - p.y) * k });
|
|
@@ -22045,13 +22051,13 @@ function layout(view, doc, registry3, measure = () => []) {
|
|
|
22045
22051
|
for (const { wall, face, ends: ends2 } of seenFaces) {
|
|
22046
22052
|
const ss = ends2.map(along2);
|
|
22047
22053
|
const from = Math.max(0, Math.min(...ss));
|
|
22048
|
-
const to = Math.min(
|
|
22054
|
+
const to = Math.min(length2, Math.max(...ss));
|
|
22049
22055
|
if (to - from < 1e-6) continue;
|
|
22050
22056
|
seen.add(wall.id);
|
|
22051
22057
|
const height = heightOf(doc, wall);
|
|
22052
22058
|
const faces = [];
|
|
22053
22059
|
layers.push({ from, to, depth: depthOn(ends2), prims: faces });
|
|
22054
|
-
faces.push({ kind: "path", points:
|
|
22060
|
+
faces.push({ kind: "path", points: box2(from, to, 0, height), closed: true, fill: WALL_SEEN, own: true });
|
|
22055
22061
|
for (const { node: opening } of wallOpenings(doc, wall, registry3)) {
|
|
22056
22062
|
if (!shownOnPlan(doc, opening)) continue;
|
|
22057
22063
|
const kind = registry3.parametric.get(opening.kind);
|
|
@@ -22062,7 +22068,7 @@ function layout(view, doc, registry3, measure = () => []) {
|
|
|
22062
22068
|
const own2 = kind.front?.(props);
|
|
22063
22069
|
const [bottom, top] = heightsOf(kind, props, height);
|
|
22064
22070
|
const [s0, s1] = span.map(along2);
|
|
22065
|
-
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 }]));
|
|
22066
22072
|
}
|
|
22067
22073
|
for (const object3 of wallMounted(doc, wall, registry3)) {
|
|
22068
22074
|
if (!shownOnPlan(doc, object3)) continue;
|
|
@@ -22080,7 +22086,7 @@ function layout(view, doc, registry3, measure = () => []) {
|
|
|
22080
22086
|
const course = courseOf(wall);
|
|
22081
22087
|
const sides = wallSides(wall);
|
|
22082
22088
|
const outline2 = [course.offset(0, -sides.left), course.offset(course.length, -sides.left), course.offset(course.length, sides.right), course.offset(0, sides.right)];
|
|
22083
|
-
const taken = clipLine(node2.a, d,
|
|
22089
|
+
const taken = clipLine(node2.a, d, length2, outline2);
|
|
22084
22090
|
if (taken) cutAt.set(wall.id, { taken });
|
|
22085
22091
|
}
|
|
22086
22092
|
const area = seenArea(node2);
|
|
@@ -22091,7 +22097,7 @@ function layout(view, doc, registry3, measure = () => []) {
|
|
|
22091
22097
|
if (inside3.length < 3) continue;
|
|
22092
22098
|
const ss = inside3.map(along2);
|
|
22093
22099
|
const from = Math.max(0, Math.min(...ss));
|
|
22094
|
-
const to = Math.min(
|
|
22100
|
+
const to = Math.min(length2, Math.max(...ss));
|
|
22095
22101
|
const cutThere = cutAt.get(wall.id)?.taken;
|
|
22096
22102
|
const pieces = cutThere ? [[from, Math.min(to, cutThere[0])], [Math.max(from, cutThere[1]), to]] : [[from, to]];
|
|
22097
22103
|
for (const [s0, s1] of pieces) if (s1 - s0 >= 1) inWay.push({ wall, from: s0, to: s1, depth: depthOn(inside3), height: heightOf(doc, wall) });
|
|
@@ -22112,11 +22118,11 @@ function layout(view, doc, registry3, measure = () => []) {
|
|
|
22112
22118
|
}
|
|
22113
22119
|
const [bottom, top] = heightsOf(kind, registry3.resolveProps(kind, through.node.props), height);
|
|
22114
22120
|
for (const [h0, h1] of [[0, bottom], [top, height]].filter(([h02, h12]) => h12 - h02 > 1)) {
|
|
22115
|
-
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 }] });
|
|
22116
22122
|
}
|
|
22117
22123
|
}
|
|
22118
22124
|
for (const run of joinedRuns(inWay)) {
|
|
22119
|
-
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 }] });
|
|
22120
22126
|
}
|
|
22121
22127
|
for (const leaf of drawnBy ? leavesOf(doc, rootOf(doc, node2.parent)?.id ?? "") : []) {
|
|
22122
22128
|
if (leaf.type !== "instance" && leaf.type !== "parametric" || !shownOnPlan(doc, leaf)) continue;
|
|
@@ -22141,9 +22147,9 @@ function layout(view, doc, registry3, measure = () => []) {
|
|
|
22141
22147
|
if (nearest < -deep - ON_FACE || furthest > ON_FACE) continue;
|
|
22142
22148
|
const ss = points.map(along2);
|
|
22143
22149
|
const from = Math.max(0, Math.min(...ss));
|
|
22144
|
-
const to = Math.min(
|
|
22150
|
+
const to = Math.min(length2, Math.max(...ss));
|
|
22145
22151
|
if (to - from < 1) continue;
|
|
22146
|
-
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 }];
|
|
22147
22153
|
layers.push({ from, to, depth: depthOn(seenOf(points)), prims: shown(leaf, "standing", drawn) });
|
|
22148
22154
|
}
|
|
22149
22155
|
const onFaces = new Set(items.filter((item) => item.role === "fixed").map((item) => item.node.id));
|
|
@@ -22155,23 +22161,23 @@ function layout(view, doc, registry3, measure = () => []) {
|
|
|
22155
22161
|
const [nearest, furthest] = [Math.max(...offs), Math.min(...offs)];
|
|
22156
22162
|
if (nearest < -deep - ON_FACE || furthest > ON_FACE) continue;
|
|
22157
22163
|
const ss = points.map(along2);
|
|
22158
|
-
if (Math.max(...ss) < 0 || Math.min(...ss) >
|
|
22164
|
+
if (Math.max(...ss) < 0 || Math.min(...ss) > length2) continue;
|
|
22159
22165
|
const kind = registry3.parametric.get(leaf.kind);
|
|
22160
22166
|
const props = kind ? registry3.resolveProps(kind, leaf.props) : {};
|
|
22161
22167
|
const own2 = kind?.front?.(props);
|
|
22162
22168
|
const half = PLATE / 2;
|
|
22163
22169
|
const h = heightAboveFloor(leaf, registry3) ?? 0;
|
|
22164
22170
|
const prims = shown(leaf, "fixed", seenAs(leaf, props, h) ?? placed(leaf, own2 ?? [{ kind: "path", points: [{ x: -half, y: -half }, { x: half, y: -half }, { x: half, y: half }, { x: -half, y: half }], closed: true }], h));
|
|
22165
|
-
layers.push({ from: Math.max(0, Math.min(...ss)), to: Math.min(
|
|
22171
|
+
layers.push({ from: Math.max(0, Math.min(...ss)), to: Math.min(length2, Math.max(...ss)), depth: depthOn(seenOf(points)), prims });
|
|
22166
22172
|
}
|
|
22167
|
-
const [x0, x1] = [node2.x, node2.x +
|
|
22168
|
-
const ends =
|
|
22173
|
+
const [x0, x1] = [node2.x, node2.x + length2];
|
|
22174
|
+
const ends = box2(0, length2, -VIEW_HEIGHT, VIEW_HEIGHT);
|
|
22169
22175
|
const clipped = (p) => {
|
|
22170
22176
|
const b = primitiveBounds(p);
|
|
22171
22177
|
return b && (b.minX < x0 - ON_FACE || b.maxX > x1 + ON_FACE) ? { ...p, clip: [...p.clip ?? [], ends] } : p;
|
|
22172
22178
|
};
|
|
22173
22179
|
for (const item of items) item.box = { ...item.box, minX: Math.max(item.box.minX, x0), maxX: Math.min(item.box.maxX, x1) };
|
|
22174
|
-
const floor = { kind: "path", points: [at2(0, 0), at2(
|
|
22180
|
+
const floor = { kind: "path", points: [at2(0, 0), at2(length2, 0)], strokeWidth: FLOOR_WEIGHT };
|
|
22175
22181
|
const dimensions = [];
|
|
22176
22182
|
const ordered = paintOrder(layers);
|
|
22177
22183
|
const layerOf = new Map(ordered.flatMap((layer, i) => layer.prims.map((p) => [p, i])));
|
|
@@ -22182,7 +22188,7 @@ function layout(view, doc, registry3, measure = () => []) {
|
|
|
22182
22188
|
}
|
|
22183
22189
|
const placedItems = items.filter((item) => item.role === "fixed" && !item.hidden);
|
|
22184
22190
|
if (node2.dimensions !== false && placedItems.length > 0) {
|
|
22185
|
-
const stops = [0, ...placedItems.map((item) => along2(applyTransform({ x: 0, y: 0 }, item.node))),
|
|
22191
|
+
const stops = [0, ...placedItems.map((item) => along2(applyTransform({ x: 0, y: 0 }, item.node))), length2].map((s) => Math.round(s)).sort((p, q) => p - q);
|
|
22186
22192
|
const chain = stops.filter((s, i) => i === 0 || s - stops[i - 1] >= 1);
|
|
22187
22193
|
for (let i = 1; i < chain.length; i++) dimensions.push(...measure(at2(chain[i - 1], 0), at2(chain[i], 0), CHAIN_BELOW));
|
|
22188
22194
|
for (const item of placedItems) {
|
|
@@ -22199,9 +22205,9 @@ function carriers(doc, node2) {
|
|
|
22199
22205
|
const face = faceUnder(wall, node2.a, node2.b);
|
|
22200
22206
|
if (!face) return [];
|
|
22201
22207
|
const course = courseOf(wall);
|
|
22202
|
-
const
|
|
22208
|
+
const across2 = faceAcross(wall, face);
|
|
22203
22209
|
const stretch = faceStretch(doc, wall, face);
|
|
22204
|
-
return [{ wall, face, stretch, ends: [course.offset(stretch[0],
|
|
22210
|
+
return [{ wall, face, stretch, ends: [course.offset(stretch[0], across2), course.offset(stretch[1], across2)] }];
|
|
22205
22211
|
});
|
|
22206
22212
|
}
|
|
22207
22213
|
function elevationFollowOps(before, after, changed) {
|
|
@@ -22223,7 +22229,7 @@ function elevationFollowOps(before, after, changed) {
|
|
|
22223
22229
|
if (!on) continue;
|
|
22224
22230
|
const { old, now } = walls.get(on.wall.id);
|
|
22225
22231
|
const [was, is] = [courseOf(old), courseOf(now)];
|
|
22226
|
-
const
|
|
22232
|
+
const across2 = faceAcross(now, on.face);
|
|
22227
22233
|
const still = carriers(after, far);
|
|
22228
22234
|
const stretch = faceStretch(after, now, on.face);
|
|
22229
22235
|
const d = norm(sub(far.b, far.a));
|
|
@@ -22231,7 +22237,7 @@ function elevationFollowOps(before, after, changed) {
|
|
|
22231
22237
|
const s = was.project(p).along;
|
|
22232
22238
|
const atEnd = Math.abs(s - on.stretch[0]) <= ON_FACE ? stretch[0] : Math.abs(s - on.stretch[1]) <= ON_FACE ? stretch[1] : null;
|
|
22233
22239
|
if (atEnd !== null ? still.some(({ ends }) => ends.some((end) => dist(end, p) <= ON_FACE)) : still.some(({ ends }) => (dot(sub(p, ends[0]), d) + ON_FACE) * (dot(sub(p, ends[1]), d) - ON_FACE) <= 0)) return p;
|
|
22234
|
-
const q = is.offset(atEnd ?? followAlong(old, now, s, 0),
|
|
22240
|
+
const q = is.offset(atEnd ?? followAlong(old, now, s, 0), across2);
|
|
22235
22241
|
return { x: tidy(q.x), y: tidy(q.y) };
|
|
22236
22242
|
};
|
|
22237
22243
|
const [a, b] = [follow(far.a), follow(far.b)];
|
|
@@ -22331,7 +22337,7 @@ function quantities(doc, pageId, registry3) {
|
|
|
22331
22337
|
const drawn = apply(map, along2);
|
|
22332
22338
|
const stretch = chord < 1e-9 ? Math.sqrt(Math.abs(det(map))) : Math.hypot(drawn.x, drawn.y) / chord;
|
|
22333
22339
|
const thick = stretch > 0 ? wall.thickness * Math.abs(det(map)) / stretch : wall.thickness;
|
|
22334
|
-
const
|
|
22340
|
+
const length2 = wallLength(wall) * stretch / 1e3;
|
|
22335
22341
|
const height = wall.height ?? storey;
|
|
22336
22342
|
const openings = wallOpenings(doc, wall, registry3);
|
|
22337
22343
|
let cut = 0;
|
|
@@ -22346,13 +22352,13 @@ function quantities(doc, pageId, registry3) {
|
|
|
22346
22352
|
if (seen2) seen2.count++;
|
|
22347
22353
|
else kinds.set(key2, { kind: node2.kind, label: kind?.label ?? node2.kind, width: round(width), height: own2 === null ? null : round(own2), count: 1 });
|
|
22348
22354
|
}
|
|
22349
|
-
const gross = height === null ? null :
|
|
22355
|
+
const gross = height === null ? null : length2 * height / 1e3;
|
|
22350
22356
|
const net = gross === null ? null : Math.max(0, gross - cut);
|
|
22351
22357
|
const material2 = materialName(wall.material);
|
|
22352
22358
|
const thickness = round(thick, 1);
|
|
22353
22359
|
const key = `${materialId(wall.material)} ${thickness}`;
|
|
22354
22360
|
const seen = made.get(key) ?? { material: material2, thickness, length: 0, area: 0, volume: 0, unknown: false };
|
|
22355
|
-
seen.length +=
|
|
22361
|
+
seen.length += length2;
|
|
22356
22362
|
if (net === null) seen.unknown = true;
|
|
22357
22363
|
else {
|
|
22358
22364
|
seen.area += net;
|
|
@@ -22364,10 +22370,10 @@ function quantities(doc, pageId, registry3) {
|
|
|
22364
22370
|
name: wall.name ?? "",
|
|
22365
22371
|
material: material2,
|
|
22366
22372
|
materialId: materialId(wall.material),
|
|
22367
|
-
length: round(
|
|
22373
|
+
length: round(length2),
|
|
22368
22374
|
thickness: round(thick, 1),
|
|
22369
22375
|
height: height === null ? null : round(height / 1e3),
|
|
22370
|
-
footprint: round(
|
|
22376
|
+
footprint: round(length2 * thick / 1e3),
|
|
22371
22377
|
openings: openings.length,
|
|
22372
22378
|
gross: gross === null ? null : round(gross),
|
|
22373
22379
|
cut: gross === null ? null : round(cut),
|
|
@@ -22506,9 +22512,9 @@ function linkPort(doc, registry3, link, side) {
|
|
|
22506
22512
|
return (named2 === void 0 ? void 0 : ports.find((port) => port.key === named2)) ?? ports[0] ?? null;
|
|
22507
22513
|
}
|
|
22508
22514
|
function boxOf(prims) {
|
|
22509
|
-
return prims.reduce((
|
|
22515
|
+
return prims.reduce((box2, prim) => unionBounds(box2, primitiveBounds(prim)), null);
|
|
22510
22516
|
}
|
|
22511
|
-
var inside2 = (p,
|
|
22517
|
+
var inside2 = (p, box2) => p.x > box2.minX && p.x < box2.maxX && p.y > box2.minY && p.y < box2.maxY;
|
|
22512
22518
|
var middles = /* @__PURE__ */ new WeakMap();
|
|
22513
22519
|
function middleOf(doc, root) {
|
|
22514
22520
|
let known = middles.get(doc.nodes);
|
|
@@ -22535,7 +22541,7 @@ function linkEnds(doc, link, drawn) {
|
|
|
22535
22541
|
if (ends.some((end) => !isVisible(doc, end) || rootOf(doc, end.parent) !== root)) return null;
|
|
22536
22542
|
const [first, second] = ends.map((end) => boxOf(drawn(end)));
|
|
22537
22543
|
if (!first || !second) return null;
|
|
22538
|
-
const middle = (
|
|
22544
|
+
const middle = (box2) => ({ x: (box2.minX + box2.maxX) / 2, y: (box2.minY + box2.maxY) / 2 });
|
|
22539
22545
|
return { boxes: [first, second], a: middle(first), b: middle(second) };
|
|
22540
22546
|
}
|
|
22541
22547
|
var leftOf = (a, b) => {
|
|
@@ -22546,10 +22552,10 @@ function linkPath(doc, link, drawn) {
|
|
|
22546
22552
|
const ends = linkEnds(doc, link, drawn);
|
|
22547
22553
|
if (!ends) return null;
|
|
22548
22554
|
const { boxes, a, b } = ends;
|
|
22549
|
-
const
|
|
22550
|
-
if (
|
|
22555
|
+
const length2 = dist(a, b);
|
|
22556
|
+
if (length2 < 1e-6) return null;
|
|
22551
22557
|
const bend = linkBend(doc, link, a, b);
|
|
22552
|
-
const pull = add(mid(a, b), scale(leftOf(a, b), bend *
|
|
22558
|
+
const pull = add(mid(a, b), scale(leftOf(a, b), bend * length2));
|
|
22553
22559
|
const points = Array.from({ length: LINK_STEPS + 1 }, (_, i) => {
|
|
22554
22560
|
const t = i / LINK_STEPS;
|
|
22555
22561
|
const [p, q, r] = [(1 - t) * (1 - t), 2 * (1 - t) * t, t * t];
|
|
@@ -22572,11 +22578,11 @@ function bendThrough(doc, link, p, drawn) {
|
|
|
22572
22578
|
const ends = linkEnds(doc, link, drawn);
|
|
22573
22579
|
if (!ends) return null;
|
|
22574
22580
|
const { a, b } = ends;
|
|
22575
|
-
const
|
|
22576
|
-
if (
|
|
22581
|
+
const length2 = dist(a, b);
|
|
22582
|
+
if (length2 < 1e-6) return null;
|
|
22577
22583
|
const left = leftOf(a, b);
|
|
22578
22584
|
const off = sub(p, mid(a, b));
|
|
22579
|
-
return Math.round(2 * (off.x * left.x + off.y * left.y) /
|
|
22585
|
+
return Math.round(2 * (off.x * left.x + off.y * left.y) / length2 * 1e3) / 1e3;
|
|
22580
22586
|
}
|
|
22581
22587
|
function linkPrimitives(doc, link, drawn) {
|
|
22582
22588
|
const points = linkPath(doc, link, drawn);
|
|
@@ -22843,13 +22849,13 @@ function tablePrimitives(node2, doc, registry3, symbol) {
|
|
|
22843
22849
|
return out;
|
|
22844
22850
|
}
|
|
22845
22851
|
function fitted(prims, x, y, width, height) {
|
|
22846
|
-
const
|
|
22847
|
-
if (!
|
|
22848
|
-
const w =
|
|
22849
|
-
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;
|
|
22850
22856
|
const scale2 = Math.min(w > 0 ? width / w : Infinity, h > 0 ? height / h : Infinity);
|
|
22851
22857
|
if (!Number.isFinite(scale2) || scale2 <= 0) return [];
|
|
22852
|
-
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 };
|
|
22853
22859
|
return prims.map((p) => ({ ...transformPrimitive(p, at2), own: true }));
|
|
22854
22860
|
}
|
|
22855
22861
|
|
|
@@ -22861,10 +22867,10 @@ var DIVIDER_INK = "#8b9099";
|
|
|
22861
22867
|
var VIEW_LINE_ARROW = 500;
|
|
22862
22868
|
var VIEW_LINE_HEAD = 180;
|
|
22863
22869
|
function viewLinePrimitives(node2) {
|
|
22864
|
-
const
|
|
22870
|
+
const length2 = Math.hypot(node2.b.x - node2.a.x, node2.b.y - node2.a.y);
|
|
22865
22871
|
const line2 = { kind: "path", points: [node2.a, node2.b], dash: [14, 4, 2, 4], own: true };
|
|
22866
|
-
if (
|
|
22867
|
-
const d = { x: (node2.b.x - node2.a.x) /
|
|
22872
|
+
if (length2 < 1e-6) return [line2];
|
|
22873
|
+
const d = { x: (node2.b.x - node2.a.x) / length2, y: (node2.b.y - node2.a.y) / length2 };
|
|
22868
22874
|
const look = { x: d.y, y: -d.x };
|
|
22869
22875
|
const head = VIEW_LINE_HEAD;
|
|
22870
22876
|
return [
|
|
@@ -22927,11 +22933,11 @@ function symbolPrimitives(object3, ctx) {
|
|
|
22927
22933
|
const node2 = object3.kind === "component" ? { ...base2, type: "instance", component: object3.id } : { ...base2, type: "parametric", kind: object3.id, props: object3.props ?? {} };
|
|
22928
22934
|
return nodePrimitives(node2, { ...ctx, depth: ctx.depth + 1 });
|
|
22929
22935
|
}
|
|
22930
|
-
function dimensionLabel(node2,
|
|
22936
|
+
function dimensionLabel(node2, length2, drawing = {}) {
|
|
22931
22937
|
if (node2.text) return node2.text;
|
|
22932
22938
|
const unit = node2.unit ?? "mm";
|
|
22933
|
-
if (unit === "ft-in") return formatFeetInches(
|
|
22934
|
-
const value = (
|
|
22939
|
+
if (unit === "ft-in") return formatFeetInches(length2, node2.fraction ?? 16);
|
|
22940
|
+
const value = (length2 / { mm: 1, cm: 10, m: 1e3, in: 25.4, ft: 304.8 }[unit]).toFixed(node2.decimals ?? { mm: 0, cm: 1, m: 2, in: 1, ft: 2 }[unit]).replace(".", node2.decimal ?? drawing.decimal ?? ".");
|
|
22935
22941
|
return node2.showUnit ? `${value} ${unit}` : value;
|
|
22936
22942
|
}
|
|
22937
22943
|
function roomArea(node2, area, drawing = {}) {
|
|
@@ -22946,9 +22952,9 @@ function heightLabel(node2, own2, ctx) {
|
|
|
22946
22952
|
const mount = node2.showHeight ? mountOf(node2, ctx.registry) : null;
|
|
22947
22953
|
const z = mount?.on === "wall" ? heightAboveFloor(node2, ctx.registry) : null;
|
|
22948
22954
|
if (!mount || z === null) return [];
|
|
22949
|
-
const
|
|
22955
|
+
const box2 = own2.map(primitiveBounds).reduce((all, one) => unionBounds(all, one), null);
|
|
22950
22956
|
const up = mount.out === "up";
|
|
22951
|
-
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 };
|
|
22952
22958
|
const at2 = applyTransform(local, node2);
|
|
22953
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" }];
|
|
22954
22960
|
}
|
|
@@ -22974,6 +22980,19 @@ function dimensionMarker(type, at2, out, along2, size, style) {
|
|
|
22974
22980
|
return [];
|
|
22975
22981
|
}
|
|
22976
22982
|
}
|
|
22983
|
+
var TITLE_CAPTIONS = {
|
|
22984
|
+
project: "Project",
|
|
22985
|
+
client: "Client",
|
|
22986
|
+
address: "Address",
|
|
22987
|
+
sheet: "Sheet title",
|
|
22988
|
+
page: "Page",
|
|
22989
|
+
author: "Drawn by",
|
|
22990
|
+
scale: "Scale",
|
|
22991
|
+
format: "Format",
|
|
22992
|
+
date: "Date",
|
|
22993
|
+
number: "Sheet no.",
|
|
22994
|
+
revisions: "Revisions"
|
|
22995
|
+
};
|
|
22977
22996
|
var TITLE_HIDDEN = ["page"];
|
|
22978
22997
|
var titleBlockHidden = (node2) => node2.titleBlock?.hide ?? TITLE_HIDDEN;
|
|
22979
22998
|
function titleBlockValues(node2, doc) {
|
|
@@ -22992,7 +23011,8 @@ function titleBlockValues(node2, doc) {
|
|
|
22992
23011
|
scale: `1:${s}`,
|
|
22993
23012
|
format: paperFormat(node2)?.name ?? `${Math.round(node2.width / s)} \xD7 ${Math.round(node2.height / s)}`,
|
|
22994
23013
|
date: fill(block.date),
|
|
22995
|
-
number: fill(block.number)
|
|
23014
|
+
number: fill(block.number),
|
|
23015
|
+
revisions: fill(block.revisions)
|
|
22996
23016
|
};
|
|
22997
23017
|
}
|
|
22998
23018
|
function titleBlock(node2, doc) {
|
|
@@ -23026,6 +23046,7 @@ function titleBlock(node2, doc) {
|
|
|
23026
23046
|
].filter(([field]) => shown(field) !== "");
|
|
23027
23047
|
const cellsHeight = cells.length > 0 ? 9 : 0;
|
|
23028
23048
|
const frame = { kind: "path", closed: true, ...ink, strokeWidth: 1.2, points: boxCorners({ x: node2.x + margin, y: node2.y + margin, width: node2.width - 2 * margin, height: node2.height - 2 * margin }) };
|
|
23049
|
+
if (doc.settings?.titleBlock?.layout === "strip") return [frame, ...titleStrip(node2, shown, doc.settings.titleBlock.labels ?? {}, { ink, line: line2, words })];
|
|
23029
23050
|
const height = (headingHeight + namesHeight + cellsHeight) * s;
|
|
23030
23051
|
if (height === 0) return [frame];
|
|
23031
23052
|
const top = bottom - height;
|
|
@@ -23058,6 +23079,64 @@ function titleBlock(node2, doc) {
|
|
|
23058
23079
|
}
|
|
23059
23080
|
return out;
|
|
23060
23081
|
}
|
|
23082
|
+
var MAX_REVISIONS = 20;
|
|
23083
|
+
function titleStrip(node2, shown, labels, draw) {
|
|
23084
|
+
const s = node2.scale ?? DEFAULT_PAPER_SCALE;
|
|
23085
|
+
const [width, margin, pad] = [70, 10, 3];
|
|
23086
|
+
const room = width - 2 * pad;
|
|
23087
|
+
const left = node2.x + node2.width - (margin + width) * s;
|
|
23088
|
+
const [top, bottom] = [node2.y + margin * s, node2.y + node2.height - margin * s];
|
|
23089
|
+
const caption = (field, y2) => {
|
|
23090
|
+
const text2 = (labels[field] ?? TITLE_CAPTIONS[field]).trim();
|
|
23091
|
+
return text2 ? [draw.words(text2, left + pad * s, y2 + 3.5 * s, 2, room)] : [];
|
|
23092
|
+
};
|
|
23093
|
+
const cell = (field, size = 3, bold = false) => {
|
|
23094
|
+
const lines = shown(field).split("\n").map((part) => part.trim()).filter(Boolean);
|
|
23095
|
+
if (lines.length === 0) return [];
|
|
23096
|
+
const step = size * 1.5;
|
|
23097
|
+
return [
|
|
23098
|
+
{
|
|
23099
|
+
height: 7 + size + (lines.length - 1) * step,
|
|
23100
|
+
draw: (y2) => [...caption(field, y2), ...lines.map((text2, i) => draw.words(text2, left + pad * s, y2 + (4.5 + size + i * step) * s, size, room, { bold }))]
|
|
23101
|
+
}
|
|
23102
|
+
];
|
|
23103
|
+
};
|
|
23104
|
+
const revisions = (rows) => {
|
|
23105
|
+
if (rows.length === 0) return [];
|
|
23106
|
+
const starts = [0, 8, 26, width];
|
|
23107
|
+
const row = (text2, rowTop) => {
|
|
23108
|
+
const parts = text2.split("|").map((part) => part.trim());
|
|
23109
|
+
const cells = parts.length === 1 ? ["", "", parts[0]] : [parts[0], parts[1], parts.slice(2).join(" | ")];
|
|
23110
|
+
const out2 = [draw.line(left, rowTop, left + width * s, rowTop), draw.line(left + 8 * s, rowTop, left + 8 * s, rowTop + 5 * s), draw.line(left + 26 * s, rowTop, left + 26 * s, rowTop + 5 * s)];
|
|
23111
|
+
cells.forEach((words, i) => words && out2.push(draw.words(words, left + (starts[i] + 1.5) * s, rowTop + 3.7 * s, 2.5, starts[i + 1] - starts[i] - 3)));
|
|
23112
|
+
return out2;
|
|
23113
|
+
};
|
|
23114
|
+
return [{ height: 5 + rows.length * 5, draw: (y2) => [...caption("revisions", y2), ...rows.flatMap((text2, i) => row(text2, y2 + (5 + i * 5) * s))] }];
|
|
23115
|
+
};
|
|
23116
|
+
const below = [...cell("sheet", 4, true), ...cell("page"), ...cell("scale"), ...cell("format"), ...cell("number", 9, true)];
|
|
23117
|
+
const head = [...cell("project", 4.5, true), ...cell("client"), ...cell("address")];
|
|
23118
|
+
const signed = [...cell("author"), ...cell("date")];
|
|
23119
|
+
const sum = (cells) => cells.reduce((total, one) => total + one.height, 0);
|
|
23120
|
+
const free = (bottom - top) / s - sum(head) - sum(signed) - sum(below);
|
|
23121
|
+
if (free < 0) return [];
|
|
23122
|
+
const listed2 = shown("revisions").split("\n").map((row) => row.trim()).filter(Boolean);
|
|
23123
|
+
const above = [...head, ...revisions(listed2.slice(0, Math.max(0, Math.min(MAX_REVISIONS, Math.floor((free - 5) / 5))))), ...signed];
|
|
23124
|
+
if (above.length + below.length === 0) return [];
|
|
23125
|
+
const out = [{ kind: "path", closed: true, ...draw.ink, strokeWidth: 1.2, points: boxCorners({ x: left, y: top, width: width * s, height: bottom - top }) }];
|
|
23126
|
+
let y = top;
|
|
23127
|
+
above.forEach((one, i) => {
|
|
23128
|
+
if (i > 0) out.push(draw.line(left, y, left + width * s, y));
|
|
23129
|
+
out.push(...one.draw(y));
|
|
23130
|
+
y += one.height * s;
|
|
23131
|
+
});
|
|
23132
|
+
if (above.length > 0) out.push(draw.line(left, y, left + width * s, y));
|
|
23133
|
+
y = bottom - sum(below) * s;
|
|
23134
|
+
for (const one of below) {
|
|
23135
|
+
out.push(draw.line(left, y, left + width * s, y), ...one.draw(y));
|
|
23136
|
+
y += one.height * s;
|
|
23137
|
+
}
|
|
23138
|
+
return out;
|
|
23139
|
+
}
|
|
23061
23140
|
function sheetContent(node2, ctx) {
|
|
23062
23141
|
const component = node2.plain ? void 0 : sheetContentOf(ctx.doc);
|
|
23063
23142
|
if (!component?.sheet || ctx.depth >= MAX_INSTANCE_DEPTH || rootOf(ctx.doc, node2.parent)?.id === component.id) return [];
|
|
@@ -23094,14 +23173,14 @@ function arcOf(node2) {
|
|
|
23094
23173
|
return node2.from === void 0 && node2.to === void 0 ? null : { from: node2.from ?? 0, to: node2.to ?? 360 };
|
|
23095
23174
|
}
|
|
23096
23175
|
function annotationCurve(node2) {
|
|
23097
|
-
const
|
|
23176
|
+
const length2 = dist(node2.a, node2.b);
|
|
23098
23177
|
const bend = node2.bend ?? ANNOTATION_BEND;
|
|
23099
23178
|
if (node2.shape === "elbow") {
|
|
23100
23179
|
const corner = { x: node2.a.x, y: node2.b.y };
|
|
23101
23180
|
return dist(corner, node2.a) < 1e-6 || dist(corner, node2.b) < 1e-6 ? [node2.a, node2.b] : [node2.a, corner, node2.b];
|
|
23102
23181
|
}
|
|
23103
|
-
if (
|
|
23104
|
-
const control = add(mid(node2.a, node2.b), scale(perp(norm(sub(node2.b, node2.a))), bend *
|
|
23182
|
+
if (length2 < 1e-6 || Math.abs(bend) < 1e-6 || node2.shape === "straight") return [node2.a, node2.b];
|
|
23183
|
+
const control = add(mid(node2.a, node2.b), scale(perp(norm(sub(node2.b, node2.a))), bend * length2));
|
|
23105
23184
|
return Array.from({ length: 21 }, (_, i) => {
|
|
23106
23185
|
const t = i / 20;
|
|
23107
23186
|
const [p, q, r] = [(1 - t) ** 2, 2 * t * (1 - t), t ** 2];
|
|
@@ -23114,15 +23193,15 @@ function annotationText(node2) {
|
|
|
23114
23193
|
return { x: node2.b.x + (right ? -1 : 1) * size * 0.3, y: node2.b.y + size * 0.35, size, right };
|
|
23115
23194
|
}
|
|
23116
23195
|
function annotationPrimitives(node2, ctx) {
|
|
23117
|
-
const
|
|
23196
|
+
const curve2 = annotationCurve(node2);
|
|
23118
23197
|
const words = annotationText(node2);
|
|
23119
23198
|
const text2 = textLines(said(node2.text, node2.parent, ctx), words, words.size, { align: words.right ? "right" : "left", font: node2.font });
|
|
23120
|
-
if (
|
|
23199
|
+
if (curve2.length < 2 || dist(node2.a, node2.b) < 1e-6) return text2;
|
|
23121
23200
|
const markerSize3 = node2.markerSize ?? words.size * 0.75;
|
|
23122
|
-
const atTip = norm(sub(
|
|
23123
|
-
const atText = norm(sub(
|
|
23201
|
+
const atTip = norm(sub(curve2[0], curve2[1]));
|
|
23202
|
+
const atText = norm(sub(curve2[curve2.length - 1], curve2[curve2.length - 2]));
|
|
23124
23203
|
return [
|
|
23125
|
-
{ kind: "path", points:
|
|
23204
|
+
{ kind: "path", points: curve2 },
|
|
23126
23205
|
...dimensionMarker(node2.startMarker ?? "arrow", node2.a, atTip, atTip, markerSize3, {}),
|
|
23127
23206
|
...dimensionMarker(node2.endMarker ?? "none", node2.b, atText, atText, markerSize3, {}),
|
|
23128
23207
|
...text2
|
|
@@ -23159,8 +23238,8 @@ function gridlinePrimitives(node2) {
|
|
|
23159
23238
|
];
|
|
23160
23239
|
}
|
|
23161
23240
|
function dimensionPrimitives(node2, drawing) {
|
|
23162
|
-
const
|
|
23163
|
-
if (
|
|
23241
|
+
const length2 = dist(node2.a, node2.b);
|
|
23242
|
+
if (length2 < 1e-6) return [];
|
|
23164
23243
|
const size = node2.size ?? DIMENSION_TEXT_SIZE;
|
|
23165
23244
|
const dir = norm(sub(node2.b, node2.a));
|
|
23166
23245
|
const n3 = perp(dir);
|
|
@@ -23178,7 +23257,7 @@ function dimensionPrimitives(node2, drawing) {
|
|
|
23178
23257
|
};
|
|
23179
23258
|
const gap = scale(n3, side * (node2.extensionGap ?? 0));
|
|
23180
23259
|
const overshoot = scale(n3, side * size * 0.4);
|
|
23181
|
-
const label = dimensionLabel(node2,
|
|
23260
|
+
const label = dimensionLabel(node2, length2, drawing);
|
|
23182
23261
|
const width = label.length * size * 0.55;
|
|
23183
23262
|
const position = node2.textPosition ?? "above";
|
|
23184
23263
|
let angle = 0;
|
|
@@ -23199,7 +23278,7 @@ function dimensionPrimitives(node2, drawing) {
|
|
|
23199
23278
|
anchor2 = add(middle, scale(rotate({ x: 0, y: -1 }, angle), lift));
|
|
23200
23279
|
cover = width / 2 + size * 0.3;
|
|
23201
23280
|
}
|
|
23202
|
-
const broken = position === "center" &&
|
|
23281
|
+
const broken = position === "center" && length2 > 2 * cover;
|
|
23203
23282
|
const lines = broken ? [[a, sub(middle, scale(dir, cover))], [add(middle, scale(dir, cover)), b]] : [[a, b]];
|
|
23204
23283
|
const markerSize3 = node2.markerSize ?? DIMENSION_MARKER_SIZE;
|
|
23205
23284
|
return [
|
|
@@ -23432,16 +23511,16 @@ var KINDS = {
|
|
|
23432
23511
|
move: moveAB,
|
|
23433
23512
|
// The two ends, and the middle of the leader, which is dragged to bend it.
|
|
23434
23513
|
handles: (node2) => {
|
|
23435
|
-
const
|
|
23436
|
-
return (node2.shape ?? "curve") === "curve" ? [node2.a, node2.b,
|
|
23514
|
+
const curve2 = annotationCurve(node2);
|
|
23515
|
+
return (node2.shape ?? "curve") === "curve" ? [node2.a, node2.b, curve2[Math.floor(curve2.length / 2)]] : [node2.a, node2.b];
|
|
23437
23516
|
},
|
|
23438
23517
|
moveHandle: (node2, index, p) => {
|
|
23439
23518
|
if (index < 2) return moveHandleAB(node2, index, p);
|
|
23440
|
-
const
|
|
23441
|
-
if (
|
|
23519
|
+
const length2 = dist(node2.a, node2.b);
|
|
23520
|
+
if (length2 < 1e-6) return {};
|
|
23442
23521
|
const off = sub(p, mid(node2.a, node2.b));
|
|
23443
|
-
const
|
|
23444
|
-
return { bend: Math.round(2 * (off.x *
|
|
23522
|
+
const across2 = perp(norm(sub(node2.b, node2.a)));
|
|
23523
|
+
return { bend: Math.round(2 * (off.x * across2.x + off.y * across2.y) / length2 * 1e3) / 1e3 };
|
|
23445
23524
|
},
|
|
23446
23525
|
snapPoints: (node2) => [node2.a, node2.b],
|
|
23447
23526
|
// A leader points at things; it is not one of them.
|
|
@@ -23678,15 +23757,15 @@ function massOf(shapes) {
|
|
|
23678
23757
|
return { shapes: kept, bounds, cells };
|
|
23679
23758
|
}
|
|
23680
23759
|
function near(mass, a, b, margin) {
|
|
23681
|
-
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 };
|
|
23682
23761
|
const found = /* @__PURE__ */ new Set();
|
|
23683
|
-
for (const key of cellsOf(
|
|
23684
|
-
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]);
|
|
23685
23764
|
}
|
|
23686
23765
|
function runsAlong(shape, p, q) {
|
|
23687
|
-
const
|
|
23688
|
-
if (
|
|
23689
|
-
const u = { x: (q.x - p.x) /
|
|
23766
|
+
const length2 = Math.hypot(q.x - p.x, q.y - p.y);
|
|
23767
|
+
if (length2 < 1e-9) return false;
|
|
23768
|
+
const u = { x: (q.x - p.x) / length2, y: (q.y - p.y) / length2 };
|
|
23690
23769
|
const middle = { x: (p.x + q.x) / 2, y: (p.y + q.y) / 2 };
|
|
23691
23770
|
return shape.some((c, i) => {
|
|
23692
23771
|
const e = shape[(i + 1) % shape.length];
|
|
@@ -23697,14 +23776,14 @@ function runsAlong(shape, p, q) {
|
|
|
23697
23776
|
}
|
|
23698
23777
|
function outsideMass(mass, a, b, of) {
|
|
23699
23778
|
const d = { x: b.x - a.x, y: b.y - a.y };
|
|
23700
|
-
const
|
|
23701
|
-
if (
|
|
23779
|
+
const length2 = Math.hypot(d.x, d.y);
|
|
23780
|
+
if (length2 < 1e-9) return [];
|
|
23702
23781
|
const shapes = near(mass, a, b, 2 * ASIDE);
|
|
23703
23782
|
const cuts = [0, 1];
|
|
23704
23783
|
for (const { points: other } of shapes) {
|
|
23705
23784
|
other.forEach((c, i) => {
|
|
23706
23785
|
const e = other[(i + 1) % other.length];
|
|
23707
|
-
const along2 = ((c.x - a.x) * d.x + (c.y - a.y) * d.y) / (
|
|
23786
|
+
const along2 = ((c.x - a.x) * d.x + (c.y - a.y) * d.y) / (length2 * length2);
|
|
23708
23787
|
if (along2 > 0 && along2 < 1 && distToSegment(c, a, b) < NEAR) cuts.push(along2);
|
|
23709
23788
|
const cross2 = d.x * (e.y - c.y) - d.y * (e.x - c.x);
|
|
23710
23789
|
if (Math.abs(cross2) < 1e-9) return;
|
|
@@ -23715,10 +23794,10 @@ function outsideMass(mass, a, b, of) {
|
|
|
23715
23794
|
}
|
|
23716
23795
|
cuts.sort((x, y) => x - y);
|
|
23717
23796
|
const at2 = (t) => ({ x: a.x + d.x * t, y: a.y + d.y * t });
|
|
23718
|
-
const aside = { x: -d.y /
|
|
23797
|
+
const aside = { x: -d.y / length2 * ASIDE, y: d.x / length2 * ASIDE };
|
|
23719
23798
|
const parts = [];
|
|
23720
23799
|
for (let i = 0; i + 1 < cuts.length; i++) {
|
|
23721
|
-
if ((cuts[i + 1] - cuts[i]) *
|
|
23800
|
+
if ((cuts[i + 1] - cuts[i]) * length2 < NEAR) continue;
|
|
23722
23801
|
const middle = at2((cuts[i] + cuts[i + 1]) / 2);
|
|
23723
23802
|
const hides = (other) => !of || other.key === of.key || other.rank >= of.rank || runsAlong(other.points, at2(cuts[i]), at2(cuts[i + 1]));
|
|
23724
23803
|
const walled = (q) => shapes.some((other) => pointInPolygon(q, other.points) && hides(other));
|
|
@@ -23778,12 +23857,31 @@ function mergedOutlines(merged) {
|
|
|
23778
23857
|
}
|
|
23779
23858
|
|
|
23780
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
|
+
}
|
|
23781
23882
|
function buildScene(doc, containerId, registry3) {
|
|
23782
23883
|
const ctx = { doc, registry: registry3, depth: 0 };
|
|
23783
|
-
const items = childrenOf(doc, containerId).filter((node2) => isVisible(doc, node2)).map((node2) =>
|
|
23784
|
-
const prims = nodePrimitives(node2, ctx);
|
|
23785
|
-
return { id: node2.id, node: node2, prims, bounds: boundsOf(prims), locked: isLocked(doc, node2) };
|
|
23786
|
-
});
|
|
23884
|
+
const items = childrenOf(doc, containerId).filter((node2) => isVisible(doc, node2)).map((node2) => itemOf(node2, doc, registry3, nodePrimitives(node2, ctx)));
|
|
23787
23885
|
const sheet = templateSheet(doc, containerId);
|
|
23788
23886
|
return sheet ? [sheet, ...items] : items;
|
|
23789
23887
|
}
|
|
@@ -23874,18 +23972,18 @@ function backOf(node2, mount) {
|
|
|
23874
23972
|
var faceAcross = (wall, face) => face === "right" ? wallSides(wall).right : -wallSides(wall).left;
|
|
23875
23973
|
function faceStretch(doc, wall, face) {
|
|
23876
23974
|
const course = courseOf(wall);
|
|
23877
|
-
const
|
|
23878
|
-
const on = wallOutline(wall, doc).map((p) => course.project(p)).filter((p) => Math.abs(p.across -
|
|
23975
|
+
const across2 = faceAcross(wall, face);
|
|
23976
|
+
const on = wallOutline(wall, doc).map((p) => course.project(p)).filter((p) => Math.abs(p.across - across2) <= 0.5).map((p) => p.along);
|
|
23879
23977
|
return on.length >= 2 ? [Math.min(...on), Math.max(...on)] : [0, course.length];
|
|
23880
23978
|
}
|
|
23881
23979
|
function onFace(wall, back) {
|
|
23882
23980
|
const course = courseOf(wall);
|
|
23883
|
-
const { along: along2, across } = course.project(back.at);
|
|
23981
|
+
const { along: along2, across: across2 } = course.project(back.at);
|
|
23884
23982
|
if (along2 < -ON_FACE2 || along2 > course.length + ON_FACE2) return null;
|
|
23885
23983
|
const d = course.dir(Math.max(0, Math.min(course.length, along2)));
|
|
23886
23984
|
if (Math.abs(cross(d, back.along)) > ALONG_FACE) return null;
|
|
23887
23985
|
const face = cross(d, back.out) > 0 ? "right" : "left";
|
|
23888
|
-
return Math.abs(
|
|
23986
|
+
return Math.abs(across2 - faceAcross(wall, face)) <= ON_FACE2 ? { wall, face, along: along2 } : null;
|
|
23889
23987
|
}
|
|
23890
23988
|
function mountedOn(doc, node2, registry3) {
|
|
23891
23989
|
const mount = mountOf(node2, registry3);
|
|
@@ -23972,8 +24070,8 @@ function putBack(node2, old, now, registry3) {
|
|
|
23972
24070
|
if (!opening) return null;
|
|
23973
24071
|
const [was, is] = [courseOf(old), courseOf(now)];
|
|
23974
24072
|
const middle = applyTransform({ x: (opening.from + opening.to) / 2, y: 0 }, node2);
|
|
23975
|
-
const { along: along2, across } = was.project(middle);
|
|
23976
|
-
const off =
|
|
24073
|
+
const { along: along2, across: across2 } = was.project(middle);
|
|
24074
|
+
const off = across2 - middleAcross(old);
|
|
23977
24075
|
const s = followAlong(old, now, along2, Math.abs(opening.to - opening.from) / 2);
|
|
23978
24076
|
const rotation2 = (((node2.rotation ?? 0) + angleOf(is.dir(0)) - angleOf(was.dir(0))) % 360 + 360) % 360;
|
|
23979
24077
|
const centre = is.offset(s, middleAcross(now) + off);
|
|
@@ -24032,9 +24130,9 @@ function materialSeams(doc, wall, registry3) {
|
|
|
24032
24130
|
const seams = [];
|
|
24033
24131
|
for (const [p, q] of edges(wallPolygons(wall, doc, registry3))) {
|
|
24034
24132
|
const d = { x: q.x - p.x, y: q.y - p.y };
|
|
24035
|
-
const
|
|
24036
|
-
if (
|
|
24037
|
-
const u = { x: d.x /
|
|
24133
|
+
const length2 = Math.hypot(d.x, d.y);
|
|
24134
|
+
if (length2 < SHORT) continue;
|
|
24135
|
+
const u = { x: d.x / length2, y: d.y / length2 };
|
|
24038
24136
|
const off = (r) => cross(u, { x: r.x - p.x, y: r.y - p.y });
|
|
24039
24137
|
const at2 = (r) => (r.x - p.x) * u.x + (r.y - p.y) * u.y;
|
|
24040
24138
|
for (const [r, s] of theirs) {
|
|
@@ -24042,7 +24140,7 @@ function materialSeams(doc, wall, registry3) {
|
|
|
24042
24140
|
if (theirLength < SHORT || Math.abs(off(r)) > TOUCH || Math.abs(off(s)) > TOUCH || (s.x - r.x) * u.x + (s.y - r.y) * u.y >= 0) continue;
|
|
24043
24141
|
if (Math.abs(cross(u, { x: (s.x - r.x) / theirLength, y: (s.y - r.y) / theirLength })) > SKEW) continue;
|
|
24044
24142
|
const from = Math.max(0, Math.min(at2(r), at2(s)));
|
|
24045
|
-
const to = Math.min(
|
|
24143
|
+
const to = Math.min(length2, Math.max(at2(r), at2(s)));
|
|
24046
24144
|
if (to - from > SHORT) seams.push([{ x: p.x + u.x * from, y: p.y + u.y * from }, { x: p.x + u.x * to, y: p.y + u.y * to }]);
|
|
24047
24145
|
}
|
|
24048
24146
|
}
|
|
@@ -24062,11 +24160,11 @@ var material = (wall) => wall.material ?? "";
|
|
|
24062
24160
|
function sharedThickness(wall, other) {
|
|
24063
24161
|
const course = courseOf(wall);
|
|
24064
24162
|
const { left, right } = wallSides(wall);
|
|
24065
|
-
const { across } = course.project(other.a);
|
|
24163
|
+
const { across: across2 } = course.project(other.a);
|
|
24066
24164
|
const theirs = wallSides(other);
|
|
24067
24165
|
const opposite = dot(course.dir(0), courseOf(other).dir(0)) < 0;
|
|
24068
24166
|
const [before, after] = opposite ? [theirs.right, theirs.left] : [theirs.left, theirs.right];
|
|
24069
|
-
return Math.min(right,
|
|
24167
|
+
return Math.min(right, across2 + after) - Math.max(-left, across2 - before);
|
|
24070
24168
|
}
|
|
24071
24169
|
function aheadOf(from, way, wall) {
|
|
24072
24170
|
for (let t = 0; t <= WALL_GAP; t += LOOK_STEP) if (wallContains(wall, add(from, scale(way, t)))) return t;
|
|
@@ -24079,8 +24177,8 @@ function gapAt(doc, wall, end) {
|
|
|
24079
24177
|
const { left, right } = wallSides(wall);
|
|
24080
24178
|
const from = course.offset(at2, middleAcross(wall));
|
|
24081
24179
|
const others = wallsOver(wallIndex(doc, wall.parent), from, WALL_GAP + wall.thickness).filter((other2) => other2.id !== wall.id);
|
|
24082
|
-
const
|
|
24083
|
-
if (others.some((other2) =>
|
|
24180
|
+
const across2 = [from, wall[end], course.offset(at2, -left), course.offset(at2, right)];
|
|
24181
|
+
if (others.some((other2) => across2.some((p) => distToBody(p, other2) < GAP))) return null;
|
|
24084
24182
|
const way = scale(course.dir(at2), end === "a" ? -1 : 1);
|
|
24085
24183
|
const stopped = others.filter((other2) => {
|
|
24086
24184
|
if (aheadOf(from, way, other2) !== null) return true;
|
|
@@ -24292,13 +24390,27 @@ var OpSchema = discriminatedUnion("op", [
|
|
|
24292
24390
|
op: literal("set_document"),
|
|
24293
24391
|
name: string2().optional(),
|
|
24294
24392
|
info: record(string2(), string2().nullable()).optional(),
|
|
24295
|
-
settings: object({
|
|
24393
|
+
settings: object({
|
|
24394
|
+
system: _enum(["metric", "imperial"]).nullable().optional(),
|
|
24395
|
+
decimal: _enum([".", ","]).nullable().optional(),
|
|
24396
|
+
titleBlock: object({ layout: _enum(["corner", "strip"]).optional(), labels: record(string2(), string2()).optional() }).nullable().optional()
|
|
24397
|
+
}).optional()
|
|
24296
24398
|
}).describe(
|
|
24297
|
-
'Renames the document and/or changes what it says about itself ("info": project, client, address, author), shown in title blocks, and/or how it writes its numbers ("settings": system, decimal). In "info" and "settings" each key replaces that entry and a null or empty value removes it.'
|
|
24399
|
+
'Renames the document and/or changes what it says about itself ("info": project, client, address, author), shown in title blocks, and/or how it writes its numbers and lays out its title blocks ("settings": system, decimal, titleBlock). In "info" and "settings" each key replaces that entry and a null or empty value removes it.'
|
|
24298
24400
|
)
|
|
24299
24401
|
]);
|
|
24300
24402
|
var OpError = class extends Error {
|
|
24301
24403
|
};
|
|
24404
|
+
function titleLayout(value) {
|
|
24405
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) throw new OpError('The setting "titleBlock" is an object with "layout" and "labels".');
|
|
24406
|
+
const { layout: layout2, labels, ...rest } = value;
|
|
24407
|
+
const unknown2 = Object.keys(rest)[0];
|
|
24408
|
+
if (unknown2 !== void 0) throw new OpError(`Unknown title block setting "${unknown2}". Use layout or labels.`);
|
|
24409
|
+
if (layout2 !== void 0 && layout2 !== "corner" && layout2 !== "strip") throw new OpError(`The title block's layout is "corner" or "strip", not "${String(layout2)}".`);
|
|
24410
|
+
if (labels !== void 0 && (typeof labels !== "object" || labels === null || Array.isArray(labels) || Object.values(labels).some((text2) => typeof text2 !== "string")))
|
|
24411
|
+
throw new OpError(`The title block's labels are texts by entry, such as { "project": "Project" }.`);
|
|
24412
|
+
return { ...layout2 !== void 0 ? { layout: layout2 } : {}, ...labels !== void 0 ? { labels } : {} };
|
|
24413
|
+
}
|
|
24302
24414
|
function parseOps(json) {
|
|
24303
24415
|
const result = array(OpSchema).safeParse(json);
|
|
24304
24416
|
if (!result.success) throw new OpError(`Invalid operations:
|
|
@@ -24592,10 +24704,16 @@ function applyOp(d, op, batch) {
|
|
|
24592
24704
|
if (op.settings) {
|
|
24593
24705
|
const settings = { ...d.settings };
|
|
24594
24706
|
for (const [key, value] of Object.entries(op.settings)) {
|
|
24707
|
+
if (key === "titleBlock") {
|
|
24708
|
+
const block = value === null || value === void 0 ? {} : titleLayout(value);
|
|
24709
|
+
if (Object.keys(block).length > 0) settings[key] = block;
|
|
24710
|
+
else delete settings[key];
|
|
24711
|
+
continue;
|
|
24712
|
+
}
|
|
24595
24713
|
const allowed = key === "system" ? ["metric", "imperial"] : key === "decimal" ? [".", ","] : null;
|
|
24596
|
-
if (!allowed) throw new OpError(`Unknown drawing setting "${key}". Use system or
|
|
24714
|
+
if (!allowed) throw new OpError(`Unknown drawing setting "${key}". Use system, decimal or titleBlock.`);
|
|
24597
24715
|
if (value === null || value === void 0) delete settings[key];
|
|
24598
|
-
else if (!allowed.includes(value)) throw new OpError(`The setting "${key}" is ${allowed.map((one) => `"${one}"`).join(" or ")}, not "${value}".`);
|
|
24716
|
+
else if (typeof value !== "string" || !allowed.includes(value)) throw new OpError(`The setting "${key}" is ${allowed.map((one) => `"${one}"`).join(" or ")}, not "${String(value)}".`);
|
|
24599
24717
|
else settings[key] = value;
|
|
24600
24718
|
}
|
|
24601
24719
|
if (Object.keys(settings).length > 0) d.settings = settings;
|
|
@@ -25048,9 +25166,9 @@ function inflate(data, size) {
|
|
|
25048
25166
|
let code = 0;
|
|
25049
25167
|
let first = 0;
|
|
25050
25168
|
let index = 0;
|
|
25051
|
-
for (let
|
|
25169
|
+
for (let length2 = 1; length2 < 16; length2++) {
|
|
25052
25170
|
code |= bits(1);
|
|
25053
|
-
const count2 = table.count[
|
|
25171
|
+
const count2 = table.count[length2];
|
|
25054
25172
|
if (code - count2 < first) return table.symbol[index + (code - first)];
|
|
25055
25173
|
index += count2;
|
|
25056
25174
|
first = first + count2 << 1;
|
|
@@ -25070,11 +25188,11 @@ function inflate(data, size) {
|
|
|
25070
25188
|
if (type === 0) {
|
|
25071
25189
|
held = 0;
|
|
25072
25190
|
bitsHeld = 0;
|
|
25073
|
-
const
|
|
25191
|
+
const length2 = data[pos] | data[pos + 1] << 8;
|
|
25074
25192
|
pos += 4;
|
|
25075
|
-
out.set(data.subarray(pos, pos +
|
|
25076
|
-
at2 +=
|
|
25077
|
-
pos +=
|
|
25193
|
+
out.set(data.subarray(pos, pos + length2), at2);
|
|
25194
|
+
at2 += length2;
|
|
25195
|
+
pos += length2;
|
|
25078
25196
|
continue;
|
|
25079
25197
|
}
|
|
25080
25198
|
if (type === 3) throw new Error("The picture is damaged.");
|
|
@@ -25104,10 +25222,10 @@ function inflate(data, size) {
|
|
|
25104
25222
|
out[at2++] = symbol;
|
|
25105
25223
|
continue;
|
|
25106
25224
|
}
|
|
25107
|
-
const
|
|
25225
|
+
const length2 = LENGTH_BASE[symbol - 257] + bits(LENGTH_EXTRA[symbol - 257]);
|
|
25108
25226
|
const code = decode3(tables.distances);
|
|
25109
25227
|
const back = DIST_BASE[code] + bits(DIST_EXTRA[code]);
|
|
25110
|
-
for (let k = 0; k <
|
|
25228
|
+
for (let k = 0; k < length2; k++, at2++) out[at2] = out[at2 - back];
|
|
25111
25229
|
}
|
|
25112
25230
|
}
|
|
25113
25231
|
return out;
|
|
@@ -25124,9 +25242,9 @@ function decodePng(file) {
|
|
|
25124
25242
|
let opacity = null;
|
|
25125
25243
|
const data = [];
|
|
25126
25244
|
for (let i = 8; i + 8 <= file.length; ) {
|
|
25127
|
-
const
|
|
25245
|
+
const length2 = u32(i);
|
|
25128
25246
|
const type = String.fromCharCode(file[i + 4], file[i + 5], file[i + 6], file[i + 7]);
|
|
25129
|
-
const body = file.subarray(i + 8, i + 8 +
|
|
25247
|
+
const body = file.subarray(i + 8, i + 8 + length2);
|
|
25130
25248
|
if (type === "IHDR") {
|
|
25131
25249
|
width = u32(i + 8);
|
|
25132
25250
|
height = u32(i + 12);
|
|
@@ -25137,7 +25255,7 @@ function decodePng(file) {
|
|
|
25137
25255
|
else if (type === "tRNS") opacity = body;
|
|
25138
25256
|
else if (type === "IDAT") data.push(body);
|
|
25139
25257
|
else if (type === "IEND") break;
|
|
25140
|
-
i += 12 +
|
|
25258
|
+
i += 12 + length2;
|
|
25141
25259
|
}
|
|
25142
25260
|
if (!width || !height || data.length === 0) return null;
|
|
25143
25261
|
const channels = [1, 0, 3, 1, 2, 0, 4][colour2];
|
|
@@ -25414,7 +25532,7 @@ function dxfOps(doc, parent, text2, options = {}) {
|
|
|
25414
25532
|
const layerRows = tables.filter((row) => row.type === "LAYER");
|
|
25415
25533
|
const layerRow = new Map(layerRows.map((row) => [first(row, 2) ?? "", row]));
|
|
25416
25534
|
const layerOfHandle = new Map(layerRows.map((row) => [first(row, 5) ?? "", first(row, 2) ?? ""]));
|
|
25417
|
-
const dashes = new Map(tables.filter((row) => row.type === "LTYPE").map((row) => [(first(row, 2) ?? "").toUpperCase(), (row.codes.get(49) ?? []).map((
|
|
25535
|
+
const dashes = new Map(tables.filter((row) => row.type === "LTYPE").map((row) => [(first(row, 2) ?? "").toUpperCase(), (row.codes.get(49) ?? []).map((length2) => Math.abs(parseFloat(length2)))]));
|
|
25418
25536
|
const styles = new Map(
|
|
25419
25537
|
tables.filter((row) => row.type === "STYLE").map((row) => {
|
|
25420
25538
|
const family = first(row, 1e3) ?? (first(row, 3) ?? "").replace(/\.(ttf|ttc|otf|shx)$/i, "");
|
|
@@ -25486,7 +25604,7 @@ function dxfOps(doc, parent, text2, options = {}) {
|
|
|
25486
25604
|
const strokeWidth = weight(entity, ctx);
|
|
25487
25605
|
const kind = (first(entity, 6) ?? "").toUpperCase();
|
|
25488
25606
|
const onPaper = number3(entity, 48, 1) * growth(ctx.m) / sheetScale.n / unit;
|
|
25489
|
-
const dash = dashes.get(kind)?.length ? dashes.get(kind).map((
|
|
25607
|
+
const dash = dashes.get(kind)?.length ? dashes.get(kind).map((length2) => Math.max(1, round2(length2 * onPaper * 4))) : kind && !["BYLAYER", "BYBLOCK", "CONTINUOUS"].includes(kind) ? [6, 4] : void 0;
|
|
25490
25608
|
return { ...stroke ? { stroke } : {}, ...strokeWidth ? { strokeWidth } : {}, ...dash ? { dash } : {} };
|
|
25491
25609
|
};
|
|
25492
25610
|
const styled = (node2, style) => Object.keys(style).length ? { ...node2, style } : node2;
|
|
@@ -25607,11 +25725,11 @@ function dxfOps(doc, parent, text2, options = {}) {
|
|
|
25607
25725
|
const patternOf = (families, ctx, stroke) => {
|
|
25608
25726
|
const lines2 = families.filter((family) => family.gap > 0);
|
|
25609
25727
|
if (lines2.length === 0) return void 0;
|
|
25610
|
-
const
|
|
25611
|
-
const along2 = lines2.filter((family) => !
|
|
25728
|
+
const across2 = lines2.filter((family) => Math.abs(Math.cos((family.angle - lines2[0].angle) * Math.PI / 180)) < 0.1);
|
|
25729
|
+
const along2 = lines2.filter((family) => !across2.includes(family));
|
|
25612
25730
|
const gap = (set) => Math.min(...set.map((family) => family.gap)) / set.length;
|
|
25613
|
-
const grid =
|
|
25614
|
-
const main2 =
|
|
25731
|
+
const grid = across2.length > 0 && Math.max(gap(along2), gap(across2)) < 2 * Math.min(gap(along2), gap(across2));
|
|
25732
|
+
const main2 = across2.length > 0 && gap(across2) < gap(along2) ? across2 : along2;
|
|
25615
25733
|
const angle = heading(ctx.m, main2[0].angle) % (grid ? 90 : 180);
|
|
25616
25734
|
const fine = gap(main2) * growth(ctx.m) < 0.3 * sheetScale.n;
|
|
25617
25735
|
return { kind: grid ? angle === 0 ? "Tiles" : "Cross" : "Lines", spacing: Math.max(0.1, round2(gap(main2) * (fine ? unit * sheetScale.n : growth(ctx.m)))), angle, stroke };
|
|
@@ -25641,7 +25759,7 @@ function dxfOps(doc, parent, text2, options = {}) {
|
|
|
25641
25759
|
let note = "";
|
|
25642
25760
|
let top;
|
|
25643
25761
|
let height = 0;
|
|
25644
|
-
let
|
|
25762
|
+
let arrow2 = 0;
|
|
25645
25763
|
let kind;
|
|
25646
25764
|
const points = [];
|
|
25647
25765
|
const end = { x: 0, y: 0 };
|
|
@@ -25663,7 +25781,7 @@ function dxfOps(doc, parent, text2, options = {}) {
|
|
|
25663
25781
|
else if (where === "leader" && code === 40) run = parseFloat(value);
|
|
25664
25782
|
else if (where === "line" && code === 10) points.push({ x: parseFloat(value), y: next() });
|
|
25665
25783
|
else if (where === "after" && code === 170) kind ??= parseFloat(value);
|
|
25666
|
-
else if (where === "after" && code === 42)
|
|
25784
|
+
else if (where === "after" && code === 42) arrow2 ||= parseFloat(value);
|
|
25667
25785
|
});
|
|
25668
25786
|
if (points.length === 0) return null;
|
|
25669
25787
|
const said2 = formatted(note);
|
|
@@ -25683,7 +25801,7 @@ function dxfOps(doc, parent, text2, options = {}) {
|
|
|
25683
25801
|
shape = { bend: round2(2 * most / dist(a, b)) };
|
|
25684
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" };
|
|
25685
25803
|
const font2 = said2.font;
|
|
25686
|
-
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 } : {} };
|
|
25687
25805
|
return { node: styled(node2, look(entity, ctx)) };
|
|
25688
25806
|
};
|
|
25689
25807
|
const dimension = (entity, ctx) => {
|
|
@@ -25722,17 +25840,17 @@ function dxfOps(doc, parent, text2, options = {}) {
|
|
|
25722
25840
|
};
|
|
25723
25841
|
const picture = (entity, ctx) => {
|
|
25724
25842
|
const held = asset(pictures.get(first(entity, 340) ?? ""));
|
|
25725
|
-
const [wide,
|
|
25726
|
-
if (!held || wide <= 0 ||
|
|
25843
|
+
const [wide, high2] = [number3(entity, 13), number3(entity, 23)];
|
|
25844
|
+
if (!held || wide <= 0 || high2 <= 0) return null;
|
|
25727
25845
|
const [p, u, v] = [{ x: number3(entity, 10), y: number3(entity, 20) }, { x: number3(entity, 11), y: number3(entity, 21) }, { x: number3(entity, 12), y: number3(entity, 22) }];
|
|
25728
|
-
const pixel = (x, y) => at(ctx.m, p.x + u.x * x + v.x * (
|
|
25729
|
-
const [corner, right, below] = [pixel(0, 0), pixel(wide, 0), pixel(0,
|
|
25846
|
+
const pixel = (x, y) => at(ctx.m, p.x + u.x * x + v.x * (high2 - y), p.y + u.y * x + v.y * (high2 - y));
|
|
25847
|
+
const [corner, right, below] = [pixel(0, 0), pixel(wide, 0), pixel(0, high2)];
|
|
25730
25848
|
const rotation2 = turn(Math.atan2(right.y - corner.y, right.x - corner.x) * 180 / Math.PI);
|
|
25731
25849
|
const node2 = { type: "image", asset: held.id, x: corner.x, y: corner.y, width: round2(dist(corner, right)), height: round2(dist(corner, below)), ...rotation2 ? { rotation: rotation2 } : {} };
|
|
25732
25850
|
if (number3(entity, 280) === 1) {
|
|
25733
25851
|
const [xs, ys] = [(entity.codes.get(14) ?? []).map((x) => parseFloat(x) + 0.5), (entity.codes.get(24) ?? []).map((y) => parseFloat(y) + 0.5)];
|
|
25734
|
-
const [left, top, far, bottom] = [Math.max(0, Math.min(...xs)), Math.max(0, Math.min(...ys)), Math.min(wide, Math.max(...xs)), Math.min(
|
|
25735
|
-
if (xs.length > 1 && (left > 0.5 || top > 0.5 || far < wide - 0.5 || bottom <
|
|
25852
|
+
const [left, top, far, bottom] = [Math.max(0, Math.min(...xs)), Math.max(0, Math.min(...ys)), Math.min(wide, Math.max(...xs)), Math.min(high2, Math.max(...ys))];
|
|
25853
|
+
if (xs.length > 1 && (left > 0.5 || top > 0.5 || far < wide - 0.5 || bottom < high2 - 0.5)) {
|
|
25736
25854
|
const from = pixel(left, top);
|
|
25737
25855
|
node2.modifiers = [{ type: "crop", frame: { x: from.x, y: from.y, ...rotation2 ? { rotation: rotation2 } : {} }, params: { width: round2(dist(from, pixel(far, top))), height: round2(dist(from, pixel(left, bottom))) } }];
|
|
25738
25856
|
}
|
|
@@ -25908,26 +26026,26 @@ function dxfOps(doc, parent, text2, options = {}) {
|
|
|
25908
26026
|
continue;
|
|
25909
26027
|
}
|
|
25910
26028
|
if (!windows.includes(entity)) continue;
|
|
25911
|
-
const [wide,
|
|
26029
|
+
const [wide, high2, shrink] = [number3(entity, 40), number3(entity, 41), ratio(entity)];
|
|
25912
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))))));
|
|
25913
|
-
const corners = [at(onPaper, number3(entity, 10) - wide / 2, number3(entity, 20) +
|
|
25914
|
-
const
|
|
25915
|
-
if (
|
|
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)];
|
|
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;
|
|
25916
26034
|
const frozen = new Set((entity.codes.get(331) ?? []).map((handle) => layerOfHandle.get(handle) ?? ""));
|
|
25917
26035
|
const ctx = { m: mul(onPaper, seen), frozen, depth: 0, made: /* @__PURE__ */ new Map() };
|
|
25918
26036
|
const before = count2;
|
|
25919
26037
|
const inView = every(model, ctx).filter((made) => {
|
|
25920
26038
|
const bounds2 = reach(made);
|
|
25921
|
-
return bounds2 && bounds2.maxX >=
|
|
26039
|
+
return bounds2 && bounds2.maxX >= box2.minX && bounds2.minX <= box2.maxX && bounds2.maxY >= box2.minY && bounds2.minY <= box2.maxY;
|
|
25922
26040
|
});
|
|
25923
26041
|
const leaves = (made) => made.children ? made.children.reduce((sum, child) => sum + leaves(child), 0) : 1;
|
|
25924
26042
|
count2 = before + inView.reduce((sum, made) => sum + leaves(made), 0);
|
|
25925
26043
|
if (inView.length === 0) continue;
|
|
25926
26044
|
const bounds = inView.map(reach).reduce(joined2, null);
|
|
25927
26045
|
const slack = 0.01 * k;
|
|
25928
|
-
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;
|
|
25929
26047
|
const group = inView.length === 1 && (inside3 || inView[0].children) ? inView[0] : { node: { type: "group" }, children: inView };
|
|
25930
|
-
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) } }];
|
|
25931
26049
|
content.push(group);
|
|
25932
26050
|
}
|
|
25933
26051
|
}
|
|
@@ -25986,9 +26104,10 @@ function drawingGuide(registry3, { pictures = true, schema: schema3 = true } = {
|
|
|
25986
26104
|
kind: k.kind,
|
|
25987
26105
|
what: k.description ? `${k.label}. ${k.description}` : k.label,
|
|
25988
26106
|
props: Object.fromEntries(k.params.map((p) => [p.key, `${p.options ? `one of ${p.options.join(" | ")}` : p.type}${p.unit === "length" ? " in mm" : p.unit === "angle" ? " in degrees" : ""} (default ${p.default})`])),
|
|
25989
|
-
|
|
25990
|
-
|
|
25991
|
-
|
|
26107
|
+
// Only what is not the usual, so that sixty kinds stay well within what a client takes from a tool.
|
|
26108
|
+
cutsWalls: k.opening ? true : void 0,
|
|
26109
|
+
fixedOnWall: k.mount?.on === "wall" ? { back: k.mount.back || void 0, out: k.mount.out === "up" ? "up" : void 0, height: k.mount.height } : void 0,
|
|
26110
|
+
againstWall: k.mount?.on === "floor" ? { back: k.mount.back || void 0, out: k.mount.out === "up" ? "up" : void 0 } : void 0,
|
|
25992
26111
|
ports: portsOfKind(k)
|
|
25993
26112
|
}));
|
|
25994
26113
|
return `# How a drawing is stored
|
|
@@ -26017,7 +26136,7 @@ ${JSON.stringify(kinds)}
|
|
|
26017
26136
|
|
|
26018
26137
|
Kinds with "cutsWalls" are doors and windows. One cuts an opening when it lies on a wall: put its insertion point (x, y) in the middle of the wall's thickness (on its line for a wall without "justify", half its thickness off it towards the wall otherwise) and set its rotation to the wall's direction, the angle from the wall's "a" to "b". The opening then runs along the wall from the insertion point for its width. It adapts to the wall's thickness by itself, and moves with the wall only by being on it.
|
|
26019
26138
|
|
|
26020
|
-
Kinds with "fixedOnWall" (sockets, switches, wall lights) are fixed on a face of a wall, and follow the wall when it changes only while they are exactly on it. Their own point (0, back) lies on the face, their own X along it, and they stand out of the wall into the room towards their own +Y, or -Y when "out" is "up". For a wall whose direction from "a" to "b" is the angle \u03B8, that is rotation \u03B8 on its right face (the face to the right as it runs from a to b, at +90\xB0 from its direction since Y grows downward) and \u03B8 + 180 on its left face, adding 180 to either when "out" is "up"; then place the insertion point so that (0, back) turned by that rotation lands on the face. "z" on such an object is its height above the floor in mm, to its centre; left out, it is the "height" given. Kinds with "againstWall" (kitchen units, a fridge, a washbasin) stand on the floor with their back against a face, placed by the same rule. Anything else, and a placement of a component, stands on the floor too unless given "z", the height of its underside above the floor in mm (a raised unit, a shelf, a mirror), which elevations draw it at.
|
|
26139
|
+
Kinds with "fixedOnWall" (sockets, switches, wall lights) are fixed on a face of a wall, and follow the wall when it changes only while they are exactly on it. Their own point (0, back) lies on the face, "back" being 0 when not given, their own X along it, and they stand out of the wall into the room towards their own +Y, or -Y when "out" is "up". For a wall whose direction from "a" to "b" is the angle \u03B8, that is rotation \u03B8 on its right face (the face to the right as it runs from a to b, at +90\xB0 from its direction since Y grows downward) and \u03B8 + 180 on its left face, adding 180 to either when "out" is "up"; then place the insertion point so that (0, back) turned by that rotation lands on the face. "z" on such an object is its height above the floor in mm, to its centre; left out, it is the "height" given. Kinds with "againstWall" (kitchen units, a fridge, a washbasin) stand on the floor with their back against a face, placed by the same rule. Anything else, and a placement of a component, stands on the floor too unless given "z", the height of its underside above the floor in mm (a raised unit, a shelf, a mirror), which elevations draw it at.
|
|
26021
26140
|
|
|
26022
26141
|
A "group" holds several nodes so they are selected, moved and stacked as one. It has no coordinates of its own: to group nodes, add a group and set their "parent" to its id; to move a group, move the nodes inside it. Its "opacity" (0 to 1, 1 when left out) makes everything inside it see-through.
|
|
26023
26142
|
|
|
@@ -26033,7 +26152,7 @@ A "link" joins two objects of the same page by their ids, "from" and "to", throu
|
|
|
26033
26152
|
|
|
26034
26153
|
An elevation or a section is two nodes: a "viewline" on the plan (a to b, and depth), which says what is seen, and an "elevation" that refers to it by "line" and says where its view is drawn (x, y, on any page). For an elevation of a wall's face, put the viewline 1000 in front of the face, with depth 1000, running so that the face is on its left (seen from its right); add the viewline before its view. Removing a viewline removes its views.
|
|
26035
26154
|
|
|
26036
|
-
A "paper" is a sheet laid over the drawing that frames what goes on one printed page. Its width and height are in drawing millimetres: the sheet's real size times its "scale" (an A3 lying at 1:100 is 42000 \xD7 29700; an ARCH D, 24 \xD7 36 inches, lying at 1:48 is 43891.2 \xD7 29260.8). It has no children; whatever lies inside its rectangle is on it. Give it "titleBlock": {} (optionally with "project", "author", "date", "number") for a border and a title block
|
|
26155
|
+
A "paper" is a sheet laid over the drawing that frames what goes on one printed page. Its width and height are in drawing millimetres: the sheet's real size times its "scale" (an A3 lying at 1:100 is 42000 \xD7 29700; an ARCH D, 24 \xD7 36 inches, lying at 1:48 is 43891.2 \xD7 29260.8). It has no children; whatever lies inside its rectangle is on it. Give it "titleBlock": {} (optionally with "project", "author", "date", "number") for a border and a title block in its bottom right corner. The drawing's settings put the block of every sheet down its right edge instead, with captions, as on US sheets: set_document with "settings": { "titleBlock": { "layout": "strip" } }; each sheet then lists its own "revisions" in its "titleBlock", one per line as "mark | date | description". The person exports papers to PDF at their true scale from the File menu.
|
|
26037
26156
|
|
|
26038
26157
|
A "dimension" shows the distance between "a" and "b"; "offset" is how far its line stands off them. An "annotation" is a note with a leader from the tip "a" to the text at "b". Texts may hold fields that are filled in when drawn: {date}, {page}, {page-number}, {pages}, {document}.
|
|
26039
26158
|
|
|
@@ -26045,7 +26164,7 @@ Call apply_operations with a list of operations:
|
|
|
26045
26164
|
- update_node: {"op":"update_node","id":"...","patch":{...}}. The patch replaces the properties it names; a null value removes a property. Nested objects such as "a", "props" and "style" are replaced whole, so include every field of the one you change. Setting "parent" or "order" moves the node.
|
|
26046
26165
|
- remove_node: {"op":"remove_node","id":"..."}. It takes along everything inside the node; removing a component also removes its instances, and removing an object the links that join it to others.
|
|
26047
26166
|
- add_layer, update_layer, remove_layer; add_color, update_color, remove_color; add_dimension_style, update_dimension_style, remove_dimension_style, as described above.
|
|
26048
|
-
- set_document: renames the drawing, and with "info" sets its project, client, address and author, which every sheet's title block shows.
|
|
26167
|
+
- set_document: renames the drawing, and with "info" sets its project, client, address and author, which every sheet's title block shows; with "settings" sets how it writes its numbers ("system", "decimal") and lays out its title blocks ("titleBlock").
|
|
26049
26168
|
- add_asset embeds a picture's file for an image node; it is for the app's own imports, and you will not need it.
|
|
26050
26169
|
|
|
26051
26170
|
${CHECKING}${pictures ? ` ${LOOKING}` : ""}`;
|
|
@@ -26100,8 +26219,8 @@ function readTrueType(bytes) {
|
|
|
26100
26219
|
const record2 = at2 + 6 + i * 12;
|
|
26101
26220
|
if (data.getUint16(record2 + 6) !== 6) continue;
|
|
26102
26221
|
const platform = data.getUint16(record2);
|
|
26103
|
-
const [
|
|
26104
|
-
const text2 = platform === 1 ? String.fromCharCode(...bytes.subarray(offset, offset +
|
|
26222
|
+
const [length2, offset] = [data.getUint16(record2 + 8), strings + data.getUint16(record2 + 10)];
|
|
26223
|
+
const text2 = platform === 1 ? String.fromCharCode(...bytes.subarray(offset, offset + length2)) : String.fromCharCode(...Array.from({ length: length2 / 2 }, (_, k) => data.getUint16(offset + 2 * k)));
|
|
26105
26224
|
const clean = text2.replace(/[^A-Za-z0-9-]/g, "");
|
|
26106
26225
|
if (clean) return clean;
|
|
26107
26226
|
}
|
|
@@ -26131,7 +26250,7 @@ function readTrueType(bytes) {
|
|
|
26131
26250
|
outlines2.push(copy);
|
|
26132
26251
|
}
|
|
26133
26252
|
const count2 = order.length;
|
|
26134
|
-
const padded = (
|
|
26253
|
+
const padded = (length2) => length2 + 3 & ~3;
|
|
26135
26254
|
const glyfOut = new Uint8Array(outlines2.reduce((sum, o) => sum + padded(o.length), 0));
|
|
26136
26255
|
const locaOut = new DataView(new ArrayBuffer(4 * (count2 + 1)));
|
|
26137
26256
|
let offset = 0;
|
|
@@ -26181,11 +26300,11 @@ function characterMap(data, cmap) {
|
|
|
26181
26300
|
const known = /* @__PURE__ */ new Map();
|
|
26182
26301
|
const find = (code) => {
|
|
26183
26302
|
if (full >= 0) {
|
|
26184
|
-
let [low2,
|
|
26185
|
-
while (low2 <=
|
|
26186
|
-
const middle = low2 +
|
|
26303
|
+
let [low2, high3] = [0, data.getUint32(full + 12) - 1];
|
|
26304
|
+
while (low2 <= high3) {
|
|
26305
|
+
const middle = low2 + high3 >> 1;
|
|
26187
26306
|
const group = full + 16 + middle * 12;
|
|
26188
|
-
if (code < data.getUint32(group))
|
|
26307
|
+
if (code < data.getUint32(group)) high3 = middle - 1;
|
|
26189
26308
|
else if (code > data.getUint32(group + 4)) low2 = middle + 1;
|
|
26190
26309
|
else return data.getUint32(group + 8) + code - data.getUint32(group);
|
|
26191
26310
|
}
|
|
@@ -26197,11 +26316,11 @@ function characterMap(data, cmap) {
|
|
|
26197
26316
|
const starts = ends + 2 * segments + 2;
|
|
26198
26317
|
const deltas = starts + 2 * segments;
|
|
26199
26318
|
const ranges = deltas + 2 * segments;
|
|
26200
|
-
let [low,
|
|
26201
|
-
while (low <
|
|
26202
|
-
const middle = low +
|
|
26319
|
+
let [low, high2] = [0, segments - 1];
|
|
26320
|
+
while (low < high2) {
|
|
26321
|
+
const middle = low + high2 >> 1;
|
|
26203
26322
|
if (data.getUint16(ends + 2 * middle) < code) low = middle + 1;
|
|
26204
|
-
else
|
|
26323
|
+
else high2 = middle;
|
|
26205
26324
|
}
|
|
26206
26325
|
const start = data.getUint16(starts + 2 * low);
|
|
26207
26326
|
if (code < start || code > data.getUint16(ends + 2 * low)) return 0;
|
|
@@ -26218,13 +26337,13 @@ function characterMap(data, cmap) {
|
|
|
26218
26337
|
}
|
|
26219
26338
|
function writeFont(tables) {
|
|
26220
26339
|
tables.sort(([a], [b]) => a < b ? -1 : 1);
|
|
26221
|
-
const padded = (
|
|
26340
|
+
const padded = (length2) => length2 + 3 & ~3;
|
|
26222
26341
|
const directory = 12 + 16 * tables.length;
|
|
26223
26342
|
const file = new Uint8Array(directory + tables.reduce((sum, [, body]) => sum + padded(body.length), 0));
|
|
26224
26343
|
const view = new DataView(file.buffer);
|
|
26225
|
-
const checksum = (from,
|
|
26344
|
+
const checksum = (from, length2) => {
|
|
26226
26345
|
let sum = 0;
|
|
26227
|
-
for (let at2 = from; at2 < from + padded(
|
|
26346
|
+
for (let at2 = from; at2 < from + padded(length2); at2 += 4) sum = sum + view.getUint32(at2) >>> 0;
|
|
26228
26347
|
return sum;
|
|
26229
26348
|
};
|
|
26230
26349
|
const selector = Math.floor(Math.log2(tables.length));
|
|
@@ -26389,11 +26508,11 @@ function jpegInfo(bytes) {
|
|
|
26389
26508
|
for (let i = 2; i + 9 < bytes.length; ) {
|
|
26390
26509
|
if (bytes[i] !== 255) return null;
|
|
26391
26510
|
const marker2 = bytes[i + 1];
|
|
26392
|
-
const
|
|
26511
|
+
const length2 = bytes[i + 2] << 8 | bytes[i + 3];
|
|
26393
26512
|
if (marker2 >= 192 && marker2 <= 207 && marker2 !== 196 && marker2 !== 200 && marker2 !== 204) {
|
|
26394
26513
|
return { height: bytes[i + 5] << 8 | bytes[i + 6], width: bytes[i + 7] << 8 | bytes[i + 8], channels: bytes[i + 9] };
|
|
26395
26514
|
}
|
|
26396
|
-
i += 2 +
|
|
26515
|
+
i += 2 + length2;
|
|
26397
26516
|
}
|
|
26398
26517
|
return null;
|
|
26399
26518
|
}
|
|
@@ -26489,12 +26608,12 @@ function pageContent(doc, paper, registry3, resources) {
|
|
|
26489
26608
|
}
|
|
26490
26609
|
}
|
|
26491
26610
|
if (index !== void 0) {
|
|
26492
|
-
const
|
|
26611
|
+
const across2 = rotate({ x: prim.width, y: 0 }, prim.rotation ?? 0);
|
|
26493
26612
|
const down = rotate({ x: 0, y: prim.height }, prim.rotation ?? 0);
|
|
26494
26613
|
const x = (prim.x + down.x - paper.x) * perMm;
|
|
26495
26614
|
const y = height - (prim.y + down.y - paper.y) * perMm;
|
|
26496
26615
|
alpha(prim.opacity ?? 1, 1);
|
|
26497
|
-
out.push(`${n2(
|
|
26616
|
+
out.push(`${n2(across2.x * perMm)} ${n2(-across2.y * perMm)} ${n2(-down.x * perMm)} ${n2(down.y * perMm)} ${n2(x)} ${n2(y)} cm /Im${index + 1} Do`);
|
|
26498
26617
|
}
|
|
26499
26618
|
} else {
|
|
26500
26619
|
const filled = fill ? parseColor(prim.fill) : null;
|
|
@@ -26563,15 +26682,15 @@ function toPDF(doc, registry3, paperIds, options = {}) {
|
|
|
26563
26682
|
return [`<< /Type /Page /Parent 2 0 R /MediaBox [0 0 ${n2(page.width)} ${n2(page.height)}] /Resources ${shared} /Contents ${firstPage + i * 2 + 1} 0 R >>`, [`<< /Length ${commands.length} >>`, commands]];
|
|
26564
26683
|
})
|
|
26565
26684
|
];
|
|
26566
|
-
let
|
|
26685
|
+
let length2 = 0;
|
|
26567
26686
|
const offsets = [];
|
|
26568
26687
|
const write = (part) => {
|
|
26569
26688
|
chunks.push(part);
|
|
26570
|
-
|
|
26689
|
+
length2 += part.length;
|
|
26571
26690
|
};
|
|
26572
26691
|
write("%PDF-1.4\n%\xE2\xE3\xCF\xD3\n");
|
|
26573
26692
|
objects.forEach((object3, i) => {
|
|
26574
|
-
offsets.push(
|
|
26693
|
+
offsets.push(length2);
|
|
26575
26694
|
write(`${i + 1} 0 obj
|
|
26576
26695
|
`);
|
|
26577
26696
|
if (typeof object3 === "string") write(`${object3}
|
|
@@ -26585,7 +26704,7 @@ stream
|
|
|
26585
26704
|
}
|
|
26586
26705
|
write("endobj\n");
|
|
26587
26706
|
});
|
|
26588
|
-
const table =
|
|
26707
|
+
const table = length2;
|
|
26589
26708
|
write(`xref
|
|
26590
26709
|
0 ${objects.length + 1}
|
|
26591
26710
|
0000000000 65535 f
|
|
@@ -26597,7 +26716,7 @@ startxref
|
|
|
26597
26716
|
${table}
|
|
26598
26717
|
%%EOF
|
|
26599
26718
|
`);
|
|
26600
|
-
const file = new Uint8Array(
|
|
26719
|
+
const file = new Uint8Array(length2);
|
|
26601
26720
|
let at2 = 0;
|
|
26602
26721
|
for (const chunk of chunks) {
|
|
26603
26722
|
if (typeof chunk === "string") for (let i = 0; i < chunk.length; i++) file[at2++] = chunk.charCodeAt(i) & 255;
|
|
@@ -26837,12 +26956,55 @@ function withViewLines(doc) {
|
|
|
26837
26956
|
}
|
|
26838
26957
|
return { ...doc, nodes };
|
|
26839
26958
|
}
|
|
26959
|
+
var OFFICE_CHAIR = "arch.officechair";
|
|
26960
|
+
var length = (value, fallback, least) => Math.max(least, typeof value === "number" && Number.isFinite(value) ? value : fallback);
|
|
26961
|
+
function withOfficeChairs(doc) {
|
|
26962
|
+
if (!isPlain2(doc.nodes) || !Object.values(doc.nodes).some((node2) => isPlain2(node2) && deskDrewChair(node2))) return doc;
|
|
26963
|
+
const nodes = { ...doc.nodes };
|
|
26964
|
+
const orders = /* @__PURE__ */ new Map();
|
|
26965
|
+
for (const node2 of Object.values(nodes)) {
|
|
26966
|
+
if (isPlain2(node2) && typeof node2.order === "string" && isOrderKey(node2.order)) orders.set(node2.parent, [...orders.get(node2.parent) ?? [], node2.order]);
|
|
26967
|
+
}
|
|
26968
|
+
for (const [key, desk2] of Object.entries(doc.nodes)) {
|
|
26969
|
+
if (!isPlain2(desk2) || !deskDrewChair(desk2)) continue;
|
|
26970
|
+
const props = isPlain2(desk2.props) ? desk2.props : {};
|
|
26971
|
+
nodes[key] = { ...desk2, props: { ...props, chair: false } };
|
|
26972
|
+
const place = { x: typeof desk2.x === "number" ? desk2.x : 0, y: typeof desk2.y === "number" ? desk2.y : 0, rotation: typeof desk2.rotation === "number" ? desk2.rotation : 0, flipX: desk2.flipX === true };
|
|
26973
|
+
const at2 = applyTransform({ x: length(props.width, 1400, 600) / 2 + 330, y: length(props.depth, 700, 400) + 750 }, place);
|
|
26974
|
+
let order;
|
|
26975
|
+
if (typeof desk2.order === "string" && isOrderKey(desk2.order)) {
|
|
26976
|
+
const above = (orders.get(desk2.parent) ?? []).filter((other) => other > desk2.order).sort()[0] ?? null;
|
|
26977
|
+
order = generateKeyBetween(desk2.order, above);
|
|
26978
|
+
orders.set(desk2.parent, [...orders.get(desk2.parent) ?? [], order]);
|
|
26979
|
+
}
|
|
26980
|
+
let id = `${typeof desk2.id === "string" ? desk2.id : key}_chair`;
|
|
26981
|
+
while (id in nodes) id = `${id}_`;
|
|
26982
|
+
nodes[id] = {
|
|
26983
|
+
id,
|
|
26984
|
+
type: "parametric",
|
|
26985
|
+
parent: desk2.parent,
|
|
26986
|
+
...order ? { order } : {},
|
|
26987
|
+
..."layer" in desk2 ? { layer: desk2.layer } : {},
|
|
26988
|
+
...desk2.visible === false ? { visible: false } : {},
|
|
26989
|
+
...desk2.locked === true ? { locked: true } : {},
|
|
26990
|
+
kind: OFFICE_CHAIR,
|
|
26991
|
+
props: {},
|
|
26992
|
+
x: at2.x,
|
|
26993
|
+
y: at2.y,
|
|
26994
|
+
rotation: ((place.rotation + 180) % 360 + 360) % 360,
|
|
26995
|
+
...place.flipX ? { flipX: true } : {}
|
|
26996
|
+
};
|
|
26997
|
+
}
|
|
26998
|
+
return { ...doc, nodes };
|
|
26999
|
+
}
|
|
26840
27000
|
var MIGRATIONS = [
|
|
26841
27001
|
(doc) => toVersion2(withoutWallTypes(doc)),
|
|
26842
27002
|
// Version 3 brings elevations and sections (the `viewline` and `elevation` node types) and nothing that changes what was there.
|
|
26843
27003
|
(doc) => doc,
|
|
26844
27004
|
// Version 4 brings links between objects (the `link` node type): a switch and the lights it controls. Nothing else changes.
|
|
26845
|
-
(doc) => doc
|
|
27005
|
+
(doc) => doc,
|
|
27006
|
+
// Version 5: a desk's office chair is an object of its own.
|
|
27007
|
+
withOfficeChairs
|
|
26846
27008
|
];
|
|
26847
27009
|
|
|
26848
27010
|
// packages/core/src/repair.ts
|
|
@@ -27110,7 +27272,7 @@ function toSVG(doc, containerId, registry3, options = {}) {
|
|
|
27110
27272
|
const scene = buildScene(doc, containerId, registry3);
|
|
27111
27273
|
const b = options.area ?? sceneBounds(scene) ?? { minX: 0, minY: 0, maxX: 1e3, maxY: 1e3 };
|
|
27112
27274
|
const margin = options.area ? 0 : Math.max(b.maxX - b.minX, b.maxY - b.minY) * 0.05 + 1;
|
|
27113
|
-
const
|
|
27275
|
+
const box2 = [b.minX - margin, b.minY - margin, b.maxX - b.minX + 2 * margin, b.maxY - b.minY + 2 * margin];
|
|
27114
27276
|
const clips = /* @__PURE__ */ new Map();
|
|
27115
27277
|
const clipped = (step) => {
|
|
27116
27278
|
let drawn = stepToSvg(step);
|
|
@@ -27124,9 +27286,9 @@ function toSVG(doc, containerId, registry3, options = {}) {
|
|
|
27124
27286
|
const body = paintOrder2(scene.flatMap((item) => item.prims)).map(clipped);
|
|
27125
27287
|
const defs = clips.size > 0 ? [`<defs>${[...clips].map(([points, id]) => `<clipPath id="${id}"><polygon points="${points}"/></clipPath>`).join("")}</defs>`] : [];
|
|
27126
27288
|
return [
|
|
27127
|
-
`<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">`,
|
|
27128
27290
|
...defs,
|
|
27129
|
-
`<rect x="${num(
|
|
27291
|
+
`<rect x="${num(box2[0])}" y="${num(box2[1])}" width="${num(box2[2])}" height="${num(box2[3])}" fill="white"/>`,
|
|
27130
27292
|
...body,
|
|
27131
27293
|
"</svg>",
|
|
27132
27294
|
""
|
|
@@ -27285,10 +27447,10 @@ async function runDrawingTool(name, given, host2) {
|
|
|
27285
27447
|
if (input.area !== void 0 && !areaOf(input.area)) return missing('"area" must give numbers with maxX above minX and maxY above minY.');
|
|
27286
27448
|
const svg = toSVG(doc, root, registry3, { area: areaOf(input.area) });
|
|
27287
27449
|
const picture = await host2.picture(svg, PICTURE_PIXELS);
|
|
27288
|
-
const
|
|
27450
|
+
const box2 = svgBox(svg);
|
|
27289
27451
|
const mm2 = (n3) => Math.round(n3);
|
|
27290
27452
|
return {
|
|
27291
|
-
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.`,
|
|
27292
27454
|
image: { mime: picture.mime, data: picture.data },
|
|
27293
27455
|
note: { kind: "looked-at-drawing" }
|
|
27294
27456
|
};
|
|
@@ -27450,12 +27612,20 @@ function boxSide(depth, height, front = FRONT) {
|
|
|
27450
27612
|
var COUNTER_TOP = 850;
|
|
27451
27613
|
var COUNTER = 30;
|
|
27452
27614
|
var VANITY_FOOT = 300;
|
|
27453
|
-
|
|
27615
|
+
var VANITY_LEGS = 150;
|
|
27616
|
+
var vanityFoot = (feet2) => feet2 ? VANITY_LEGS : VANITY_FOOT;
|
|
27617
|
+
var vanityLegs = (w) => {
|
|
27618
|
+
const leg = Math.min(40, w / 8);
|
|
27619
|
+
const inset = Math.min(30, w / 10);
|
|
27620
|
+
return [rect(inset, 0, inset + leg, -VANITY_LEGS), rect(w - inset - leg, 0, w - inset, -VANITY_LEGS)];
|
|
27621
|
+
};
|
|
27622
|
+
function washbasinFront(w, bowls, below, feet2) {
|
|
27454
27623
|
const n3 = Math.min(MAX_BOWLS, count(bowls));
|
|
27455
27624
|
const share = w / n3;
|
|
27456
27625
|
const prims = [rect(0, -COUNTER_TOP + COUNTER, w, -COUNTER_TOP)];
|
|
27457
27626
|
if (below === "Drawers" || below === "Doors") {
|
|
27458
|
-
prims.push(rect(0, -
|
|
27627
|
+
prims.push(rect(0, -vanityFoot(feet2), w, -COUNTER_TOP + COUNTER, THIN2), ...frontsOf(below, 0, w, -vanityFoot(feet2), -COUNTER_TOP + COUNTER, w > 900 ? 2 : 1, 2));
|
|
27628
|
+
if (feet2) prims.push(...vanityLegs(w));
|
|
27459
27629
|
}
|
|
27460
27630
|
for (let i = 0; i < n3; i++) {
|
|
27461
27631
|
const cx = (i + 0.5) * share;
|
|
@@ -27465,9 +27635,12 @@ function washbasinFront(w, bowls, below) {
|
|
|
27465
27635
|
}
|
|
27466
27636
|
return prims;
|
|
27467
27637
|
}
|
|
27468
|
-
function washbasinSide(d, below) {
|
|
27638
|
+
function washbasinSide(d, below, feet2) {
|
|
27469
27639
|
const prims = [rect(0, -COUNTER_TOP + COUNTER, d, -COUNTER_TOP), line([pt(60, -COUNTER_TOP), pt(60, -COUNTER_TOP - 180), pt(160, -COUNTER_TOP - 180), pt(160, -COUNTER_TOP - 140)], { strokeWidth: 1.5 })];
|
|
27470
|
-
if (below === "Drawers" || below === "Doors")
|
|
27640
|
+
if (below === "Drawers" || below === "Doors") {
|
|
27641
|
+
prims.push(rect(0, -vanityFoot(feet2), Math.max(40, d - 20), -COUNTER_TOP + COUNTER, THIN2));
|
|
27642
|
+
if (feet2) prims.push(...vanityLegs(Math.max(40, d - 20)));
|
|
27643
|
+
}
|
|
27471
27644
|
return prims;
|
|
27472
27645
|
}
|
|
27473
27646
|
var MIN_COUNTER = 300;
|
|
@@ -27475,15 +27648,17 @@ var washbasin = (kind, label, width, depth, bowls) => ({
|
|
|
27475
27648
|
kind,
|
|
27476
27649
|
label,
|
|
27477
27650
|
category: "bathroom",
|
|
27478
|
-
description: "A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.",
|
|
27651
|
+
description: "A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.",
|
|
27479
27652
|
params: [
|
|
27480
27653
|
{ ...WIDTH, default: width },
|
|
27481
27654
|
{ key: "depth", label: "Depth", type: "number", default: depth, unit: "length" },
|
|
27482
27655
|
{ key: "bowls", label: "Bowls", type: "number", default: bowls },
|
|
27483
|
-
{ key: "below", label: "Below", type: "string", default: "None", options: ["None", "Drawers", "Doors"] }
|
|
27656
|
+
{ key: "below", label: "Below", type: "string", default: "None", options: ["None", "Drawers", "Doors"] },
|
|
27657
|
+
// The vanity unit under it, hung on the wall (as most are) or standing on feet.
|
|
27658
|
+
{ key: "feet", label: "On feet", type: "boolean", default: false }
|
|
27484
27659
|
],
|
|
27485
|
-
front: ({ width: width2, bowls: bowls2, below }) => washbasinFront(atLeast(1, width2), bowls2, below),
|
|
27486
|
-
side: ({ depth: depth2, below }) => washbasinSide(atLeast(1, depth2), below),
|
|
27660
|
+
front: ({ width: width2, bowls: bowls2, below, feet: feet2 }) => washbasinFront(atLeast(1, width2), bowls2, below, feet2 === true),
|
|
27661
|
+
side: ({ depth: depth2, below, feet: feet2 }) => washbasinSide(atLeast(1, depth2), below, feet2 === true),
|
|
27487
27662
|
box: {
|
|
27488
27663
|
bounds: ({ width: width2, depth: depth2 }) => ({ left: 0, top: 0, right: atLeast(1, width2), bottom: atLeast(1, depth2) }),
|
|
27489
27664
|
resize: (_, size) => ({
|
|
@@ -27515,6 +27690,155 @@ var washbasin = (kind, label, width, depth, bowls) => ({
|
|
|
27515
27690
|
return prims;
|
|
27516
27691
|
}
|
|
27517
27692
|
});
|
|
27693
|
+
function bowl(cx, cy, halfWidth, back, front, square = 5) {
|
|
27694
|
+
return Array.from({ length: 72 }, (_, i) => {
|
|
27695
|
+
const t = i / 72 * 2 * Math.PI;
|
|
27696
|
+
const [c, s] = [Math.cos(t), Math.sin(t)];
|
|
27697
|
+
const power = (v, n4) => Math.sign(v) * Math.abs(v) ** (2 / n4);
|
|
27698
|
+
const n3 = s < 0 ? square : 2.2;
|
|
27699
|
+
return pt(cx + halfWidth * power(c, n3), cy + (s < 0 ? back : front) * power(s, n3));
|
|
27700
|
+
});
|
|
27701
|
+
}
|
|
27702
|
+
function across(outline2, y) {
|
|
27703
|
+
const xs = outline2.flatMap((p, i) => {
|
|
27704
|
+
const q = outline2[(i + 1) % outline2.length];
|
|
27705
|
+
return (p.y - y) * (q.y - y) <= 0 && p.y !== q.y ? [p.x + (y - p.y) * (q.x - p.x) / (q.y - p.y)] : [];
|
|
27706
|
+
});
|
|
27707
|
+
return xs.length > 0 ? [Math.min(...xs), Math.max(...xs)] : [0, 0];
|
|
27708
|
+
}
|
|
27709
|
+
var SEAT = 420;
|
|
27710
|
+
var CISTERN_TOP = 800;
|
|
27711
|
+
var HUNG_SEAT = 400;
|
|
27712
|
+
var FLUSH_PLATE = 1100;
|
|
27713
|
+
var LID = 430;
|
|
27714
|
+
var LID_THICK = 30;
|
|
27715
|
+
var MIN_TOILET_WIDTH = 300;
|
|
27716
|
+
var MIN_TOILET_DEPTH = 450;
|
|
27717
|
+
var toilet = {
|
|
27718
|
+
kind: "arch.toilet",
|
|
27719
|
+
label: "Toilet",
|
|
27720
|
+
category: "bathroom",
|
|
27721
|
+
description: "Its cistern goes against the wall. Pull its sides to make it wider or deeper.",
|
|
27722
|
+
params: [{ ...WIDTH, default: 380 }, DEPTH(700)],
|
|
27723
|
+
box: sizedBox("width", "depth", MIN_TOILET_WIDTH, MIN_TOILET_DEPTH),
|
|
27724
|
+
mount: { on: "floor" },
|
|
27725
|
+
height: () => CISTERN_TOP,
|
|
27726
|
+
build({ width, depth }) {
|
|
27727
|
+
const w = atLeast(1, width);
|
|
27728
|
+
const d = atLeast(1, depth);
|
|
27729
|
+
const c = Math.min(170, d / 4);
|
|
27730
|
+
const rest = d - c;
|
|
27731
|
+
const cy = c + rest * (130 / 530);
|
|
27732
|
+
return [
|
|
27733
|
+
roundBox(0, 0, w, c, [8, 8, Math.min(30, c / 3), Math.min(30, c / 3)]),
|
|
27734
|
+
circle(w / 2, c / 2, Math.min(32, c / 3), THIN2),
|
|
27735
|
+
line([pt(w / 2 - Math.min(32, c / 3), c / 2), pt(w / 2 + Math.min(32, c / 3), c / 2)], THIN2),
|
|
27736
|
+
outline(bowl(w / 2, cy, w / 2 - 10 * (w / 380), cy - c, d - cy)),
|
|
27737
|
+
{ kind: "ellipse", cx: w / 2, cy: c + rest * (275 / 530), rx: w * (118 / 380), ry: rest * (205 / 530) }
|
|
27738
|
+
];
|
|
27739
|
+
},
|
|
27740
|
+
// Seen from in front, its foot, its seat, its lid closed over it and, behind, its cistern with the
|
|
27741
|
+
// flush button on top; from its side, the cistern against the wall and the bowl reaching out from
|
|
27742
|
+
// it under its lid.
|
|
27743
|
+
front: ({ width }) => {
|
|
27744
|
+
const w = atLeast(1, width);
|
|
27745
|
+
return [
|
|
27746
|
+
outline([pt(w * 0.3, 0), pt(w * 0.7, 0), pt(w * 0.8, -SEAT + 60), pt(w * 0.2, -SEAT + 60)]),
|
|
27747
|
+
roundBox(w * 0.03, -SEAT, w * 0.97, -SEAT + 60, 20),
|
|
27748
|
+
roundBox(w * 0.04, -SEAT - LID_THICK, w * 0.96, -SEAT, LID_THICK / 2),
|
|
27749
|
+
rect(0, -SEAT - LID_THICK, w, -CISTERN_TOP),
|
|
27750
|
+
rect(w / 2 - 30, -CISTERN_TOP, w / 2 + 30, -CISTERN_TOP - 12, THIN2)
|
|
27751
|
+
];
|
|
27752
|
+
},
|
|
27753
|
+
side: ({ depth }) => {
|
|
27754
|
+
const d = atLeast(1, depth);
|
|
27755
|
+
const c = Math.min(170, d / 4);
|
|
27756
|
+
return [
|
|
27757
|
+
rect(0, -SEAT, c, -CISTERN_TOP),
|
|
27758
|
+
outline([pt(c, 0), pt(c + (d - c) * 0.55, 0), pt(d, -SEAT + 80), pt(d, -SEAT), pt(c, -SEAT)]),
|
|
27759
|
+
outline(roundCorners([pt(c, -SEAT), pt(c, -SEAT - LID_THICK), pt(d - 5, -SEAT - LID_THICK), pt(d - 5, -SEAT)], [0, 0, LID_THICK / 2, 0]))
|
|
27760
|
+
];
|
|
27761
|
+
}
|
|
27762
|
+
};
|
|
27763
|
+
var wallHungToilet = {
|
|
27764
|
+
kind: "arch.toilet.wallhung",
|
|
27765
|
+
label: "Toilet, wall-hung",
|
|
27766
|
+
category: "bathroom",
|
|
27767
|
+
description: "Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.",
|
|
27768
|
+
params: [{ ...WIDTH, default: 360 }, DEPTH(540)],
|
|
27769
|
+
box: sizedBox("width", "depth", MIN_TOILET_WIDTH, MIN_TOILET_DEPTH - 100),
|
|
27770
|
+
mount: { on: "floor" },
|
|
27771
|
+
height: () => HUNG_SEAT,
|
|
27772
|
+
build({ width, depth }) {
|
|
27773
|
+
const w = atLeast(1, width);
|
|
27774
|
+
const d = atLeast(1, depth);
|
|
27775
|
+
const cy = d * (150 / 540);
|
|
27776
|
+
const edge = bowl(w / 2, cy, w / 2, cy, d - cy, 6);
|
|
27777
|
+
const hinge = d * (100 / 540);
|
|
27778
|
+
const [left, right] = across(edge, hinge);
|
|
27779
|
+
return [
|
|
27780
|
+
outline(edge),
|
|
27781
|
+
{ kind: "ellipse", cx: w / 2, cy: d * (330 / 540), rx: w * (112 / 360), ry: d * (180 / 540) },
|
|
27782
|
+
line([pt(left, hinge), pt(right, hinge)], THIN2)
|
|
27783
|
+
];
|
|
27784
|
+
},
|
|
27785
|
+
// Seen from in front, its seat, its lid raised against the wall behind it, the bowl under them,
|
|
27786
|
+
// and the flush plate on the wall over it; from its side, the same, the lid leaning to the wall.
|
|
27787
|
+
front: ({ width }) => {
|
|
27788
|
+
const w = atLeast(1, width);
|
|
27789
|
+
const round3 = w * 0.35;
|
|
27790
|
+
return [
|
|
27791
|
+
outline(roundCorners([pt(w * 0.07, -HUNG_SEAT), pt(w * 0.07, -HUNG_SEAT - LID), pt(w * 0.93, -HUNG_SEAT - LID), pt(w * 0.93, -HUNG_SEAT)], [0, round3, round3, 0])),
|
|
27792
|
+
roundBox(w * 0.03, -HUNG_SEAT, w * 0.97, -HUNG_SEAT + 40, 15),
|
|
27793
|
+
outline([pt(w * 0.05, -HUNG_SEAT + 40), pt(w * 0.95, -HUNG_SEAT + 40), pt(w * 0.75, -HUNG_SEAT + 180), pt(w * 0.25, -HUNG_SEAT + 180)]),
|
|
27794
|
+
// The flush plate, on the wall over it, with its two buttons.
|
|
27795
|
+
rect(w / 2 - 120, -FLUSH_PLATE + 80, w / 2 + 120, -FLUSH_PLATE - 80, THIN2),
|
|
27796
|
+
line([pt(w / 2, -FLUSH_PLATE + 50), pt(w / 2, -FLUSH_PLATE - 50)], THIN2)
|
|
27797
|
+
];
|
|
27798
|
+
},
|
|
27799
|
+
side: ({ depth }) => {
|
|
27800
|
+
const d = atLeast(1, depth);
|
|
27801
|
+
const hinge = d * (100 / 540);
|
|
27802
|
+
const top = -HUNG_SEAT - 30;
|
|
27803
|
+
return [
|
|
27804
|
+
outline([pt(0, top), pt(d, top), pt(d, -HUNG_SEAT + 30), pt(d * 0.7, -HUNG_SEAT + 170), pt(0, -HUNG_SEAT + 200)]),
|
|
27805
|
+
outline([pt(hinge - LID_THICK, top), pt(hinge, top), pt(hinge - 35, top - LID), pt(hinge - 35 - LID_THICK, top - LID + 5)])
|
|
27806
|
+
];
|
|
27807
|
+
}
|
|
27808
|
+
};
|
|
27809
|
+
var TRAY = 100;
|
|
27810
|
+
var MIN_TRAY = 600;
|
|
27811
|
+
var showerTray = {
|
|
27812
|
+
kind: "arch.showertray",
|
|
27813
|
+
label: "Shower tray",
|
|
27814
|
+
category: "bathroom",
|
|
27815
|
+
description: "Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.",
|
|
27816
|
+
params: [{ ...WIDTH, default: 900 }, DEPTH(900)],
|
|
27817
|
+
box: sizedBox("width", "depth", MIN_TRAY),
|
|
27818
|
+
mount: { on: "floor" },
|
|
27819
|
+
height: () => TRAY,
|
|
27820
|
+
build({ width, depth }) {
|
|
27821
|
+
const w = atLeast(1, width);
|
|
27822
|
+
const d = atLeast(1, depth);
|
|
27823
|
+
const rim = Math.min(40, w / 6, d / 6);
|
|
27824
|
+
const [cx, cy] = [w / 2, d / 2];
|
|
27825
|
+
const drain = Math.min(50, w / 6, d / 6);
|
|
27826
|
+
const corner = rim + 30 * (1 - Math.SQRT1_2);
|
|
27827
|
+
const slopes = [
|
|
27828
|
+
[1, 1],
|
|
27829
|
+
[-1, 1],
|
|
27830
|
+
[1, -1],
|
|
27831
|
+
[-1, -1]
|
|
27832
|
+
].map(([sx, sy]) => {
|
|
27833
|
+
const from = pt(cx - sx * (cx - corner), cy - sy * (cy - corner));
|
|
27834
|
+
const toward = Math.hypot(from.x - cx, from.y - cy);
|
|
27835
|
+
return line([from, pt(cx + (from.x - cx) * drain / toward, cy + (from.y - cy) * drain / toward)], THIN2);
|
|
27836
|
+
});
|
|
27837
|
+
return [roundBox(0, 0, w, d, 10), roundBox(rim, rim, w - rim, d - rim, 30, THIN2), ...slopes, circle(cx, cy, drain), circle(cx, cy, drain * 0.56, THIN2)];
|
|
27838
|
+
},
|
|
27839
|
+
front: ({ width }) => [rect(0, 0, atLeast(1, width), -TRAY)],
|
|
27840
|
+
side: ({ depth }) => [rect(0, 0, atLeast(1, depth), -TRAY)]
|
|
27841
|
+
};
|
|
27518
27842
|
var TUB = 580;
|
|
27519
27843
|
var MIN_TUB = 500;
|
|
27520
27844
|
var bathtub = {
|
|
@@ -27528,7 +27852,7 @@ var bathtub = {
|
|
|
27528
27852
|
{ key: "rim", label: "Rim", type: "number", default: 60, unit: "length" }
|
|
27529
27853
|
],
|
|
27530
27854
|
box: {
|
|
27531
|
-
bounds: ({ length, width }) => ({ left: 0, top: 0, right: atLeast(1,
|
|
27855
|
+
bounds: ({ length: length2, width }) => ({ left: 0, top: 0, right: atLeast(1, length2), bottom: atLeast(1, width) }),
|
|
27532
27856
|
resize: (_, size) => ({
|
|
27533
27857
|
...size.width === void 0 ? {} : { length: Math.round(atLeast(MIN_TUB, size.width)) },
|
|
27534
27858
|
...size.height === void 0 ? {} : { width: Math.round(atLeast(MIN_TUB, size.height)) }
|
|
@@ -27536,8 +27860,8 @@ var bathtub = {
|
|
|
27536
27860
|
},
|
|
27537
27861
|
// Seen from in front, its panel and the rim along its top, its mixer on the wall at the drain end;
|
|
27538
27862
|
// from its side, the same across its width.
|
|
27539
|
-
front: ({ length, rim }) => {
|
|
27540
|
-
const l = atLeast(1,
|
|
27863
|
+
front: ({ length: length2, rim }) => {
|
|
27864
|
+
const l = atLeast(1, length2);
|
|
27541
27865
|
const x = Math.min(clamp(rim, 1, l / 2) + 140, l / 2);
|
|
27542
27866
|
return [rect(0, 0, l, -TUB), line([pt(0, -TUB + 40), pt(l, -TUB + 40)], THIN2), rect(x - 60, -TUB - 150, x + 60, -TUB - 190), line([pt(x, -TUB - 150), pt(x, -TUB - 100)], { strokeWidth: 1.5 })];
|
|
27543
27867
|
},
|
|
@@ -27545,8 +27869,8 @@ var bathtub = {
|
|
|
27545
27869
|
const w = atLeast(1, width);
|
|
27546
27870
|
return [rect(0, 0, w, -TUB), line([pt(0, -TUB + 40), pt(w, -TUB + 40)], THIN2)];
|
|
27547
27871
|
},
|
|
27548
|
-
build({ length, width, rim }) {
|
|
27549
|
-
const l = atLeast(1,
|
|
27872
|
+
build({ length: length2, width, rim }) {
|
|
27873
|
+
const l = atLeast(1, length2);
|
|
27550
27874
|
const w = atLeast(1, width);
|
|
27551
27875
|
const r = clamp(rim, 1, atLeast(1, Math.min(l, w) / 2 - 25));
|
|
27552
27876
|
const basin = [pt(r, r), pt(l - r, r), pt(l - r, w - r), pt(r, w - r)];
|
|
@@ -27558,6 +27882,66 @@ var bathtub = {
|
|
|
27558
27882
|
];
|
|
27559
27883
|
}
|
|
27560
27884
|
};
|
|
27885
|
+
var curve = (a, b, c) => Array.from({ length: 13 }, (_, i) => {
|
|
27886
|
+
const t = i / 12;
|
|
27887
|
+
return pt((1 - t) ** 2 * a.x + 2 * t * (1 - t) * b.x + t * t * c.x, (1 - t) ** 2 * a.y + 2 * t * (1 - t) * b.y + t * t * c.y);
|
|
27888
|
+
});
|
|
27889
|
+
var MIXER = 1100;
|
|
27890
|
+
var HEAD = 2100;
|
|
27891
|
+
var HIGH = { dash: [30, 20] };
|
|
27892
|
+
var high = (cx, cy, r, style = {}) => ({ kind: "ellipse", cx, cy, rx: r, ry: r, ...style, ...HIGH });
|
|
27893
|
+
var showerHead = {
|
|
27894
|
+
kind: "arch.shower",
|
|
27895
|
+
label: "Shower head",
|
|
27896
|
+
category: "bathroom",
|
|
27897
|
+
description: "Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.",
|
|
27898
|
+
params: [{ key: "type", label: "Type", type: "string", default: "Column", options: ["Column", "Slide rail", "Fixed head"] }],
|
|
27899
|
+
mount: { on: "wall", height: MIXER },
|
|
27900
|
+
build({ type }) {
|
|
27901
|
+
const prims = [rect(-80, 0, 80, 60), circle(-55, 75, 15, THIN2), circle(55, 75, 15, THIN2)];
|
|
27902
|
+
if (type === "Slide rail") prims.push(line([pt(0, 0), pt(0, 30)], THIN2), high(0, 60, 30, THIN2));
|
|
27903
|
+
else if (type === "Fixed head") prims.push(line([pt(0, 0), pt(0, 200)], { ...THIN2, ...HIGH }), high(0, 250, 60));
|
|
27904
|
+
else prims.push(line([pt(0, 0), pt(0, 175)], { ...THIN2, ...HIGH }), high(0, 300, 125), high(0, 300, 85, THIN2));
|
|
27905
|
+
return prims;
|
|
27906
|
+
},
|
|
27907
|
+
// Seen from in front, Y up from the middle of its mixer: the mixer and its two handles, then what rises over it.
|
|
27908
|
+
front: ({ type }) => {
|
|
27909
|
+
const top = MIXER - HEAD;
|
|
27910
|
+
const prims = [rect(-80, 30, 80, -30), circle(-55, 0, 15, THIN2), circle(55, 0, 15, THIN2)];
|
|
27911
|
+
if (type === "Slide rail") {
|
|
27912
|
+
prims.push(
|
|
27913
|
+
line([pt(110, -150), pt(110, -850)], { strokeWidth: 1.5 }),
|
|
27914
|
+
rect(95, -140, 125, -160, THIN2),
|
|
27915
|
+
rect(95, -840, 125, -860, THIN2),
|
|
27916
|
+
// The hand shower on its holder, its hose hanging down to the mixer.
|
|
27917
|
+
roundBox(95, -900, 125, -660, 12),
|
|
27918
|
+
{ kind: "ellipse", cx: 110, cy: -930, rx: 40, ry: 30 },
|
|
27919
|
+
line(curve(pt(110, -660), pt(200, -250), pt(60, 30)), THIN2)
|
|
27920
|
+
);
|
|
27921
|
+
} else if (type === "Fixed head") {
|
|
27922
|
+
prims.push(line([pt(0, top + 100), pt(0, top + 60)], { strokeWidth: 1.5 }), { kind: "ellipse", cx: 0, cy: top + 40, rx: 60, ry: 25 });
|
|
27923
|
+
} else {
|
|
27924
|
+
prims.push(
|
|
27925
|
+
line([pt(0, -30), pt(0, top)], { strokeWidth: 1.5 }),
|
|
27926
|
+
// The overhead shower, flat, at the end of its arm towards the viewer.
|
|
27927
|
+
rect(-125, top - 5, 125, top + 12),
|
|
27928
|
+
// The hand shower hung on the column.
|
|
27929
|
+
roundBox(15, -650, 45, -400, 12),
|
|
27930
|
+
{ kind: "ellipse", cx: 30, cy: -680, rx: 35, ry: 28 }
|
|
27931
|
+
);
|
|
27932
|
+
}
|
|
27933
|
+
return prims;
|
|
27934
|
+
},
|
|
27935
|
+
// Seen from its side, X out from the wall: the mixer, and the arm reaching out to the head.
|
|
27936
|
+
side: ({ type }) => {
|
|
27937
|
+
const top = MIXER - HEAD;
|
|
27938
|
+
const prims = [rect(0, 30, 70, -30), line([pt(70, 0), pt(110, 0)], { strokeWidth: 1.5 })];
|
|
27939
|
+
if (type === "Slide rail") prims.push(line([pt(30, -150), pt(30, -850)], { strokeWidth: 1.5 }), roundBox(30, -900, 70, -660, 12), { kind: "ellipse", cx: 60, cy: -930, rx: 30, ry: 40 });
|
|
27940
|
+
else if (type === "Fixed head") prims.push(line([pt(0, top + 100), pt(250, top + 60)], { strokeWidth: 1.5 }), rect(190, top + 40, 310, top + 70));
|
|
27941
|
+
else prims.push(line([pt(40, -30), pt(40, top), pt(300, top)], { strokeWidth: 1.5 }), rect(175, top, 425, top + 17), roundBox(40, -650, 70, -400, 12));
|
|
27942
|
+
return prims;
|
|
27943
|
+
}
|
|
27944
|
+
};
|
|
27561
27945
|
|
|
27562
27946
|
// packages/ext-architecture/src/compass.ts
|
|
27563
27947
|
var compass = {
|
|
@@ -27592,10 +27976,10 @@ var compass = {
|
|
|
27592
27976
|
var SOFA_BACK = 170;
|
|
27593
27977
|
var SOFA_ARM = 170;
|
|
27594
27978
|
var SOFA_SEAT = 650;
|
|
27595
|
-
function cornerSofaSize({ length, returnLength, depth }) {
|
|
27979
|
+
function cornerSofaSize({ length: length2, returnLength, depth }) {
|
|
27596
27980
|
const d = clamp(depth, 2 * SOFA_BACK + 200, 1500);
|
|
27597
27981
|
const least = d + SOFA_ARM + 300;
|
|
27598
|
-
return { l: atLeast(least,
|
|
27982
|
+
return { l: atLeast(least, length2), r: atLeast(least, returnLength), d, least };
|
|
27599
27983
|
}
|
|
27600
27984
|
var cornerSofa = {
|
|
27601
27985
|
kind: "arch.sofa.corner",
|
|
@@ -27655,7 +28039,7 @@ var cornerSofa = {
|
|
|
27655
28039
|
front: (props) => cornerSofaFront(props),
|
|
27656
28040
|
side: (props) => cornerSofaSide(props)
|
|
27657
28041
|
};
|
|
27658
|
-
var
|
|
28042
|
+
var SEAT2 = 420;
|
|
27659
28043
|
var ARM_TOP = 600;
|
|
27660
28044
|
var BACK_TOP = 850;
|
|
27661
28045
|
var LEGS = 60;
|
|
@@ -27664,12 +28048,12 @@ function sofaFront(x0, x1, armLeft, armRight, seats) {
|
|
|
27664
28048
|
const [a, b] = [x0 + armLeft, x1 - armRight];
|
|
27665
28049
|
const n3 = Math.min(12, count(seats));
|
|
27666
28050
|
const prims = [
|
|
27667
|
-
outline([pt(x0, -LEGS), pt(x1, -LEGS), pt(x1, -ARM_TOP), pt(b, -ARM_TOP), pt(b, -
|
|
28051
|
+
outline([pt(x0, -LEGS), pt(x1, -LEGS), pt(x1, -ARM_TOP), pt(b, -ARM_TOP), pt(b, -SEAT2), pt(a, -SEAT2), pt(a, -ARM_TOP), pt(x0, -ARM_TOP)]),
|
|
27668
28052
|
// The back, over the arms and the seats.
|
|
27669
28053
|
line([pt(x0, -ARM_TOP), pt(x0, -BACK_TOP), pt(x1, -BACK_TOP), pt(x1, -ARM_TOP)]),
|
|
27670
28054
|
...feet(x0, x1)
|
|
27671
28055
|
];
|
|
27672
|
-
for (let i = 1; i < n3; i++) prims.push(line([pt(a + (b - a) * i / n3, -
|
|
28056
|
+
for (let i = 1; i < n3; i++) prims.push(line([pt(a + (b - a) * i / n3, -SEAT2), pt(a + (b - a) * i / n3, -LEGS - 60)], THIN2), line([pt(a + (b - a) * i / n3, -SEAT2 - 20), pt(a + (b - a) * i / n3, -BACK_TOP + 30)], THIN2));
|
|
27673
28057
|
return prims;
|
|
27674
28058
|
}
|
|
27675
28059
|
function sofaSide(d, back) {
|
|
@@ -27747,52 +28131,75 @@ function officeChairPlan() {
|
|
|
27747
28131
|
});
|
|
27748
28132
|
return [band(330, 900, 820, 70, 253, 287), roundBox(92, 150, 568, 590, [60, 60, 110, 110]), roundBox(46, 215, 88, 505, 21), roundBox(572, 215, 614, 505, 21), ...base2.slice(2)];
|
|
27749
28133
|
}
|
|
27750
|
-
var OFFICE = { width: 660
|
|
28134
|
+
var OFFICE = { width: 660 };
|
|
27751
28135
|
var DESK_TOP = 750;
|
|
27752
28136
|
var desk = {
|
|
27753
28137
|
kind: "arch.desk",
|
|
27754
28138
|
label: "Desk",
|
|
27755
28139
|
category: "office",
|
|
27756
|
-
description: "Against the wall
|
|
27757
|
-
params: [{ ...WIDTH, default: 1400 }, DEPTH(700)
|
|
28140
|
+
description: "Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.",
|
|
28141
|
+
params: [{ ...WIDTH, default: 1400 }, DEPTH(700)],
|
|
27758
28142
|
box: sizedBox("width", "depth", 600, 400),
|
|
27759
28143
|
mount: { on: "floor" },
|
|
27760
28144
|
height: () => DESK_TOP,
|
|
27761
|
-
build({ width, depth
|
|
28145
|
+
build({ width, depth }) {
|
|
27762
28146
|
const [w, d] = [atLeast(600, width), atLeast(400, depth)];
|
|
27763
28147
|
const mid2 = w / 2;
|
|
27764
|
-
|
|
28148
|
+
return [
|
|
27765
28149
|
rect(0, 0, w, d),
|
|
27766
28150
|
roundBox(mid2 - 70, 100, mid2 + 70, 180, 20, THIN2),
|
|
27767
28151
|
roundBox(mid2 - 280, 180, mid2 + 280, 212, 12, THIN2),
|
|
27768
28152
|
roundBox(mid2 - 220, d - 320, mid2 + 220, d - 170, 16, THIN2),
|
|
27769
28153
|
{ kind: "ellipse", cx: mid2 + 310, cy: d - 245, rx: 30, ry: 48, strokeWidth: 0.5 }
|
|
27770
28154
|
];
|
|
27771
|
-
if (chair2 !== false) prims.push(...officeChairPlan().map((p) => transformPrimitive(p, { x: mid2 + OFFICE.width / 2, y: d + 20 + OFFICE.depth, rotation: 180 })));
|
|
27772
|
-
return prims;
|
|
27773
28155
|
},
|
|
27774
|
-
front: ({ width
|
|
28156
|
+
front: ({ width }) => {
|
|
27775
28157
|
const w = atLeast(600, width);
|
|
27776
28158
|
const mid2 = w / 2;
|
|
27777
|
-
|
|
27778
|
-
if (chair2 !== false) prims.push(roundBox(mid2 - 240, -520, mid2 + 240, -1050, 40, THIN2), line([pt(mid2, -470), pt(mid2, -90)], { strokeWidth: 1.5 }), line([pt(mid2 - 300, -40), pt(mid2 + 300, -40)], THIN2), circle(mid2 - 300, -20, 20, THIN2), circle(mid2 + 300, -20, 20, THIN2));
|
|
27779
|
-
return prims;
|
|
28159
|
+
return [rect(0, -DESK_TOP + 30, w, -DESK_TOP), rect(0, 0, 30, -DESK_TOP + 30, THIN2), rect(w - 30, 0, w, -DESK_TOP + 30, THIN2), rect(mid2 - 280, -DESK_TOP - 60, mid2 + 280, -DESK_TOP - 380), line([pt(mid2, -DESK_TOP), pt(mid2, -DESK_TOP - 60)])];
|
|
27780
28160
|
},
|
|
27781
|
-
side: ({ depth
|
|
28161
|
+
side: ({ depth }) => {
|
|
27782
28162
|
const d = atLeast(400, depth);
|
|
27783
|
-
|
|
27784
|
-
if (chair2 !== false) {
|
|
27785
|
-
const at2 = d + 20;
|
|
27786
|
-
prims.push(
|
|
27787
|
-
rect(at2 + 60, -470, at2 + OFFICE.depth - 200, -520, THIN2),
|
|
27788
|
-
outline([pt(at2 + OFFICE.depth - 200, -520), pt(at2 + OFFICE.depth - 160, -1050), pt(at2 + OFFICE.depth - 110, -1050), pt(at2 + OFFICE.depth - 150, -520)]),
|
|
27789
|
-
line([pt(at2 + 300, -470), pt(at2 + 300, -90)], { strokeWidth: 1.5 }),
|
|
27790
|
-
line([pt(at2, -40), pt(at2 + OFFICE.depth - 100, -40)], THIN2)
|
|
27791
|
-
);
|
|
27792
|
-
}
|
|
27793
|
-
return prims;
|
|
28163
|
+
return [rect(0, -DESK_TOP + 30, d, -DESK_TOP), rect(0, 0, d, -DESK_TOP + 30, THIN2), rect(120, -DESK_TOP, 140, -DESK_TOP - 380, THIN2)];
|
|
27794
28164
|
}
|
|
27795
28165
|
};
|
|
28166
|
+
var OFFICE_SEAT = 470;
|
|
28167
|
+
var OFFICE_BACK = 1050;
|
|
28168
|
+
var officeChairFront = () => {
|
|
28169
|
+
const mid2 = OFFICE.width / 2;
|
|
28170
|
+
return [
|
|
28171
|
+
roundBox(mid2 - 240, -OFFICE_SEAT - 50, mid2 + 240, -OFFICE_BACK, 40),
|
|
28172
|
+
rect(92, -OFFICE_SEAT, 568, -OFFICE_SEAT - 50),
|
|
28173
|
+
roundBox(46, -OFFICE_SEAT - 180, 88, -OFFICE_SEAT - 220, 15, THIN2),
|
|
28174
|
+
roundBox(572, -OFFICE_SEAT - 180, 614, -OFFICE_SEAT - 220, 15, THIN2),
|
|
28175
|
+
line([pt(67, -OFFICE_SEAT - 180), pt(67, -OFFICE_SEAT - 50)], THIN2),
|
|
28176
|
+
line([pt(593, -OFFICE_SEAT - 180), pt(593, -OFFICE_SEAT - 50)], THIN2),
|
|
28177
|
+
line([pt(mid2, -OFFICE_SEAT), pt(mid2, -90)], { strokeWidth: 1.5 }),
|
|
28178
|
+
line([pt(mid2 - 300, -40), pt(mid2 + 300, -40)], THIN2),
|
|
28179
|
+
circle(mid2 - 300, -20, 20, THIN2),
|
|
28180
|
+
circle(mid2 + 300, -20, 20, THIN2)
|
|
28181
|
+
];
|
|
28182
|
+
};
|
|
28183
|
+
var officeChair = {
|
|
28184
|
+
kind: "arch.officechair",
|
|
28185
|
+
label: "Office chair",
|
|
28186
|
+
category: "office",
|
|
28187
|
+
description: "On five casters, its back at the top. Turn it to face the desk.",
|
|
28188
|
+
params: [],
|
|
28189
|
+
height: () => OFFICE_BACK,
|
|
28190
|
+
build: () => officeChairPlan(),
|
|
28191
|
+
front: () => officeChairFront(),
|
|
28192
|
+
back: () => officeChairFront(),
|
|
28193
|
+
// From its side, its own Y from its back: the back leaning over the seat, the column, the base.
|
|
28194
|
+
side: () => [
|
|
28195
|
+
rect(60, -OFFICE_SEAT, 530, -OFFICE_SEAT - 50, THIN2),
|
|
28196
|
+
outline([pt(200, -OFFICE_SEAT - 50), pt(160, -OFFICE_BACK), pt(110, -OFFICE_BACK), pt(150, -OFFICE_SEAT - 50)]),
|
|
28197
|
+
line([pt(370, -OFFICE_SEAT), pt(370, -90)], { strokeWidth: 1.5 }),
|
|
28198
|
+
line([pt(70, -40), pt(670, -40)], THIN2),
|
|
28199
|
+
circle(70, -20, 20, THIN2),
|
|
28200
|
+
circle(670, -20, 20, THIN2)
|
|
28201
|
+
]
|
|
28202
|
+
};
|
|
27796
28203
|
function cornerSofaFront(props) {
|
|
27797
28204
|
const { l, d } = cornerSofaSize(props);
|
|
27798
28205
|
const prims = [...sofaFront(0, l, d, SOFA_ARM, Math.max(1, Math.round((l - SOFA_ARM - d) / SOFA_SEAT))), line([pt(d, -LEGS), pt(d, -ARM_TOP)], THIN2)];
|
|
@@ -27800,8 +28207,96 @@ function cornerSofaFront(props) {
|
|
|
27800
28207
|
}
|
|
27801
28208
|
function cornerSofaSide(props) {
|
|
27802
28209
|
const { r, d } = cornerSofaSize(props);
|
|
27803
|
-
return [rect(0, -LEGS, d, -ARM_TOP), line([pt(d, -
|
|
27804
|
-
}
|
|
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)];
|
|
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
|
+
};
|
|
27805
28300
|
|
|
27806
28301
|
// packages/ext-architecture/src/heating.ts
|
|
27807
28302
|
var MIN_LENGTH = 200;
|
|
@@ -27846,14 +28341,184 @@ var radiator = {
|
|
|
27846
28341
|
return [outline([pt(30, -RADIATOR_FOOT), pt(30 + d, -RADIATOR_FOOT), pt(30 + d, -RADIATOR_TOP), pt(30, -RADIATOR_TOP)]), line([pt(0, -RADIATOR_FOOT - 80), pt(30, -RADIATOR_FOOT - 80)]), line([pt(0, -RADIATOR_TOP + 80), pt(30, -RADIATOR_TOP + 80)])];
|
|
27847
28342
|
}
|
|
27848
28343
|
};
|
|
28344
|
+
var MIN_UNIT_WIDTH = 400;
|
|
28345
|
+
var MIN_UNIT_DEPTH = 200;
|
|
28346
|
+
var FEET = 60;
|
|
28347
|
+
var heatPump = {
|
|
28348
|
+
kind: "arch.heatpump",
|
|
28349
|
+
label: "Heat pump, outdoor unit",
|
|
28350
|
+
category: "heating",
|
|
28351
|
+
description: "Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.",
|
|
28352
|
+
params: [{ ...WIDTH, default: 900 }, DEPTH(350), HEIGHT(700)],
|
|
28353
|
+
box: sizedBox("width", "depth", MIN_UNIT_WIDTH, MIN_UNIT_DEPTH),
|
|
28354
|
+
mount: { on: "floor" },
|
|
28355
|
+
height: ({ height }) => atLeast(1, height),
|
|
28356
|
+
build({ width, depth }) {
|
|
28357
|
+
const w = atLeast(1, width);
|
|
28358
|
+
const d = atLeast(1, depth);
|
|
28359
|
+
const r = Math.max(10, Math.min(d / 2 - 30, w * 0.3));
|
|
28360
|
+
const fan = w * 0.38;
|
|
28361
|
+
return [
|
|
28362
|
+
outline([pt(0, 0), pt(w, 0), pt(w, d), pt(0, d)]),
|
|
28363
|
+
circle(fan, d / 2, r, THIN2),
|
|
28364
|
+
circle(fan, d / 2, r * 0.25, THIN2),
|
|
28365
|
+
line([pt(w * 0.78, 0), pt(w * 0.78, d)], THIN2)
|
|
28366
|
+
];
|
|
28367
|
+
},
|
|
28368
|
+
front: ({ width, height }) => {
|
|
28369
|
+
const w = atLeast(1, width);
|
|
28370
|
+
const h = Math.max(FEET + 1, height);
|
|
28371
|
+
const body = h - FEET;
|
|
28372
|
+
const r = Math.max(10, Math.min(body / 2 - 40, w * 0.3));
|
|
28373
|
+
return [
|
|
28374
|
+
rect(w * 0.08, 0, w * 0.18, -FEET),
|
|
28375
|
+
rect(w * 0.82, 0, w * 0.92, -FEET),
|
|
28376
|
+
rect(0, -FEET, w, -h),
|
|
28377
|
+
circle(w * 0.38, -FEET - body / 2, r),
|
|
28378
|
+
circle(w * 0.38, -FEET - body / 2, r * 0.25, THIN2),
|
|
28379
|
+
line([pt(w * 0.78, -FEET), pt(w * 0.78, -h)], THIN2)
|
|
28380
|
+
];
|
|
28381
|
+
},
|
|
28382
|
+
side: ({ depth, height }) => {
|
|
28383
|
+
const d = atLeast(1, depth);
|
|
28384
|
+
const h = Math.max(FEET + 1, height);
|
|
28385
|
+
return [rect(d * 0.1, 0, d * 0.9, -FEET), rect(0, -FEET, d, -h)];
|
|
28386
|
+
}
|
|
28387
|
+
};
|
|
28388
|
+
var MIN_BOILER = 250;
|
|
28389
|
+
var FLUE = 150;
|
|
28390
|
+
var gasBoiler = {
|
|
28391
|
+
kind: "arch.boiler",
|
|
28392
|
+
label: "Gas boiler",
|
|
28393
|
+
category: "heating",
|
|
28394
|
+
description: "Hung on the wall by its back, its flue on top. Its height above the floor is that of its underside.",
|
|
28395
|
+
params: [{ ...WIDTH, default: 400 }, DEPTH(300), HEIGHT(700)],
|
|
28396
|
+
box: sizedBox("width", "depth", MIN_BOILER),
|
|
28397
|
+
mount: { on: "wall", height: 1e3, measured: "bottom" },
|
|
28398
|
+
build({ width, depth }) {
|
|
28399
|
+
const w = atLeast(1, width);
|
|
28400
|
+
const d = atLeast(1, depth);
|
|
28401
|
+
const r = Math.min(62, w / 5, d / 4);
|
|
28402
|
+
return [outline([pt(0, 0), pt(w, 0), pt(w, d), pt(0, d)]), circle(w / 2, d * 0.45, r), circle(w / 2, d * 0.45, r * 0.65, THIN2)];
|
|
28403
|
+
},
|
|
28404
|
+
front: ({ width, height }) => {
|
|
28405
|
+
const w = atLeast(1, width);
|
|
28406
|
+
const h = atLeast(1, height);
|
|
28407
|
+
const r = Math.min(62, w / 5);
|
|
28408
|
+
const prims = [rect(0, 0, w, -h), rect(w * 0.2, -40, w * 0.8, -Math.min(140, h / 4), THIN2), rect(w / 2 - r, -h, w / 2 + r, -h - FLUE)];
|
|
28409
|
+
for (let i = 0; i < 5; i++) prims.push(line([pt(w * (0.2 + i * 0.15), 0), pt(w * (0.2 + i * 0.15), 120)], THIN2));
|
|
28410
|
+
return prims;
|
|
28411
|
+
},
|
|
28412
|
+
side: ({ depth, height }) => {
|
|
28413
|
+
const d = atLeast(1, depth);
|
|
28414
|
+
const h = atLeast(1, height);
|
|
28415
|
+
const r = Math.min(62, d / 4);
|
|
28416
|
+
const x = d * 0.45;
|
|
28417
|
+
return [rect(0, 0, d, -h), outline([pt(x - r, -h), pt(x - r, -h - FLUE + r), pt(0, -h - FLUE + r), pt(0, -h - FLUE - r), pt(x + r, -h - FLUE - r), pt(x + r, -h)])];
|
|
28418
|
+
}
|
|
28419
|
+
};
|
|
28420
|
+
var MIN_TANK = 300;
|
|
28421
|
+
var waterHeater = {
|
|
28422
|
+
kind: "arch.waterheater",
|
|
28423
|
+
label: "Water heater",
|
|
28424
|
+
category: "heating",
|
|
28425
|
+
description: "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.",
|
|
28426
|
+
params: [{ key: "diameter", label: "Diameter", type: "number", default: 570, unit: "length" }, HEIGHT(1600)],
|
|
28427
|
+
box: {
|
|
28428
|
+
bounds: ({ diameter }) => ({ left: 0, top: 0, right: atLeast(1, diameter), bottom: atLeast(1, diameter) }),
|
|
28429
|
+
resize: (_, size) => {
|
|
28430
|
+
const given = [size.width, size.height].filter((v) => v !== void 0);
|
|
28431
|
+
return given.length === 0 ? {} : { diameter: Math.round(atLeast(MIN_TANK, Math.max(...given))) };
|
|
28432
|
+
}
|
|
28433
|
+
},
|
|
28434
|
+
mount: { on: "floor" },
|
|
28435
|
+
height: ({ height }) => atLeast(1, height),
|
|
28436
|
+
build({ diameter }) {
|
|
28437
|
+
const r = atLeast(1, diameter) / 2;
|
|
28438
|
+
const pipe2 = Math.min(15, r / 8);
|
|
28439
|
+
return [circle(r, r, r), circle(r, r, Math.max(r * 0.5, r - 50), THIN2), circle(r * 0.76, r * 0.6, pipe2, THIN2), circle(r * 1.24, r * 0.6, pipe2, THIN2)];
|
|
28440
|
+
},
|
|
28441
|
+
front: ({ diameter, height }) => tank(atLeast(1, diameter), atLeast(1, height)),
|
|
28442
|
+
side: ({ diameter, height }) => tank(atLeast(1, diameter), atLeast(1, height))
|
|
28443
|
+
};
|
|
28444
|
+
function tank(d, h) {
|
|
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)];
|
|
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
|
+
};
|
|
27849
28514
|
|
|
27850
28515
|
// packages/ext-architecture/src/bedroom.ts
|
|
27851
28516
|
var TOP = 25;
|
|
27852
|
-
var
|
|
28517
|
+
var FEET2 = 100;
|
|
27853
28518
|
var GAP3 = 3;
|
|
27854
28519
|
var planOf = (w, d) => [outline([pt(0, 0), pt(w, 0), pt(w, d), pt(0, d)]), line([pt(0, Math.max(0, d - 20)), pt(w, Math.max(0, d - 20))], THIN2)];
|
|
27855
28520
|
function onFeet(w, h, inside3) {
|
|
27856
|
-
const feet2 = Math.min(
|
|
28521
|
+
const feet2 = Math.min(FEET2, h / 4);
|
|
27857
28522
|
const foot = Math.min(40, w / 8);
|
|
27858
28523
|
const body = [-feet2, -h + TOP];
|
|
27859
28524
|
return [
|
|
@@ -27865,17 +28530,17 @@ function onFeet(w, h, inside3) {
|
|
|
27865
28530
|
];
|
|
27866
28531
|
}
|
|
27867
28532
|
function onFeetSide(d, h) {
|
|
27868
|
-
const feet2 = Math.min(
|
|
28533
|
+
const feet2 = Math.min(FEET2, h / 4);
|
|
27869
28534
|
const foot = Math.min(40, d / 8);
|
|
27870
28535
|
return [rect(0, -h + TOP, d, -h), rect(0, -feet2, d - 10, -h + TOP), line([pt(d - 30, -feet2), pt(d - 30, -h + TOP)], THIN2), rect(16, 0, 16 + foot, -feet2), rect(d - 26 - foot, 0, d - 26, -feet2)];
|
|
27871
28536
|
}
|
|
27872
28537
|
function drawerGrid(x0, x1, y0, y1, rows, columns) {
|
|
27873
28538
|
const [r, c] = [Math.min(MAX_FRONTS, count(rows)), Math.min(4, count(columns))];
|
|
27874
|
-
const [each,
|
|
28539
|
+
const [each, high2] = [(x1 - x0) / c, (y0 - y1) / r];
|
|
27875
28540
|
const prims = [];
|
|
27876
28541
|
for (let i = 0; i < c; i++) {
|
|
27877
28542
|
for (let k = 0; k < r; k++) {
|
|
27878
|
-
prims.push(...drawer(x0 + i * each + (i > 0 ? GAP3 / 2 : 0), x0 + (i + 1) * each - (i < c - 1 ? GAP3 / 2 : 0), y0 - k *
|
|
28543
|
+
prims.push(...drawer(x0 + i * each + (i > 0 ? GAP3 / 2 : 0), x0 + (i + 1) * each - (i < c - 1 ? GAP3 / 2 : 0), y0 - k * high2 - (k > 0 ? GAP3 / 2 : 0), y0 - (k + 1) * high2 + (k < r - 1 ? GAP3 / 2 : 0)));
|
|
27879
28544
|
}
|
|
27880
28545
|
}
|
|
27881
28546
|
return prims;
|
|
@@ -28330,7 +28995,7 @@ var washingMachine = {
|
|
|
28330
28995
|
return [rect(0, 0, body, -h), roundBox(body, cy + r * 0.8, d, cy - r * 0.8, [0, 12, 12, 0], THIN2)];
|
|
28331
28996
|
}
|
|
28332
28997
|
};
|
|
28333
|
-
var
|
|
28998
|
+
var HIGH2 = [6, 4];
|
|
28334
28999
|
var hood = {
|
|
28335
29000
|
kind: "arch.hood",
|
|
28336
29001
|
label: "Range hood",
|
|
@@ -28348,9 +29013,9 @@ var hood = {
|
|
|
28348
29013
|
const [w, d] = [atLeast(1, width), atLeast(1, depth)];
|
|
28349
29014
|
const half = Math.min(140, w / 4);
|
|
28350
29015
|
const filter = Math.min(90, w / 6, d / 5);
|
|
28351
|
-
const prims = [{ kind: "path", points: [pt(0, 0), pt(w, 0), pt(w, d), pt(0, d)], closed: true, dash:
|
|
28352
|
-
if (style !== "Flat") prims.push({ kind: "path", points: [pt(w / 2 - half, 0), pt(w / 2 + half, 0), pt(w / 2 + half, Math.min(250, d / 2)), pt(w / 2 - half, Math.min(250, d / 2))], closed: true, dash:
|
|
28353
|
-
prims.push({ kind: "ellipse", cx: w / 2, cy: d * 0.6, rx: filter, ry: filter, dash:
|
|
29016
|
+
const prims = [{ kind: "path", points: [pt(0, 0), pt(w, 0), pt(w, d), pt(0, d)], closed: true, dash: HIGH2 }];
|
|
29017
|
+
if (style !== "Flat") prims.push({ kind: "path", points: [pt(w / 2 - half, 0), pt(w / 2 + half, 0), pt(w / 2 + half, Math.min(250, d / 2)), pt(w / 2 - half, Math.min(250, d / 2))], closed: true, dash: HIGH2, strokeWidth: 0.5 });
|
|
29018
|
+
prims.push({ kind: "ellipse", cx: w / 2, cy: d * 0.6, rx: filter, ry: filter, dash: HIGH2, strokeWidth: 0.5 });
|
|
28354
29019
|
return prims;
|
|
28355
29020
|
},
|
|
28356
29021
|
front: ({ width, style, chimney }) => {
|
|
@@ -28400,6 +29065,21 @@ var splashback = {
|
|
|
28400
29065
|
};
|
|
28401
29066
|
|
|
28402
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
|
+
};
|
|
28403
29083
|
var door2 = {
|
|
28404
29084
|
kind: "arch.door",
|
|
28405
29085
|
category: "architecture",
|
|
@@ -28408,43 +29088,75 @@ var door2 = {
|
|
|
28408
29088
|
params: [
|
|
28409
29089
|
WIDTH,
|
|
28410
29090
|
HEIGHT(2040),
|
|
28411
|
-
{ key: "type", label: "Type", type: "string", default: "Single", options: ["Single", "Double", "Sliding", "Opening only"] },
|
|
28412
|
-
{ key: "hinge", label: "Hinge", type: "string", default: "Left", options: ["Left", "Right"] },
|
|
28413
|
-
{ 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" },
|
|
28414
29096
|
OTHER_SIDE
|
|
28415
29097
|
],
|
|
28416
29098
|
opening: ({ width }) => ({ from: 0, to: atLeast(1, width) }),
|
|
28417
29099
|
size: { x: "width" },
|
|
28418
|
-
build({ width, type, hinge, angle, flip }, env) {
|
|
29100
|
+
build({ width, type, hinge, angle, slide, leaves, flip }, env) {
|
|
28419
29101
|
const w = atLeast(1, width);
|
|
28420
29102
|
const h = (env.wallThickness ?? LOOSE_WALL) / 2;
|
|
28421
29103
|
const open2 = clamp(angle, 5, 180);
|
|
28422
|
-
const leaf = (hingeX,
|
|
29104
|
+
const leaf = (hingeX, length2, dir) => {
|
|
28423
29105
|
const hingePoint = pt(hingeX, h);
|
|
28424
29106
|
const closed = dir === 1 ? 0 : 180;
|
|
28425
29107
|
const opened = closed + dir * open2;
|
|
28426
|
-
const tip2 = arcPoints(hingePoint,
|
|
28427
|
-
return [line([hingePoint, tip2], HEAVY), line(arcPoints(hingePoint,
|
|
29108
|
+
const tip2 = arcPoints(hingePoint, length2, opened, opened, 1)[0];
|
|
29109
|
+
return [line([hingePoint, tip2], HEAVY), line(arcPoints(hingePoint, length2, closed, opened), THIN2)];
|
|
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)];
|
|
28428
29117
|
};
|
|
28429
29118
|
let prims = [line([pt(0, -h), pt(w, -h)], THIN2), line([pt(0, h), pt(w, h)], THIN2)];
|
|
28430
29119
|
if (type === "Single") prims.push(...leaf(0, w, 1));
|
|
28431
29120
|
else if (type === "Double") prims.push(...leaf(0, w / 2, 1), ...leaf(w, w / 2, -1));
|
|
28432
|
-
else if (type === "Sliding")
|
|
28433
|
-
|
|
28434
|
-
|
|
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
|
+
}
|
|
28435
29139
|
}
|
|
28436
|
-
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);
|
|
28437
29142
|
return flip ? mirrorAcross(prims) : prims;
|
|
28438
29143
|
},
|
|
28439
29144
|
// Seen from in front: its frame from the floor to its height, the leaves, and a handle on the side that opens.
|
|
28440
|
-
front({ width, height, type, hinge }) {
|
|
29145
|
+
front({ width, height, type, hinge, slide, leaves }) {
|
|
28441
29146
|
const w = atLeast(1, width);
|
|
28442
29147
|
const top = -atLeast(1, height);
|
|
28443
|
-
|
|
28444
|
-
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)])];
|
|
28445
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);
|
|
28446
29151
|
if (type === "Single") prims.push(hinge === "Right" ? handle(80, 1) : handle(w - 80, -1));
|
|
28447
|
-
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);
|
|
28448
29160
|
return prims;
|
|
28449
29161
|
}
|
|
28450
29162
|
};
|
|
@@ -28652,6 +29364,10 @@ var spiralStair = {
|
|
|
28652
29364
|
|
|
28653
29365
|
// packages/ext-architecture/src/translations.ts
|
|
28654
29366
|
var translations = {
|
|
29367
|
+
// English needs only what its value does not say well.
|
|
29368
|
+
en: {
|
|
29369
|
+
"Type: Sliding": "Sliding patio door"
|
|
29370
|
+
},
|
|
28655
29371
|
fr: {
|
|
28656
29372
|
Hob: "Plaque de cuisson",
|
|
28657
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.",
|
|
@@ -28678,7 +29394,7 @@ var translations = {
|
|
|
28678
29394
|
"Double washbasin": "Lavabo double vasque",
|
|
28679
29395
|
Depth: "Profondeur",
|
|
28680
29396
|
Bowls: "Vasques",
|
|
28681
|
-
"A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Un plan avec ses vasques. Tirez ses c\xF4t\xE9s pour l\u2019allonger ou l\u2019approfondir : les vasques et les robinets gardent leur taille.",
|
|
29397
|
+
"A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Un plan avec ses vasques et, dessous, un meuble \xE0 tiroirs ou \xE0 portes, suspendu ou sur pieds, ou aucun. Tirez ses c\xF4t\xE9s pour l\u2019allonger ou l\u2019approfondir : les vasques et les robinets gardent leur taille.",
|
|
28682
29398
|
Triple: "Triple",
|
|
28683
29399
|
"Glazing: Single": "Simple",
|
|
28684
29400
|
"Glazing: Double": "Double",
|
|
@@ -28722,12 +29438,42 @@ var translations = {
|
|
|
28722
29438
|
Double: "Double",
|
|
28723
29439
|
Sliding: "Coulissante",
|
|
28724
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",
|
|
28725
29447
|
Left: "Gauche",
|
|
28726
29448
|
Right: "Droite",
|
|
28727
29449
|
"Insert 4 \xD7 3 m room": "Ins\xE9rer une pi\xE8ce de 4 \xD7 3 m",
|
|
28728
29450
|
Radiator: "Radiateur",
|
|
28729
29451
|
"Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "Contre le mur par son dos. Tirez ses c\xF4t\xE9s pour l\u2019allonger : ses \xE9l\xE9ments gardent leur largeur. Son robinet est \xE0 un bout.",
|
|
28730
29452
|
Valve: "Robinet",
|
|
29453
|
+
"On feet": "Sur pieds",
|
|
29454
|
+
"Shower head": "Pommeau de douche",
|
|
29455
|
+
"Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "Fix\xE9 au mur \xE0 la hauteur de son mitigeur : une colonne avec une douche de t\xEAte, une barre de douche avec sa douchette, ou une t\xEAte sur son bras. Au-dessus d\u2019un receveur ou d\u2019une baignoire.",
|
|
29456
|
+
"Column": "Colonne",
|
|
29457
|
+
"Slide rail": "Barre de douche",
|
|
29458
|
+
"Fixed head": "T\xEAte fixe",
|
|
29459
|
+
Toilet: "WC",
|
|
29460
|
+
"Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "Son r\xE9servoir va contre le mur. Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir ou l\u2019approfondir.",
|
|
29461
|
+
"Toilet, wall-hung": "WC suspendu",
|
|
29462
|
+
"Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "Son dos va contre le mur, son r\xE9servoir dans le mur. Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir ou l\u2019approfondir.",
|
|
29463
|
+
"Shower tray": "Receveur de douche",
|
|
29464
|
+
"Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "Contre le mur par un c\xF4t\xE9. Tirez ses c\xF4t\xE9s pour l\u2019agrandir : son rebord et sa bonde gardent leur taille.",
|
|
29465
|
+
"Heat pump, outdoor unit": "Pompe \xE0 chaleur, unit\xE9 ext\xE9rieure",
|
|
29466
|
+
"Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "Contre un mur ext\xE9rieur par son dos. Tirez ses c\xF4t\xE9s pour l\u2019allonger ou l\u2019approfondir. Donnez-lui une hauteur au-dessus du sol pour la poser sur des consoles.",
|
|
29467
|
+
"Gas boiler": "Chaudi\xE8re gaz",
|
|
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.",
|
|
29469
|
+
"Water heater": "Chauffe-eau",
|
|
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",
|
|
29476
|
+
Diameter: "Diam\xE8tre",
|
|
28731
29477
|
"Base unit": "Meuble bas",
|
|
28732
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.",
|
|
28733
29479
|
Below: "Dessous",
|
|
@@ -28769,12 +29515,23 @@ var translations = {
|
|
|
28769
29515
|
Sofa: "Canap\xE9",
|
|
28770
29516
|
Armchair: "Fauteuil",
|
|
28771
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",
|
|
28772
29528
|
Desk: "Bureau",
|
|
28773
29529
|
Seats: "Places",
|
|
28774
29530
|
"Office chair": "Chaise de bureau",
|
|
28775
29531
|
"Its back goes against the wall. Pull its sides to make it wider or deeper.": "Son dossier va contre le mur. Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir ou l\u2019approfondir.",
|
|
28776
29532
|
"Its back at the top. Turn it to face the table.": "Son dossier en haut. Tournez-la face \xE0 la table.",
|
|
28777
|
-
"Against the wall
|
|
29533
|
+
"Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "Contre le mur. Tirez ses c\xF4t\xE9s pour l\u2019\xE9largir ou l\u2019approfondir. Sa chaise de bureau est un objet \xE0 part.",
|
|
29534
|
+
"On five casters, its back at the top. Turn it to face the desk.": "Sur cinq roulettes, son dossier en haut. Tournez-la face au bureau."
|
|
28778
29535
|
},
|
|
28779
29536
|
es: {
|
|
28780
29537
|
Hob: "Placa de cocci\xF3n",
|
|
@@ -28802,7 +29559,7 @@ var translations = {
|
|
|
28802
29559
|
"Double washbasin": "Lavabo doble",
|
|
28803
29560
|
Depth: "Fondo",
|
|
28804
29561
|
Bowls: "Senos",
|
|
28805
|
-
"A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Una encimera con sus senos. Tire de sus lados para alargarla o hacerla m\xE1s profunda: los senos y los grifos conservan su tama\xF1o.",
|
|
29562
|
+
"A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Una encimera con sus senos y, debajo, un mueble con cajones o puertas, suspendido o sobre patas, o ninguno. Tire de sus lados para alargarla o hacerla m\xE1s profunda: los senos y los grifos conservan su tama\xF1o.",
|
|
28806
29563
|
Triple: "Triple",
|
|
28807
29564
|
"Glazing: Single": "Simple",
|
|
28808
29565
|
"Glazing: Double": "Doble",
|
|
@@ -28846,12 +29603,42 @@ var translations = {
|
|
|
28846
29603
|
Double: "Doble",
|
|
28847
29604
|
Sliding: "Corredera",
|
|
28848
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",
|
|
28849
29612
|
Left: "Izquierda",
|
|
28850
29613
|
Right: "Derecha",
|
|
28851
29614
|
"Insert 4 \xD7 3 m room": "Insertar una habitaci\xF3n de 4 \xD7 3 m",
|
|
28852
29615
|
Radiator: "Radiador",
|
|
28853
29616
|
"Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "Contra la pared por su parte trasera. Tire de sus lados para alargarlo: sus elementos conservan su anchura. Su llave est\xE1 en un extremo.",
|
|
28854
29617
|
Valve: "Llave",
|
|
29618
|
+
"On feet": "Sobre patas",
|
|
29619
|
+
"Shower head": "Rociador de ducha",
|
|
29620
|
+
"Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "Fijado a la pared a la altura de su mezclador: una columna con rociador de techo, una barra con su teleducha, o un rociador en su brazo. Sobre un plato de ducha o una ba\xF1era.",
|
|
29621
|
+
"Column": "Columna",
|
|
29622
|
+
"Slide rail": "Barra de ducha",
|
|
29623
|
+
"Fixed head": "Rociador fijo",
|
|
29624
|
+
Toilet: "Inodoro",
|
|
29625
|
+
"Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "Su cisterna va contra la pared. Tire de sus lados para hacerlo m\xE1s ancho o m\xE1s profundo.",
|
|
29626
|
+
"Toilet, wall-hung": "Inodoro suspendido",
|
|
29627
|
+
"Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "Su parte trasera va contra la pared, con la cisterna empotrada. Tire de sus lados para hacerlo m\xE1s ancho o m\xE1s profundo.",
|
|
29628
|
+
"Shower tray": "Plato de ducha",
|
|
29629
|
+
"Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "Contra la pared por un lado. Tire de sus lados para agrandarlo: su borde y su desag\xFCe conservan su tama\xF1o.",
|
|
29630
|
+
"Heat pump, outdoor unit": "Bomba de calor, unidad exterior",
|
|
29631
|
+
"Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "Contra una pared exterior por su parte trasera. Tire de sus lados para alargarla o hacerla m\xE1s profunda. Dele una altura sobre el suelo para ponerla sobre soportes.",
|
|
29632
|
+
"Gas boiler": "Caldera de gas",
|
|
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.",
|
|
29634
|
+
"Water heater": "Calentador de agua",
|
|
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",
|
|
29641
|
+
Diameter: "Di\xE1metro",
|
|
28855
29642
|
"Base unit": "Mueble bajo",
|
|
28856
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.",
|
|
28857
29644
|
Below: "Debajo",
|
|
@@ -28893,12 +29680,23 @@ var translations = {
|
|
|
28893
29680
|
Sofa: "Sof\xE1",
|
|
28894
29681
|
Armchair: "Sill\xF3n",
|
|
28895
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",
|
|
28896
29693
|
Desk: "Escritorio",
|
|
28897
29694
|
Seats: "Plazas",
|
|
28898
29695
|
"Office chair": "Silla de oficina",
|
|
28899
29696
|
"Its back goes against the wall. Pull its sides to make it wider or deeper.": "Su respaldo va contra la pared. Tire de sus lados para ensancharlo o hacerlo m\xE1s profundo.",
|
|
28900
29697
|
"Its back at the top. Turn it to face the table.": "Su respaldo arriba. G\xEDrela hacia la mesa.",
|
|
28901
|
-
"Against the wall
|
|
29698
|
+
"Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "Contra la pared. Tire de sus lados para ensancharlo o hacerlo m\xE1s profundo. Su silla de oficina es un objeto aparte.",
|
|
29699
|
+
"On five casters, its back at the top. Turn it to face the desk.": "Sobre cinco ruedas, su respaldo arriba. G\xEDrela hacia el escritorio."
|
|
28902
29700
|
},
|
|
28903
29701
|
de: {
|
|
28904
29702
|
Hob: "Kochfeld",
|
|
@@ -28926,7 +29724,7 @@ var translations = {
|
|
|
28926
29724
|
"Double washbasin": "Doppelwaschbecken",
|
|
28927
29725
|
Depth: "Tiefe",
|
|
28928
29726
|
Bowls: "Becken",
|
|
28929
|
-
"A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Eine Platte mit ihren Becken. Ziehen Sie an den Seiten, um sie l\xE4nger oder tiefer zu machen: Becken und Armaturen behalten ihre Gr\xF6\xDFe.",
|
|
29727
|
+
"A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Eine Platte mit ihren Becken und darunter ein Unterschrank mit Schubladen oder T\xFCren, h\xE4ngend oder auf F\xFC\xDFen, oder keiner. Ziehen Sie an den Seiten, um sie l\xE4nger oder tiefer zu machen: Becken und Armaturen behalten ihre Gr\xF6\xDFe.",
|
|
28930
29728
|
Triple: "Dreifach",
|
|
28931
29729
|
"Glazing: Single": "Einfach",
|
|
28932
29730
|
"Glazing: Double": "Zweifach",
|
|
@@ -28970,12 +29768,42 @@ var translations = {
|
|
|
28970
29768
|
Double: "Zweifl\xFCgelig",
|
|
28971
29769
|
Sliding: "Schiebet\xFCr",
|
|
28972
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",
|
|
28973
29777
|
Left: "Links",
|
|
28974
29778
|
Right: "Rechts",
|
|
28975
29779
|
"Insert 4 \xD7 3 m room": "Raum 4 \xD7 3 m einf\xFCgen",
|
|
28976
29780
|
Radiator: "Heizk\xF6rper",
|
|
28977
29781
|
"Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "Mit der R\xFCckseite an der Wand. Ziehen Sie an den Seiten, um ihn zu verl\xE4ngern: Seine Glieder behalten ihre Breite. Das Ventil sitzt an einem Ende.",
|
|
28978
29782
|
Valve: "Ventil",
|
|
29783
|
+
"On feet": "Auf F\xFC\xDFen",
|
|
29784
|
+
"Shower head": "Duschkopf",
|
|
29785
|
+
"Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "An der Wand in der H\xF6he seiner Armatur befestigt: eine Duschs\xE4ule mit Kopfbrause, eine Brausestange mit Handbrause oder ein Kopf an seinem Arm. \xDCber einer Duschwanne oder Badewanne.",
|
|
29786
|
+
"Column": "Duschs\xE4ule",
|
|
29787
|
+
"Slide rail": "Brausestange",
|
|
29788
|
+
"Fixed head": "Fester Kopf",
|
|
29789
|
+
Toilet: "WC",
|
|
29790
|
+
"Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "Der Sp\xFClkasten steht an der Wand. Ziehen Sie an den Seiten, um es breiter oder tiefer zu machen.",
|
|
29791
|
+
"Toilet, wall-hung": "Wand-WC",
|
|
29792
|
+
"Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "Die R\xFCckseite liegt an der Wand, der Sp\xFClkasten in der Wand. Ziehen Sie an den Seiten, um es breiter oder tiefer zu machen.",
|
|
29793
|
+
"Shower tray": "Duschwanne",
|
|
29794
|
+
"Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "Mit einer Seite an der Wand. Ziehen Sie an den Seiten, um sie zu vergr\xF6\xDFern: Rand und Ablauf behalten ihre Gr\xF6\xDFe.",
|
|
29795
|
+
"Heat pump, outdoor unit": "W\xE4rmepumpe, Au\xDFenger\xE4t",
|
|
29796
|
+
"Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "Mit der R\xFCckseite an einer Au\xDFenwand. Ziehen Sie an den Seiten, um es l\xE4nger oder tiefer zu machen. Geben Sie ihm eine H\xF6he \xFCber dem Boden, um es auf Konsolen zu setzen.",
|
|
29797
|
+
"Gas boiler": "Gasheizkessel",
|
|
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.",
|
|
29799
|
+
"Water heater": "Warmwasserspeicher",
|
|
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",
|
|
29806
|
+
Diameter: "Durchmesser",
|
|
28979
29807
|
"Base unit": "Unterschrank",
|
|
28980
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.",
|
|
28981
29809
|
Below: "Darunter",
|
|
@@ -29017,12 +29845,23 @@ var translations = {
|
|
|
29017
29845
|
Sofa: "Sofa",
|
|
29018
29846
|
Armchair: "Sessel",
|
|
29019
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",
|
|
29020
29858
|
Desk: "Schreibtisch",
|
|
29021
29859
|
Seats: "Sitzpl\xE4tze",
|
|
29022
29860
|
"Office chair": "B\xFCrostuhl",
|
|
29023
29861
|
"Its back goes against the wall. Pull its sides to make it wider or deeper.": "Seine R\xFCckenlehne steht an der Wand. Ziehen Sie an seinen Seiten, um es breiter oder tiefer zu machen.",
|
|
29024
29862
|
"Its back at the top. Turn it to face the table.": "Die Lehne oben. Drehen Sie ihn zum Tisch.",
|
|
29025
|
-
"Against the wall
|
|
29863
|
+
"Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "An der Wand. Ziehen Sie an seinen Seiten, um ihn breiter oder tiefer zu machen. Sein B\xFCrostuhl ist ein eigenes Objekt.",
|
|
29864
|
+
"On five casters, its back at the top. Turn it to face the desk.": "Auf f\xFCnf Rollen, die Lehne oben. Drehen Sie ihn zum Schreibtisch."
|
|
29026
29865
|
},
|
|
29027
29866
|
zh: {
|
|
29028
29867
|
Hob: "\u7076\u53F0",
|
|
@@ -29050,7 +29889,7 @@ var translations = {
|
|
|
29050
29889
|
"Double washbasin": "\u53CC\u76C6\u6D17\u624B\u53F0",
|
|
29051
29890
|
Depth: "\u8FDB\u6DF1",
|
|
29052
29891
|
Bowls: "\u76C6\u6570",
|
|
29053
|
-
"A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "\u5E26\u76C6\u7684\u53F0\u9762\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u52A0\u957F\u6216\u52A0\u6DF1\uFF1A\u76C6\u548C\u6C34\u9F99\u5934\u4FDD\u6301\u539F\u5C3A\u5BF8\u3002",
|
|
29892
|
+
"A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "\u5E26\u76C6\u7684\u53F0\u9762\uFF0C\u4E0B\u65B9\u53EF\u914D\u62BD\u5C49\u6216\u95E8\u7684\u6D74\u5BA4\u67DC\uFF0C\u60AC\u6302\u6216\u843D\u5730\u5E26\u811A\uFF0C\u6216\u4E0D\u914D\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u52A0\u957F\u6216\u52A0\u6DF1\uFF1A\u76C6\u548C\u6C34\u9F99\u5934\u4FDD\u6301\u539F\u5C3A\u5BF8\u3002",
|
|
29054
29893
|
Triple: "\u4E09\u5C42",
|
|
29055
29894
|
"Glazing: Single": "\u5355\u5C42",
|
|
29056
29895
|
"Glazing: Double": "\u53CC\u5C42",
|
|
@@ -29094,12 +29933,42 @@ var translations = {
|
|
|
29094
29933
|
Double: "\u53CC\u6247",
|
|
29095
29934
|
Sliding: "\u63A8\u62C9",
|
|
29096
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",
|
|
29097
29942
|
Left: "\u5DE6",
|
|
29098
29943
|
Right: "\u53F3",
|
|
29099
29944
|
"Insert 4 \xD7 3 m room": "\u63D2\u5165 4 \xD7 3 \u7C73\u7684\u623F\u95F4",
|
|
29100
29945
|
Radiator: "\u6696\u6C14\u7247",
|
|
29101
29946
|
"Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "\u80CC\u9762\u9760\u5899\u3002\u62D6\u52A8\u4E24\u4FA7\u53EF\u5C06\u5176\u52A0\u957F\uFF0C\u5404\u7247\u5BBD\u5EA6\u4E0D\u53D8\u3002\u9600\u95E8\u5728\u4E00\u7AEF\u3002",
|
|
29102
29947
|
Valve: "\u9600\u95E8",
|
|
29948
|
+
"On feet": "\u843D\u5730\u5E26\u811A",
|
|
29949
|
+
"Shower head": "\u82B1\u6D12",
|
|
29950
|
+
"Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "\u6309\u6DF7\u6C34\u9600\u9AD8\u5EA6\u56FA\u5B9A\u5728\u5899\u4E0A\uFF1A\u5E26\u9876\u55B7\u7684\u82B1\u6D12\u67F1\u3001\u5E26\u624B\u6301\u82B1\u6D12\u7684\u5347\u964D\u6746\uFF0C\u6216\u88C5\u5728\u81C2\u4E0A\u7684\u56FA\u5B9A\u82B1\u6D12\u3002\u7528\u4E8E\u6DCB\u6D74\u5E95\u76D8\u6216\u6D74\u7F38\u4E0A\u65B9\u3002",
|
|
29951
|
+
"Column": "\u82B1\u6D12\u67F1",
|
|
29952
|
+
"Slide rail": "\u5347\u964D\u6746",
|
|
29953
|
+
"Fixed head": "\u56FA\u5B9A\u82B1\u6D12",
|
|
29954
|
+
Toilet: "\u5750\u4FBF\u5668",
|
|
29955
|
+
"Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "\u6C34\u7BB1\u9760\u5899\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u52A0\u5BBD\u6216\u52A0\u6DF1\u3002",
|
|
29956
|
+
"Toilet, wall-hung": "\u58C1\u6302\u5F0F\u5750\u4FBF\u5668",
|
|
29957
|
+
"Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "\u80CC\u9762\u9760\u5899\uFF0C\u6C34\u7BB1\u5D4C\u5728\u5899\u5185\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u52A0\u5BBD\u6216\u52A0\u6DF1\u3002",
|
|
29958
|
+
"Shower tray": "\u6DCB\u6D74\u5E95\u76D8",
|
|
29959
|
+
"Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "\u4E00\u4FA7\u9760\u5899\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u653E\u5927\uFF1A\u8FB9\u6CBF\u548C\u5730\u6F0F\u4FDD\u6301\u5C3A\u5BF8\u3002",
|
|
29960
|
+
"Heat pump, outdoor unit": "\u70ED\u6CF5\u5BA4\u5916\u673A",
|
|
29961
|
+
"Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "\u80CC\u9762\u9760\u5916\u5899\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u52A0\u957F\u6216\u52A0\u6DF1\u3002\u8BBE\u7F6E\u79BB\u5730\u9AD8\u5EA6\u5373\u53EF\u653E\u5728\u652F\u67B6\u4E0A\u3002",
|
|
29962
|
+
"Gas boiler": "\u71C3\u6C14\u9505\u7089",
|
|
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",
|
|
29964
|
+
"Water heater": "\u70ED\u6C34\u5668",
|
|
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",
|
|
29971
|
+
Diameter: "\u76F4\u5F84",
|
|
29103
29972
|
"Base unit": "\u5730\u67DC",
|
|
29104
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",
|
|
29105
29974
|
Below: "\u4E0B\u65B9",
|
|
@@ -29141,12 +30010,23 @@ var translations = {
|
|
|
29141
30010
|
Sofa: "\u6C99\u53D1",
|
|
29142
30011
|
Armchair: "\u6276\u624B\u6905",
|
|
29143
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",
|
|
29144
30023
|
Desk: "\u4E66\u684C",
|
|
29145
30024
|
Seats: "\u5EA7\u4F4D",
|
|
29146
30025
|
"Office chair": "\u529E\u516C\u6905",
|
|
29147
30026
|
"Its back goes against the wall. Pull its sides to make it wider or deeper.": "\u9760\u80CC\u8D34\u5899\u653E\u7F6E\u3002\u62D6\u52A8\u4E24\u4FA7\u53EF\u52A0\u5BBD\u6216\u52A0\u6DF1\u3002",
|
|
29148
30027
|
"Its back at the top. Turn it to face the table.": "\u9760\u80CC\u5728\u4E0A\u65B9\u3002\u65CB\u8F6C\u4F7F\u5176\u9762\u5411\u684C\u5B50\u3002",
|
|
29149
|
-
"Against the wall
|
|
30028
|
+
"Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "\u9760\u5899\u3002\u62D6\u52A8\u5176\u8FB9\u53EF\u52A0\u5BBD\u6216\u52A0\u6DF1\u3002\u529E\u516C\u6905\u662F\u5355\u72EC\u7684\u5BF9\u8C61\u3002",
|
|
30029
|
+
"On five casters, its back at the top. Turn it to face the desk.": "\u4E94\u4E2A\u811A\u8F6E\uFF0C\u9760\u80CC\u671D\u4E0A\u3002\u5C06\u5176\u8F6C\u5411\u4E66\u684C\u3002"
|
|
29150
30030
|
},
|
|
29151
30031
|
ja: {
|
|
29152
30032
|
Hob: "\u30B3\u30F3\u30ED",
|
|
@@ -29174,7 +30054,7 @@ var translations = {
|
|
|
29174
30054
|
"Double washbasin": "\u30C0\u30D6\u30EB\u30DC\u30A6\u30EB\u6D17\u9762\u53F0",
|
|
29175
30055
|
Depth: "\u5965\u884C\u304D",
|
|
29176
30056
|
Bowls: "\u30DC\u30A6\u30EB\u6570",
|
|
29177
|
-
"A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "\u30DC\u30A6\u30EB\u4ED8\u304D\u306E\u30AB\u30A6\u30F3\u30BF\u30FC\u3002\u8FBA\u3092\u5F15\u304F\u3068\u9577\u304F\u30FB\u6DF1\u304F\u306A\u308A\u3001\u30DC\u30A6\u30EB\u3068\u6C34\u6813\u306E\u5927\u304D\u3055\u306F\u5909\u308F\u308A\u307E\u305B\u3093\u3002",
|
|
30057
|
+
"A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "\u30DC\u30A6\u30EB\u4ED8\u304D\u306E\u30AB\u30A6\u30F3\u30BF\u30FC\u3002\u4E0B\u306B\u5F15\u304D\u51FA\u3057\u304B\u6249\u306E\u6D17\u9762\u53F0\u4E0B\u53CE\u7D0D\u3092\u3001\u58C1\u639B\u3051\u304B\u811A\u4ED8\u304D\u3067\u4ED8\u3051\u3089\u308C\u307E\u3059\uFF08\u306A\u3057\u3082\u53EF\uFF09\u3002\u8FBA\u3092\u5F15\u304F\u3068\u9577\u304F\u30FB\u6DF1\u304F\u306A\u308A\u3001\u30DC\u30A6\u30EB\u3068\u6C34\u6813\u306E\u5927\u304D\u3055\u306F\u5909\u308F\u308A\u307E\u305B\u3093\u3002",
|
|
29178
30058
|
Triple: "\u4E09\u5C64",
|
|
29179
30059
|
"Glazing: Single": "\u5358\u677F",
|
|
29180
30060
|
"Glazing: Double": "\u8907\u5C64",
|
|
@@ -29218,12 +30098,42 @@ var translations = {
|
|
|
29218
30098
|
Double: "\u4E21\u958B\u304D",
|
|
29219
30099
|
Sliding: "\u5F15\u304D\u6238",
|
|
29220
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",
|
|
29221
30107
|
Left: "\u5DE6",
|
|
29222
30108
|
Right: "\u53F3",
|
|
29223
30109
|
"Insert 4 \xD7 3 m room": "4 \xD7 3 m \u306E\u90E8\u5C4B\u3092\u633F\u5165",
|
|
29224
30110
|
Radiator: "\u30E9\u30B8\u30A8\u30FC\u30BF\u30FC",
|
|
29225
30111
|
"Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "\u80CC\u9762\u3092\u58C1\u306B\u4ED8\u3051\u3066\u7F6E\u304D\u307E\u3059\u3002\u5074\u9762\u3092\u5F15\u304F\u3068\u9577\u304F\u306A\u308A\u3001\u5404\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u5E45\u306F\u5909\u308F\u308A\u307E\u305B\u3093\u3002\u30D0\u30EB\u30D6\u306F\u4E00\u65B9\u306E\u7AEF\u306B\u3042\u308A\u307E\u3059\u3002",
|
|
29226
30112
|
Valve: "\u30D0\u30EB\u30D6",
|
|
30113
|
+
"On feet": "\u811A\u4ED8\u304D",
|
|
30114
|
+
"Shower head": "\u30B7\u30E3\u30EF\u30FC\u30D8\u30C3\u30C9",
|
|
30115
|
+
"Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "\u6DF7\u5408\u6C34\u6813\u306E\u9AD8\u3055\u3067\u58C1\u306B\u53D6\u308A\u4ED8\u3051\u307E\u3059\u3002\u30AA\u30FC\u30D0\u30FC\u30D8\u30C3\u30C9\u30B7\u30E3\u30EF\u30FC\u4ED8\u304D\u306E\u30B7\u30E3\u30EF\u30FC\u30D0\u30FC\u3001\u30CF\u30F3\u30C9\u30B7\u30E3\u30EF\u30FC\u4ED8\u304D\u306E\u30B9\u30E9\u30A4\u30C9\u30D0\u30FC\u3001\u307E\u305F\u306F\u30A2\u30FC\u30E0\u4ED8\u304D\u306E\u56FA\u5B9A\u30D8\u30C3\u30C9\u3002\u30B7\u30E3\u30EF\u30FC\u30D1\u30F3\u3084\u6D74\u69FD\u306E\u4E0A\u306B\u3002",
|
|
30116
|
+
"Column": "\u30B7\u30E3\u30EF\u30FC\u30D0\u30FC",
|
|
30117
|
+
"Slide rail": "\u30B9\u30E9\u30A4\u30C9\u30D0\u30FC",
|
|
30118
|
+
"Fixed head": "\u56FA\u5B9A\u30D8\u30C3\u30C9",
|
|
30119
|
+
Toilet: "\u4FBF\u5668",
|
|
30120
|
+
"Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "\u30BF\u30F3\u30AF\u3092\u58C1\u306B\u4ED8\u3051\u307E\u3059\u3002\u8FBA\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u5E45\u3084\u5965\u884C\u304D\u3092\u5909\u3048\u307E\u3059\u3002",
|
|
30121
|
+
"Toilet, wall-hung": "\u58C1\u639B\u3051\u4FBF\u5668",
|
|
30122
|
+
"Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "\u80CC\u9762\u3092\u58C1\u306B\u4ED8\u3051\u3001\u30BF\u30F3\u30AF\u306F\u58C1\u306E\u4E2D\u3067\u3059\u3002\u8FBA\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u5E45\u3084\u5965\u884C\u304D\u3092\u5909\u3048\u307E\u3059\u3002",
|
|
30123
|
+
"Shower tray": "\u30B7\u30E3\u30EF\u30FC\u30D1\u30F3",
|
|
30124
|
+
"Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "\u4E00\u8FBA\u3092\u58C1\u306B\u4ED8\u3051\u307E\u3059\u3002\u8FBA\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u5927\u304D\u304F\u3057\u307E\u3059\u3002\u7E01\u3068\u6392\u6C34\u53E3\u306E\u5927\u304D\u3055\u306F\u5909\u308F\u308A\u307E\u305B\u3093\u3002",
|
|
30125
|
+
"Heat pump, outdoor unit": "\u30D2\u30FC\u30C8\u30DD\u30F3\u30D7\u5BA4\u5916\u6A5F",
|
|
30126
|
+
"Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "\u80CC\u9762\u3092\u5916\u58C1\u306B\u4ED8\u3051\u307E\u3059\u3002\u8FBA\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u9577\u3055\u3084\u5965\u884C\u304D\u3092\u5909\u3048\u307E\u3059\u3002\u5E8A\u304B\u3089\u306E\u9AD8\u3055\u3092\u6307\u5B9A\u3059\u308B\u3068\u67B6\u53F0\u306B\u8F09\u305B\u3089\u308C\u307E\u3059\u3002",
|
|
30127
|
+
"Gas boiler": "\u30AC\u30B9\u30DC\u30A4\u30E9\u30FC",
|
|
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",
|
|
30129
|
+
"Water heater": "\u7D66\u6E6F\u5668",
|
|
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",
|
|
30136
|
+
Diameter: "\u76F4\u5F84",
|
|
29227
30137
|
"Base unit": "\u30D9\u30FC\u30B9\u30AD\u30E3\u30D3\u30CD\u30C3\u30C8",
|
|
29228
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",
|
|
29229
30139
|
Below: "\u4E0B\u90E8",
|
|
@@ -29265,12 +30175,23 @@ var translations = {
|
|
|
29265
30175
|
Sofa: "\u30BD\u30D5\u30A1",
|
|
29266
30176
|
Armchair: "\u30A2\u30FC\u30E0\u30C1\u30A7\u30A2",
|
|
29267
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",
|
|
29268
30188
|
Desk: "\u30C7\u30B9\u30AF",
|
|
29269
30189
|
Seats: "\u5EA7\u5E2D\u6570",
|
|
29270
30190
|
"Office chair": "\u30AA\u30D5\u30A3\u30B9\u30C1\u30A7\u30A2",
|
|
29271
30191
|
"Its back goes against the wall. Pull its sides to make it wider or deeper.": "\u80CC\u3082\u305F\u308C\u3092\u58C1\u306B\u3064\u3051\u3066\u7F6E\u304D\u307E\u3059\u3002\u5074\u9762\u3092\u5F15\u3044\u3066\u5E45\u3084\u5965\u884C\u304D\u3092\u5909\u3048\u307E\u3059\u3002",
|
|
29272
30192
|
"Its back at the top. Turn it to face the table.": "\u80CC\u3082\u305F\u308C\u304C\u4E0A\u3002\u30C6\u30FC\u30D6\u30EB\u306B\u5411\u3051\u3066\u56DE\u8EE2\u3055\u305B\u307E\u3059\u3002",
|
|
29273
|
-
"Against the wall
|
|
30193
|
+
"Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "\u58C1\u306B\u4ED8\u3051\u307E\u3059\u3002\u8FBA\u3092\u5F15\u304F\u3068\u5E45\u3084\u5965\u884C\u304D\u304C\u5909\u308F\u308A\u307E\u3059\u3002\u30AA\u30D5\u30A3\u30B9\u30C1\u30A7\u30A2\u306F\u5225\u306E\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3067\u3059\u3002",
|
|
30194
|
+
"On five casters, its back at the top. Turn it to face the desk.": "\u30AD\u30E3\u30B9\u30BF\u30FC5\u3064\u3001\u80CC\u3082\u305F\u308C\u304C\u4E0A\u3002\u673A\u306E\u65B9\u3078\u5411\u3051\u3066\u304F\u3060\u3055\u3044\u3002"
|
|
29274
30195
|
},
|
|
29275
30196
|
ko: {
|
|
29276
30197
|
Hob: "\uCFE1\uD0D1",
|
|
@@ -29298,7 +30219,7 @@ var translations = {
|
|
|
29298
30219
|
"Double washbasin": "\uC774\uC911 \uC138\uBA74\uB300",
|
|
29299
30220
|
Depth: "\uAE4A\uC774",
|
|
29300
30221
|
Bowls: "\uBCFC \uC218",
|
|
29301
|
-
"A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "\uBCFC\uC774 \uC788\uB294 \uCE74\uC6B4\uD130\
|
|
30222
|
+
"A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "\uBCFC\uC774 \uC788\uB294 \uCE74\uC6B4\uD130\uC774\uBA70, \uC544\uB798\uC5D0 \uC11C\uB78D\uC774\uB098 \uBB38\uC774 \uB2EC\uB9B0 \uD558\uBD80\uC7A5\uC744 \uBCBD\uAC78\uC774 \uB610\uB294 \uB2E4\uB9AC\uD615\uC73C\uB85C \uB450\uAC70\uB098 \uB450\uC9C0 \uC54A\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB04C\uC5B4 \uAE38\uAC8C \uB610\uB294 \uAE4A\uAC8C \uB9CC\uB4E4 \uC218 \uC788\uC73C\uBA70, \uBCFC\uACFC \uC218\uC804\uC758 \uD06C\uAE30\uB294 \uADF8\uB300\uB85C\uC785\uB2C8\uB2E4.",
|
|
29302
30223
|
Triple: "\uC0BC\uC911",
|
|
29303
30224
|
"Glazing: Single": "\uB2E8\uD310",
|
|
29304
30225
|
"Glazing: Double": "\uBCF5\uCE35",
|
|
@@ -29342,12 +30263,42 @@ var translations = {
|
|
|
29342
30263
|
Double: "\uC591\uC5EC\uB2EB\uC774",
|
|
29343
30264
|
Sliding: "\uBBF8\uB2EB\uC774",
|
|
29344
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",
|
|
29345
30272
|
Left: "\uC67C\uCABD",
|
|
29346
30273
|
Right: "\uC624\uB978\uCABD",
|
|
29347
30274
|
"Insert 4 \xD7 3 m room": "4 \xD7 3 m \uBC29 \uC0BD\uC785",
|
|
29348
30275
|
Radiator: "\uB77C\uB514\uC5D0\uC774\uD130",
|
|
29349
30276
|
"Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "\uB4B7\uBA74\uC744 \uBCBD\uC5D0 \uBD99\uC785\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB2F9\uAE30\uBA74 \uAE38\uC5B4\uC9C0\uBA70 \uAC01 \uC139\uC158\uC758 \uD3ED\uC740 \uADF8\uB300\uB85C\uC785\uB2C8\uB2E4. \uBC38\uBE0C\uB294 \uD55C\uCABD \uB05D\uC5D0 \uC788\uC2B5\uB2C8\uB2E4.",
|
|
29350
30277
|
Valve: "\uBC38\uBE0C",
|
|
30278
|
+
"On feet": "\uB2E4\uB9AC\uD615",
|
|
30279
|
+
"Shower head": "\uC0E4\uC6CC\uAE30",
|
|
30280
|
+
"Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "\uC218\uC804 \uB192\uC774\uB85C \uBCBD\uC5D0 \uACE0\uC815\uB429\uB2C8\uB2E4. \uD574\uBC14\uB77C\uAE30 \uC0E4\uC6CC\uAC00 \uC788\uB294 \uC0E4\uC6CC \uAE30\uB465, \uD578\uB4DC \uC0E4\uC6CC\uAC00 \uC788\uB294 \uC2AC\uB77C\uC774\uB4DC \uBC14, \uB610\uB294 \uC554\uC5D0 \uB2EC\uB9B0 \uACE0\uC815 \uD5E4\uB4DC. \uC0E4\uC6CC \uD2B8\uB808\uC774\uB098 \uC695\uC870 \uC704\uC5D0 \uB461\uB2C8\uB2E4.",
|
|
30281
|
+
"Column": "\uC0E4\uC6CC \uAE30\uB465",
|
|
30282
|
+
"Slide rail": "\uC2AC\uB77C\uC774\uB4DC \uBC14",
|
|
30283
|
+
"Fixed head": "\uACE0\uC815 \uD5E4\uB4DC",
|
|
30284
|
+
Toilet: "\uC591\uBCC0\uAE30",
|
|
30285
|
+
"Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "\uBB3C\uD0F1\uD06C\uAC00 \uBCBD\uC5D0 \uBD99\uC2B5\uB2C8\uB2E4. \uBCC0\uC744 \uB04C\uC5B4 \uB113\uD788\uAC70\uB098 \uAE4A\uAC8C \uD558\uC138\uC694.",
|
|
30286
|
+
"Toilet, wall-hung": "\uBCBD\uAC78\uC774 \uC591\uBCC0\uAE30",
|
|
30287
|
+
"Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "\uB4B7\uBA74\uC774 \uBCBD\uC5D0 \uBD99\uACE0 \uBB3C\uD0F1\uD06C\uB294 \uBCBD \uC548\uC5D0 \uC788\uC2B5\uB2C8\uB2E4. \uBCC0\uC744 \uB04C\uC5B4 \uB113\uD788\uAC70\uB098 \uAE4A\uAC8C \uD558\uC138\uC694.",
|
|
30288
|
+
"Shower tray": "\uC0E4\uC6CC \uD2B8\uB808\uC774",
|
|
30289
|
+
"Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "\uD55C \uBCC0\uC774 \uBCBD\uC5D0 \uBD99\uC2B5\uB2C8\uB2E4. \uBCC0\uC744 \uB04C\uC5B4 \uD0A4\uC6B0\uC138\uC694. \uD14C\uB450\uB9AC\uC640 \uBC30\uC218\uAD6C\uB294 \uD06C\uAE30\uAC00 \uC720\uC9C0\uB429\uB2C8\uB2E4.",
|
|
30290
|
+
"Heat pump, outdoor unit": "\uD788\uD2B8\uD38C\uD504 \uC2E4\uC678\uAE30",
|
|
30291
|
+
"Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "\uB4B7\uBA74\uC774 \uC678\uBCBD\uC5D0 \uBD99\uC2B5\uB2C8\uB2E4. \uBCC0\uC744 \uB04C\uC5B4 \uAE38\uAC8C \uD558\uAC70\uB098 \uAE4A\uAC8C \uD558\uC138\uC694. \uBC14\uB2E5\uC5D0\uC11C\uC758 \uB192\uC774\uB97C \uC8FC\uBA74 \uBC1B\uCE68\uB300 \uC704\uC5D0 \uB193\uC785\uB2C8\uB2E4.",
|
|
30292
|
+
"Gas boiler": "\uAC00\uC2A4 \uBCF4\uC77C\uB7EC",
|
|
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.",
|
|
30294
|
+
"Water heater": "\uC628\uC218\uAE30",
|
|
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",
|
|
30301
|
+
Diameter: "\uC9C0\uB984",
|
|
29351
30302
|
"Base unit": "\uD558\uBD80\uC7A5",
|
|
29352
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.",
|
|
29353
30304
|
Below: "\uC544\uB798",
|
|
@@ -29389,12 +30340,23 @@ var translations = {
|
|
|
29389
30340
|
Sofa: "\uC18C\uD30C",
|
|
29390
30341
|
Armchair: "\uC548\uB77D\uC758\uC790",
|
|
29391
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",
|
|
29392
30353
|
Desk: "\uCC45\uC0C1",
|
|
29393
30354
|
Seats: "\uC88C\uC11D \uC218",
|
|
29394
30355
|
"Office chair": "\uC0AC\uBB34\uC6A9 \uC758\uC790",
|
|
29395
30356
|
"Its back goes against the wall. Pull its sides to make it wider or deeper.": "\uB4F1\uBC1B\uC774\uB97C \uBCBD\uC5D0 \uBD99\uC5EC \uB193\uC2B5\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB2F9\uACA8 \uB113\uD788\uAC70\uB098 \uAE4A\uAC8C \uD569\uB2C8\uB2E4.",
|
|
29396
30357
|
"Its back at the top. Turn it to face the table.": "\uB4F1\uBC1B\uC774\uAC00 \uC704\uCABD\uC785\uB2C8\uB2E4. \uD14C\uC774\uBE14\uC744 \uD5A5\uD558\uB3C4\uB85D \uB3CC\uB9AC\uC138\uC694.",
|
|
29397
|
-
"Against the wall
|
|
30358
|
+
"Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "\uBCBD\uC5D0 \uBD99\uC2B5\uB2C8\uB2E4. \uC606\uBA74\uC744 \uB04C\uC5B4 \uB113\uD788\uAC70\uB098 \uAE4A\uAC8C \uD558\uC138\uC694. \uC0AC\uBB34\uC6A9 \uC758\uC790\uB294 \uBCC4\uB3C4\uC758 \uAC1D\uCCB4\uC785\uB2C8\uB2E4.",
|
|
30359
|
+
"On five casters, its back at the top. Turn it to face the desk.": "\uBC14\uD034 \uB2E4\uC12F \uAC1C, \uB4F1\uBC1B\uC774\uAC00 \uC704\uCABD\uC785\uB2C8\uB2E4. \uCC45\uC0C1\uC744 \uD5A5\uD558\uB3C4\uB85D \uB3CC\uB9AC\uC138\uC694."
|
|
29398
30360
|
},
|
|
29399
30361
|
tr: {
|
|
29400
30362
|
Hob: "Ocak",
|
|
@@ -29422,7 +30384,7 @@ var translations = {
|
|
|
29422
30384
|
"Double washbasin": "\xC7ift lavabo",
|
|
29423
30385
|
Depth: "Derinlik",
|
|
29424
30386
|
Bowls: "Hazneler",
|
|
29425
|
-
"A counter with its bowls. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Hazneleriyle bir tezg\xE2h. Uzatmak veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin: hazneler ve bataryalar boyutunu korur.",
|
|
30387
|
+
"A counter with its bowls, and under it a vanity unit with drawers or doors, hung or on feet, or none. Pull its sides to make it longer or deeper: the bowls and taps keep their size.": "Hazneleriyle bir tezg\xE2h; alt\u0131nda \xE7ekmeceli veya kapakl\u0131, asma ya da ayakl\u0131 bir dolap olabilir ya da hi\xE7 olmayabilir. Uzatmak veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin: hazneler ve bataryalar boyutunu korur.",
|
|
29426
30388
|
Triple: "\xDC\xE7l\xFC",
|
|
29427
30389
|
"Glazing: Single": "Tek cam",
|
|
29428
30390
|
"Glazing: Double": "\xC7ift cam",
|
|
@@ -29466,12 +30428,42 @@ var translations = {
|
|
|
29466
30428
|
Double: "\xC7ift kanatl\u0131",
|
|
29467
30429
|
Sliding: "S\xFCrg\xFCl\xFC",
|
|
29468
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",
|
|
29469
30437
|
Left: "Sol",
|
|
29470
30438
|
Right: "Sa\u011F",
|
|
29471
30439
|
"Insert 4 \xD7 3 m room": "4 \xD7 3 m oda ekle",
|
|
29472
30440
|
Radiator: "Radyat\xF6r",
|
|
29473
30441
|
"Against the wall by its back. Pull its sides to make it longer: its sections keep their width. Its valve is at one end.": "S\u0131rt\u0131 duvara dayan\u0131r. Uzatmak i\xE7in kenarlar\u0131n\u0131 \xE7ekin: dilimleri geni\u015Fli\u011Fini korur. Vanas\u0131 bir ucundad\u0131r.",
|
|
29474
30442
|
Valve: "Vana",
|
|
30443
|
+
"On feet": "Ayakl\u0131",
|
|
30444
|
+
"Shower head": "Du\u015F ba\u015Fl\u0131\u011F\u0131",
|
|
30445
|
+
"Fixed on the wall at the height of its mixer: a column with an overhead shower, a slide rail with its hand shower, or a head on its arm. Over a shower tray or a bathtub.": "Bataryas\u0131n\u0131n y\xFCksekli\u011Finde duvara sabitlenir: tepe du\u015Flu bir du\u015F kolonu, el du\u015Flu bir s\xFCrg\xFCl\xFC bar veya kolunda sabit bir ba\u015Fl\u0131k. Bir du\u015F teknesinin ya da k\xFCvetin \xFCst\xFCnde.",
|
|
30446
|
+
"Column": "Kolon",
|
|
30447
|
+
"Slide rail": "S\xFCrg\xFCl\xFC bar",
|
|
30448
|
+
"Fixed head": "Sabit ba\u015Fl\u0131k",
|
|
30449
|
+
Toilet: "Klozet",
|
|
30450
|
+
"Its cistern goes against the wall. Pull its sides to make it wider or deeper.": "Rezervuar\u0131 duvara dayan\u0131r. Geni\u015Fletmek veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin.",
|
|
30451
|
+
"Toilet, wall-hung": "Asma klozet",
|
|
30452
|
+
"Its back goes against the wall, its cistern in the wall. Pull its sides to make it wider or deeper.": "Arkas\u0131 duvara dayan\u0131r, rezervuar\u0131 duvar\u0131n i\xE7indedir. Geni\u015Fletmek veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin.",
|
|
30453
|
+
"Shower tray": "Du\u015F teknesi",
|
|
30454
|
+
"Against the wall by one side. Pull its sides to make it larger: its rim and drain keep their size.": "Bir kenar\u0131yla duvara dayan\u0131r. B\xFCy\xFCtmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin: kenar\u0131 ve s\xFCzgeci boyutunu korur.",
|
|
30455
|
+
"Heat pump, outdoor unit": "Is\u0131 pompas\u0131, d\u0131\u015F \xFCnite",
|
|
30456
|
+
"Against an outside wall by its back. Pull its sides to make it longer or deeper. Give it a height above the floor to set it on brackets.": "Arkas\u0131yla bir d\u0131\u015F duvara dayan\u0131r. Uzatmak veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin. Konsollara oturtmak i\xE7in ona yerden bir y\xFCkseklik verin.",
|
|
30457
|
+
"Gas boiler": "Gaz kombisi",
|
|
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.",
|
|
30459
|
+
"Water heater": "Su \u0131s\u0131t\u0131c\u0131",
|
|
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",
|
|
30466
|
+
Diameter: "\xC7ap",
|
|
29475
30467
|
"Base unit": "Alt dolap",
|
|
29476
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.",
|
|
29477
30469
|
Below: "Alt\u0131nda",
|
|
@@ -29513,12 +30505,23 @@ var translations = {
|
|
|
29513
30505
|
Sofa: "Kanepe",
|
|
29514
30506
|
Armchair: "Koltuk",
|
|
29515
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",
|
|
29516
30518
|
Desk: "\xC7al\u0131\u015Fma masas\u0131",
|
|
29517
30519
|
Seats: "Oturma yeri",
|
|
29518
30520
|
"Office chair": "Ofis sandalyesi",
|
|
29519
30521
|
"Its back goes against the wall. Pull its sides to make it wider or deeper.": "S\u0131rtl\u0131\u011F\u0131 duvara dayan\u0131r. Geni\u015Fletmek veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin.",
|
|
29520
30522
|
"Its back at the top. Turn it to face the table.": "S\u0131rtl\u0131\u011F\u0131 \xFCstte. Masaya do\u011Fru \xE7evirin.",
|
|
29521
|
-
"Against the wall
|
|
30523
|
+
"Against the wall. Pull its sides to make it wider or deeper. Its office chair is an object of its own.": "Duvara dayan\u0131r. Geni\u015Fletmek veya derinle\u015Ftirmek i\xE7in kenarlar\u0131n\u0131 \xE7ekin. Ofis sandalyesi ayr\u0131 bir nesnedir.",
|
|
30524
|
+
"On five casters, its back at the top. Turn it to face the desk.": "Be\u015F tekerlekli, s\u0131rtl\u0131\u011F\u0131 \xFCstte. Masaya do\u011Fru \xE7evirin."
|
|
29522
30525
|
}
|
|
29523
30526
|
};
|
|
29524
30527
|
|
|
@@ -29534,6 +30537,7 @@ var architecture = {
|
|
|
29534
30537
|
api.registerParametric(tall(washbasin("arch.washbasin", "Washbasin", 600, 450, 1), 850));
|
|
29535
30538
|
api.registerParametric(tall(washbasin("arch.washbasin.double", "Double washbasin", 1200, 500, 2), 850));
|
|
29536
30539
|
api.registerParametric(tall(bathtub, 580));
|
|
30540
|
+
for (const kind of [toilet, wallHungToilet, showerTray, showerHead]) api.registerParametric(kind);
|
|
29537
30541
|
api.registerParametric(tall(hob, 900));
|
|
29538
30542
|
api.registerParametric(tall(sink, 900));
|
|
29539
30543
|
api.registerParametric(tall(fridge("arch.fridge", "Fridge", 600, 650, 1, 1850), 1850));
|
|
@@ -29543,8 +30547,9 @@ var architecture = {
|
|
|
29543
30547
|
api.registerParametric(hood);
|
|
29544
30548
|
api.registerParametric(splashback);
|
|
29545
30549
|
api.registerParametric(tall(cornerSofa, 850, false));
|
|
29546
|
-
for (const kind of [sofa("arch.sofa", "Sofa", 1600, 2), sofa("arch.armchair", "Armchair", 850, 1), chair, desk]) 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);
|
|
29547
30551
|
api.registerParametric(tall(radiator, RADIATOR_TOP));
|
|
30552
|
+
for (const kind of [heatPump, gasBoiler, waterHeater, fireplace]) api.registerParametric(kind);
|
|
29548
30553
|
api.registerParametric(compass);
|
|
29549
30554
|
api.registerCommand({
|
|
29550
30555
|
id: "arch.room",
|
|
@@ -30407,7 +31412,7 @@ var furniture_default = {
|
|
|
30407
31412
|
formatVersion: 1,
|
|
30408
31413
|
id: "opencalque.furniture",
|
|
30409
31414
|
name: "Adjustable furniture",
|
|
30410
|
-
version: "1.
|
|
31415
|
+
version: "1.7.0",
|
|
30411
31416
|
author: "OpenCalque",
|
|
30412
31417
|
description: "Tables, beds and shelving whose size and number of seats or bays you set.",
|
|
30413
31418
|
translations: {
|
|
@@ -30415,7 +31420,8 @@ var furniture_default = {
|
|
|
30415
31420
|
"Adjustable furniture": "Mobilier ajustable",
|
|
30416
31421
|
"Tables, beds and shelving whose size and number of seats or bays you set.": "Tables, lits et \xE9tag\xE8res dont vous r\xE9glez la taille et le nombre de places ou de trav\xE9es.",
|
|
30417
31422
|
"Table with chairs": "Table avec chaises",
|
|
30418
|
-
|
|
31423
|
+
"Single bed": "Lit simple",
|
|
31424
|
+
"Double bed": "Lit double",
|
|
30419
31425
|
"Shelving unit": "\xC9tag\xE8re",
|
|
30420
31426
|
Length: "Longueur",
|
|
30421
31427
|
Width: "Largeur",
|
|
@@ -30427,7 +31433,8 @@ var furniture_default = {
|
|
|
30427
31433
|
"Adjustable furniture": "Mobiliario ajustable",
|
|
30428
31434
|
"Tables, beds and shelving whose size and number of seats or bays you set.": "Mesas, camas y estanter\xEDas cuyo tama\xF1o y n\xFAmero de plazas o m\xF3dulos usted define.",
|
|
30429
31435
|
"Table with chairs": "Mesa con sillas",
|
|
30430
|
-
|
|
31436
|
+
"Single bed": "Cama individual",
|
|
31437
|
+
"Double bed": "Cama doble",
|
|
30431
31438
|
"Shelving unit": "Estanter\xEDa",
|
|
30432
31439
|
Length: "Longitud",
|
|
30433
31440
|
Width: "Ancho",
|
|
@@ -30439,7 +31446,8 @@ var furniture_default = {
|
|
|
30439
31446
|
"Adjustable furniture": "Anpassbare M\xF6bel",
|
|
30440
31447
|
"Tables, beds and shelving whose size and number of seats or bays you set.": "Tische, Betten und Regale, deren Gr\xF6\xDFe und Anzahl der Pl\xE4tze oder Felder Sie festlegen.",
|
|
30441
31448
|
"Table with chairs": "Tisch mit St\xFChlen",
|
|
30442
|
-
|
|
31449
|
+
"Single bed": "Einzelbett",
|
|
31450
|
+
"Double bed": "Doppelbett",
|
|
30443
31451
|
"Shelving unit": "Regal",
|
|
30444
31452
|
Length: "L\xE4nge",
|
|
30445
31453
|
Width: "Breite",
|
|
@@ -30451,7 +31459,8 @@ var furniture_default = {
|
|
|
30451
31459
|
"Adjustable furniture": "\u53EF\u8C03\u5BB6\u5177",
|
|
30452
31460
|
"Tables, beds and shelving whose size and number of seats or bays you set.": "\u53EF\u8BBE\u7F6E\u5C3A\u5BF8\u53CA\u5EA7\u4F4D\u6570\u6216\u683C\u6570\u7684\u684C\u5B50\u3001\u5E8A\u548C\u7F6E\u7269\u67B6\u3002",
|
|
30453
31461
|
"Table with chairs": "\u684C\u6905",
|
|
30454
|
-
|
|
31462
|
+
"Single bed": "\u5355\u4EBA\u5E8A",
|
|
31463
|
+
"Double bed": "\u53CC\u4EBA\u5E8A",
|
|
30455
31464
|
"Shelving unit": "\u7F6E\u7269\u67B6",
|
|
30456
31465
|
Length: "\u957F\u5EA6",
|
|
30457
31466
|
Width: "\u5BBD\u5EA6",
|
|
@@ -30463,7 +31472,8 @@ var furniture_default = {
|
|
|
30463
31472
|
"Adjustable furniture": "\u30B5\u30A4\u30BA\u53EF\u5909\u306E\u5BB6\u5177",
|
|
30464
31473
|
"Tables, beds and shelving whose size and number of seats or bays you set.": "\u30B5\u30A4\u30BA\u3084\u5E2D\u6570\u30FB\u68DA\u306E\u6570\u3092\u8A2D\u5B9A\u3067\u304D\u308B\u30C6\u30FC\u30D6\u30EB\u3001\u30D9\u30C3\u30C9\u3001\u68DA\u3002",
|
|
30465
31474
|
"Table with chairs": "\u30C6\u30FC\u30D6\u30EB\u3068\u3044\u3059",
|
|
30466
|
-
|
|
31475
|
+
"Single bed": "\u30B7\u30F3\u30B0\u30EB\u30D9\u30C3\u30C9",
|
|
31476
|
+
"Double bed": "\u30C0\u30D6\u30EB\u30D9\u30C3\u30C9",
|
|
30467
31477
|
"Shelving unit": "\u68DA",
|
|
30468
31478
|
Length: "\u9577\u3055",
|
|
30469
31479
|
Width: "\u5E45",
|
|
@@ -30475,7 +31485,8 @@ var furniture_default = {
|
|
|
30475
31485
|
"Adjustable furniture": "\uD06C\uAE30 \uC870\uC808 \uAC00\uAD6C",
|
|
30476
31486
|
"Tables, beds and shelving whose size and number of seats or bays you set.": "\uD06C\uAE30\uC640 \uC88C\uC11D \uC218 \uB610\uB294 \uCE78 \uC218\uB97C \uC815\uD560 \uC218 \uC788\uB294 \uD14C\uC774\uBE14, \uCE68\uB300, \uC120\uBC18.",
|
|
30477
31487
|
"Table with chairs": "\uD14C\uC774\uBE14\uACFC \uC758\uC790",
|
|
30478
|
-
|
|
31488
|
+
"Single bed": "\uC2F1\uAE00 \uCE68\uB300",
|
|
31489
|
+
"Double bed": "\uB354\uBE14 \uCE68\uB300",
|
|
30479
31490
|
"Shelving unit": "\uC120\uBC18",
|
|
30480
31491
|
Length: "\uAE38\uC774",
|
|
30481
31492
|
Width: "\uB108\uBE44",
|
|
@@ -30487,7 +31498,8 @@ var furniture_default = {
|
|
|
30487
31498
|
"Adjustable furniture": "Ayarlanabilir mobilya",
|
|
30488
31499
|
"Tables, beds and shelving whose size and number of seats or bays you set.": "Boyutunu ve oturma yeri ya da b\xF6lme say\u0131s\u0131n\u0131 ayarlad\u0131\u011F\u0131n\u0131z masalar, yataklar ve raflar.",
|
|
30489
31500
|
"Table with chairs": "Sandalyeli masa",
|
|
30490
|
-
|
|
31501
|
+
"Single bed": "Tek ki\u015Filik yatak",
|
|
31502
|
+
"Double bed": "\xC7ift ki\u015Filik yatak",
|
|
30491
31503
|
"Shelving unit": "Raf \xFCnitesi",
|
|
30492
31504
|
Length: "Uzunluk",
|
|
30493
31505
|
Width: "Geni\u015Flik",
|
|
@@ -30601,11 +31613,63 @@ var furniture_default = {
|
|
|
30601
31613
|
{ repeat: { count: "max(1, floor(seats / 2))" }, path: [["(i + 0.5) * length / max(1, floor(seats / 2)) - 200", -750], ["(i + 0.5) * length / max(1, floor(seats / 2)) - 200", -900], ["(i + 0.5) * length / max(1, floor(seats / 2)) + 200", -900], ["(i + 0.5) * length / max(1, floor(seats / 2)) + 200", -750]] }
|
|
30602
31614
|
]
|
|
30603
31615
|
},
|
|
31616
|
+
{
|
|
31617
|
+
kind: "furn.bed.single",
|
|
31618
|
+
mount: { on: "floor" },
|
|
31619
|
+
height: "500",
|
|
31620
|
+
category: "bedroom",
|
|
31621
|
+
label: "Single bed",
|
|
31622
|
+
params: [
|
|
31623
|
+
{ key: "width", label: "Width", type: "number", default: 900, unit: "length" },
|
|
31624
|
+
{ key: "length", label: "Length", type: "number", default: 1900, unit: "length" }
|
|
31625
|
+
],
|
|
31626
|
+
box: { width: "width", height: "length" },
|
|
31627
|
+
draw: [
|
|
31628
|
+
{ closed: true, radius: 25, path: [[0, 0], ["width", 0], ["width", "length"], [0, "length"]] },
|
|
31629
|
+
{ path: [[0, 50], ["width", 50]] },
|
|
31630
|
+
{
|
|
31631
|
+
repeat: { count: "width >= 1400 ? 2 : 1" },
|
|
31632
|
+
closed: true,
|
|
31633
|
+
radius: 90,
|
|
31634
|
+
path: [
|
|
31635
|
+
["80 + i * ((width - 160 - ((width >= 1400 ? 2 : 1) - 1) * 60) / (width >= 1400 ? 2 : 1) + 60)", 100],
|
|
31636
|
+
["80 + i * ((width - 160 - ((width >= 1400 ? 2 : 1) - 1) * 60) / (width >= 1400 ? 2 : 1) + 60) + max(1, (width - 160 - ((width >= 1400 ? 2 : 1) - 1) * 60) / (width >= 1400 ? 2 : 1))", 100],
|
|
31637
|
+
["80 + i * ((width - 160 - ((width >= 1400 ? 2 : 1) - 1) * 60) / (width >= 1400 ? 2 : 1) + 60) + max(1, (width - 160 - ((width >= 1400 ? 2 : 1) - 1) * 60) / (width >= 1400 ? 2 : 1))", 480],
|
|
31638
|
+
["80 + i * ((width - 160 - ((width >= 1400 ? 2 : 1) - 1) * 60) / (width >= 1400 ? 2 : 1) + 60)", 480]
|
|
31639
|
+
]
|
|
31640
|
+
},
|
|
31641
|
+
{ path: [[0, 620], ["width - min(500, width * 0.3)", 620]] },
|
|
31642
|
+
{
|
|
31643
|
+
closed: true,
|
|
31644
|
+
path: [
|
|
31645
|
+
["width - min(500, width * 0.3)", 620],
|
|
31646
|
+
["width", "620 + min(500, width * 0.3)"],
|
|
31647
|
+
["width - min(500, width * 0.3)", "620 + min(500, width * 0.3)"]
|
|
31648
|
+
]
|
|
31649
|
+
}
|
|
31650
|
+
],
|
|
31651
|
+
front: [
|
|
31652
|
+
{ closed: true, path: [[0, 0], [60, 0], [60, -100], [0, -100]] },
|
|
31653
|
+
{ closed: true, path: [["width - 60", 0], ["width", 0], ["width", -100], ["width - 60", -100]] },
|
|
31654
|
+
{ closed: true, path: [[0, -100], ["width", -100], ["width", -300], [0, -300]] },
|
|
31655
|
+
{ radius: 40, closed: true, path: [[10, -300], ["width - 10", -300], ["width - 10", -500], [10, -500]] },
|
|
31656
|
+
{ path: [[0, -500], [0, -1e3], ["width", -1e3], ["width", -500]] }
|
|
31657
|
+
],
|
|
31658
|
+
side: [
|
|
31659
|
+
{ closed: true, path: [[0, 0], [50, 0], [50, -1e3], [0, -1e3]] },
|
|
31660
|
+
{ closed: true, path: [[50, -100], ["length", -100], ["length", -300], [50, -300]] },
|
|
31661
|
+
{ closed: true, path: [[50, 0], [110, 0], [110, -100], [50, -100]] },
|
|
31662
|
+
{ closed: true, path: [["length - 60", 0], ["length", 0], ["length", -100], ["length - 60", -100]] },
|
|
31663
|
+
{ radius: 40, closed: true, path: [[60, -300], ["length - 10", -300], ["length - 10", -500], [60, -500]] },
|
|
31664
|
+
{ radius: 40, closed: true, path: [[100, -500], [480, -500], [480, -590], [100, -590]] }
|
|
31665
|
+
]
|
|
31666
|
+
},
|
|
30604
31667
|
{
|
|
30605
31668
|
kind: "furn.bed",
|
|
31669
|
+
mount: { on: "floor" },
|
|
30606
31670
|
height: "500",
|
|
30607
31671
|
category: "bedroom",
|
|
30608
|
-
label: "
|
|
31672
|
+
label: "Double bed",
|
|
30609
31673
|
params: [
|
|
30610
31674
|
{ key: "width", label: "Width", type: "number", default: 1600, unit: "length" },
|
|
30611
31675
|
{ key: "length", label: "Length", type: "number", default: 2e3, unit: "length" }
|
|
@@ -34152,8 +35216,8 @@ function weighted(svg, millimetresPerPixel) {
|
|
|
34152
35216
|
return svg.replace(/stroke-width="([\d.]+)"/g, (_, width) => `stroke-width="${Number(width) * millimetresPerPixel}"`).replace(/ vector-effect="non-scaling-stroke"/g, "");
|
|
34153
35217
|
}
|
|
34154
35218
|
function renderPng(svg, pixels) {
|
|
34155
|
-
const
|
|
34156
|
-
const [width, height] = [
|
|
35219
|
+
const box2 = svgBox(svg);
|
|
35220
|
+
const [width, height] = [box2.maxX - box2.minX, box2.maxY - box2.minY];
|
|
34157
35221
|
const longer = Math.max(width, height);
|
|
34158
35222
|
const resvg = new Resvg(weighted(svg, longer / pixels), {
|
|
34159
35223
|
fitTo: width >= height ? { mode: "width", value: pixels } : { mode: "height", value: pixels },
|