@adatechnology/game-floorplan-structure 1.0.5 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/index.d.ts +679 -3
- package/dist/index.global.js +5808 -183
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +1444 -104
- package/dist/index.js.map +1 -1
- package/package.json +7 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { FloorplanEngine, ViewerLayer } from '@adatechnology/game-floorplan';
|
|
2
|
-
import { MaterialId, JointKind, StructureRole, DestructibleSpec } from '@adatechnology/game-contracts';
|
|
1
|
+
import { FloorplanEngine, ViewerLayer, RoomDef, DoorDef, WindowDef, FloorDef } from '@adatechnology/game-floorplan';
|
|
2
|
+
import { MaterialId, JointKind, StructureRole, SoilProfile, PileSpec, DestructibleSpec, WindExposure } from '@adatechnology/game-contracts';
|
|
3
|
+
import { SoilDef, FrameOptions, WindOptions, SizeStructureOptions } from '@adatechnology/game-destruction';
|
|
3
4
|
|
|
4
5
|
interface StructurePackOptions {
|
|
5
6
|
/** Litres of the tank by template id or style id. */
|
|
@@ -51,6 +52,10 @@ interface StructurePart {
|
|
|
51
52
|
pitch?: number;
|
|
52
53
|
tent?: string;
|
|
53
54
|
form?: string;
|
|
55
|
+
/** Rooms a concrete slab covers (the rectangles of the storey it carries); the slab itself is their bounding box. `toDestructibleSpec` cuts the slab into panels over it. */
|
|
56
|
+
footprint?: Rect[];
|
|
57
|
+
/** Slab the panel, beam or column was made for (`toDestructibleSpec` with `slabPanels`; a `StructurePart` of `buildStructure` never has it). */
|
|
58
|
+
slab?: string;
|
|
54
59
|
}
|
|
55
60
|
/** `part` rests on `on` (`GROUND` or another part) through `joint`. `bears: false` ties the two without carrying load. */
|
|
56
61
|
interface Support {
|
|
@@ -340,6 +345,84 @@ interface PlanContext {
|
|
|
340
345
|
*/
|
|
341
346
|
declare function buildStructure(source: StructureSource, options?: StructureOptions): Structure;
|
|
342
347
|
|
|
348
|
+
interface PartsAndSupports {
|
|
349
|
+
parts: StructurePart[];
|
|
350
|
+
supports: Support[];
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* How a concrete slab of a house is cut into panels with beams under their edges, and where pillars are added so that every beam spans a
|
|
355
|
+
* reasonable distance (design T10-estrutura-real.md §12). Every number is a choice of the design and can be changed per call
|
|
356
|
+
* (`toDestructibleSpec({ slabPanels: { maxSpan: 4 } })`).
|
|
357
|
+
*/
|
|
358
|
+
interface SlabPanelOptions {
|
|
359
|
+
/** Longest side of a panel and longest stretch of a beam or bond beam without a support, metres (default 5). */
|
|
360
|
+
maxSpan: number;
|
|
361
|
+
/** A cut never leaves a piece narrower than this, metres (default 1.5). */
|
|
362
|
+
minPanel: number;
|
|
363
|
+
/** Share of a line of the panel a wall must cover (doors included) for the line to be a room boundary the panel is cut along (default 0.6). */
|
|
364
|
+
lineCoverage: number;
|
|
365
|
+
/** A gap in a line of walls up to this wide is a door and counts as wall, metres (default 1.3). */
|
|
366
|
+
doorGap: number;
|
|
367
|
+
/** Walls whose lines are this close are one line, metres (default 0.2). */
|
|
368
|
+
lineTolerance: number;
|
|
369
|
+
/** A panel with less than this share of its area inside the footprint of the slab is left out (default 0.5). */
|
|
370
|
+
footprintShare: number;
|
|
371
|
+
/** Thickness of a panel is its short side over this (default 40: `h = L/40`). */
|
|
372
|
+
thicknessRatio: number;
|
|
373
|
+
/** Thinnest floor slab, metres (default 0.10). */
|
|
374
|
+
floorMinThickness: number;
|
|
375
|
+
/** Thinnest roof slab, metres (default 0.08). */
|
|
376
|
+
roofMinThickness: number;
|
|
377
|
+
/** Depth of a beam is its span over this (default 10: `h = L/10`, a simply supported beam of NBR 6118, and deep enough for the frame to carry the loss of one pillar; continuous beams are L/12). */
|
|
378
|
+
beamDepthRatio: number;
|
|
379
|
+
/** Shallowest beam, metres (default 0.25). */
|
|
380
|
+
beamMinDepth: number;
|
|
381
|
+
/** Depth of beams and bond beams is rounded up to a multiple of this, metres (default 0.05). */
|
|
382
|
+
beamStep: number;
|
|
383
|
+
/** Width of a beam is the thickness of the wall it hides in, or its depth over this when that is wider (default 3). */
|
|
384
|
+
beamWidthRatio: number;
|
|
385
|
+
/** Side of the pillars that are added, metres (default 0.20; NBR 6118 13.2.3 asks for 19 cm). */
|
|
386
|
+
columnSide: number;
|
|
387
|
+
/**
|
|
388
|
+
* Most storeys of a building that gets panels (default 8). A tall building is a frame of its own (`buildTower`, the skyscraper presets), and cutting its 40 slabs and
|
|
389
|
+
* sizing every pillar for the loss of each other one is quadratic: minutes for the 40-storey tower of the plan engine. It keeps its slabs whole, and the steel is not declared.
|
|
390
|
+
*/
|
|
391
|
+
maxStoreys: number;
|
|
392
|
+
}
|
|
393
|
+
declare const SLAB_PANEL_DEFAULTS: Readonly<SlabPanelOptions>;
|
|
394
|
+
declare const resolveSlabPanels: (options?: boolean | Partial<SlabPanelOptions>) => SlabPanelOptions | undefined;
|
|
395
|
+
|
|
396
|
+
type Interval = [number, number];
|
|
397
|
+
/**
|
|
398
|
+
* The span the destruction world measures for a beam from `0` to `length` held at `supports`: twice the farthest any point is from its nearest support
|
|
399
|
+
* (two supports `g` apart give `g`; a beam hanging `e` past its last support gives `2e`). `at` is where a new support helps the most.
|
|
400
|
+
*/
|
|
401
|
+
declare function beamSpan(length: number, supports: readonly Interval[]): {
|
|
402
|
+
span: number;
|
|
403
|
+
at: number;
|
|
404
|
+
lo: number;
|
|
405
|
+
hi: number;
|
|
406
|
+
};
|
|
407
|
+
/** Depth of a beam over `span` metres: `span / beamDepthRatio` up to a multiple of `beamStep`, not under `minimum`. */
|
|
408
|
+
declare const beamDepthFor: (span: number, options: SlabPanelOptions, minimum?: number) => number;
|
|
409
|
+
/**
|
|
410
|
+
* The slabs of concrete cut into panels with beams (`SlabPanelOptions`): see `T10-estrutura-real.md` §12. `input` is the structure as
|
|
411
|
+
* `toDestructibleSpec` has it (walls with their roles), and the result has the panels, the beams, the pillars they need and the supports re-pointed.
|
|
412
|
+
*/
|
|
413
|
+
declare function applySlabPanels(input: PartsAndSupports, structure: Structure, options: SlabPanelOptions): PartsAndSupports;
|
|
414
|
+
/**
|
|
415
|
+
* The panels `toDestructibleSpec` makes of the slabs of a structure (named as it names them), for a renderer that draws the floor of each room apart:
|
|
416
|
+
* `panels` (each with `slab`, the id of the slab it was cut from), `replaced` (those slabs, which the spec no longer has) and the `supports` that touch the panels.
|
|
417
|
+
*/
|
|
418
|
+
declare function slabPanelView(structure: Structure, options: SlabPanelOptions): {
|
|
419
|
+
panels: StructurePart[];
|
|
420
|
+
replaced: string[];
|
|
421
|
+
supports: Support[];
|
|
422
|
+
};
|
|
423
|
+
/** The panels of `slabPanelView`, alone. */
|
|
424
|
+
declare const slabPanelsOf: (structure: Structure, options: SlabPanelOptions) => StructurePart[];
|
|
425
|
+
|
|
343
426
|
interface DestructibleSpecOptions {
|
|
344
427
|
/** Fraction of its capacity a pillar or bearing wall uses at rest (default 0.65). */
|
|
345
428
|
safety?: number;
|
|
@@ -351,6 +434,11 @@ interface DestructibleSpecOptions {
|
|
|
351
434
|
portico?: boolean;
|
|
352
435
|
/** How finely the walls are split (default `panels`; `coarse` is one part per wall as the Visor de casas 3D builds it). */
|
|
353
436
|
wallDetail?: WallDetail;
|
|
437
|
+
/**
|
|
438
|
+
* Cuts the concrete slabs into panels with a beam under each edge, and adds the pillars those beams and the bond beams need (design T10 §12): `true` for
|
|
439
|
+
* `SLAB_PANEL_DEFAULTS`, options to change them, `false` for the slab as one piece, as the Visor de casas 3D describes it. Default `true`.
|
|
440
|
+
*/
|
|
441
|
+
slabPanels?: boolean | Partial<SlabPanelOptions>;
|
|
354
442
|
/** Name of the spec (default `house`). */
|
|
355
443
|
name?: string;
|
|
356
444
|
/** Leaves parts out (and what rests on them is dropped from the joints). */
|
|
@@ -359,7 +447,40 @@ interface DestructibleSpecOptions {
|
|
|
359
447
|
sized?: boolean;
|
|
360
448
|
/** Metres the anchored terrain slab reaches beyond the parts (default 6). */
|
|
361
449
|
terrainMargin?: number;
|
|
450
|
+
/**
|
|
451
|
+
* Declares the tension steel of the concrete beams, slabs, roofs and stairs of a construction with rebar (`structure.rebar.ratio`), so the destruction
|
|
452
|
+
* world bends them (`structure.flexure` of game-destruction): `true` for the default ratios (`REBAR_RATIOS`), or ratios per role. When the spec is
|
|
453
|
+
* sized the steel is sized too (`sizeRebar`: at rest at `safetyOthers`, after the loss of any pillar or bearing wall under `redundancy`). On by
|
|
454
|
+
* default (a house of concrete is reinforced concrete, with the slab in panels on real beams, `slabPanels`); `false` leaves the concrete plain, as the
|
|
455
|
+
* Visor de casas 3D describes it.
|
|
456
|
+
*/
|
|
457
|
+
rebar?: boolean | Partial<Record<'beam' | 'slab' | 'roof' | 'stair', number>>;
|
|
458
|
+
/**
|
|
459
|
+
* The ground the house stands on (`DestructibleSpec.soil` of game-contracts: a soil class id such as `clay_stiff`, or a profile of layers). With it
|
|
460
|
+
* the foundations bear on the soil (game-destruction `soil`): the house settles, and tips over where the soil cannot carry it. A raft foundation
|
|
461
|
+
* (`raft`, `basement`, `building`) becomes a concrete raft under the footprint (`RAFT_THICKNESS`) instead of the anchored terrain; any other
|
|
462
|
+
* foundation keeps the terrain and every wall and pillar on it bears on a footing at least `footingWidth` wide. Off by default.
|
|
463
|
+
*/
|
|
464
|
+
soil?: string | SoilProfile;
|
|
465
|
+
/** Foundation used with `soil` (default the construction's `foundation.type`). */
|
|
466
|
+
foundation?: FoundationType;
|
|
467
|
+
/**
|
|
468
|
+
* Deep concrete piles under the raft (a piled raft; with `soil` only). `length` omitted: each pile goes down to where it carries its share of the
|
|
469
|
+
* house with the NBR 6122 safety (`pileLength`). Defaults: diameter 0.4 m, one pile per `PILE_AREA` m² of raft, at least 4, bored.
|
|
470
|
+
*/
|
|
471
|
+
piles?: true | Partial<PileSpec>;
|
|
472
|
+
/** Soil classes beyond `SOILS` that `soil` names (the same ones given to the destruction world in `soil.soils`). */
|
|
473
|
+
soils?: readonly SoilDef[];
|
|
362
474
|
}
|
|
475
|
+
/** Thickness of the raft of a house on the soil, metres (usual 0.20 to 0.30 m). */
|
|
476
|
+
declare const RAFT_THICKNESS = 0.25;
|
|
477
|
+
/** Raft area per pile when the count is not given, m² (a 3 x 3 m grid). */
|
|
478
|
+
declare const PILE_AREA = 9;
|
|
479
|
+
/**
|
|
480
|
+
* Tension steel ratio a concrete member starts with before sizing, `As / (b d)`: beams 0.8%, slabs and roof slabs 0.25%, stairs 0.4% (inside the
|
|
481
|
+
* usual ranges of NBR 6118; the minimum for C25 is 0.15%).
|
|
482
|
+
*/
|
|
483
|
+
declare const REBAR_RATIOS: Readonly<Record<'beam' | 'slab' | 'roof' | 'stair', number>>;
|
|
363
484
|
/**
|
|
364
485
|
* The structure as a `DestructibleSpec` in the space of the house (x = u, y = height, z = v; the ground is y = 0), one box per part and a terrain slab
|
|
365
486
|
* that anchors it. Capacities are sized from the loads at rest, as a designer would: a house stands whole, holds the loss of one pillar or bearing wall
|
|
@@ -475,6 +596,561 @@ declare const structureLayer: ViewerLayer;
|
|
|
475
596
|
/** kg/m3 the plan structure weighs its parts with (the table of the Visor de casas 3D; a material outside it weighs like soft wood). */
|
|
476
597
|
declare const DENSITY: Readonly<Record<string, number>>;
|
|
477
598
|
|
|
599
|
+
/**
|
|
600
|
+
* Building systems of a multi-storey building, as parts added to a frame spec: the rigid concrete core (shear-wall tube with the stairs and the
|
|
601
|
+
* elevator shafts inside), the glass curtain wall hung from the slab edges, the flat roof (screed sloped to the drains and a waterproofing
|
|
602
|
+
* membrane) and the mechanical floor under it (elevator machines, the water tank, chillers). Every number is an option with a real default; see the
|
|
603
|
+
* design T10-estrutura-real.md §9.
|
|
604
|
+
*/
|
|
605
|
+
/** The frame the systems are added to, in metres: what `buildFrame` was given. */
|
|
606
|
+
interface TowerGeometry {
|
|
607
|
+
floors: number;
|
|
608
|
+
/** Clear height of a storey (`buildFrame` `height`). */
|
|
609
|
+
height: number;
|
|
610
|
+
/** Slab thickness. */
|
|
611
|
+
slab: number;
|
|
612
|
+
spanX: number;
|
|
613
|
+
spanZ: number;
|
|
614
|
+
columnSize: number;
|
|
615
|
+
/** Columns along x and z (`buildFrame` `columnsX`, `columnsZ`; default 3 and 4, as `TOWER_DEFAULTS`). */
|
|
616
|
+
columnsX?: number;
|
|
617
|
+
columnsZ?: number;
|
|
618
|
+
/** Depth of the beams (`buildFrame` `beamHeight`; default 0.6 m, as `TOWER_DEFAULTS`). */
|
|
619
|
+
beamHeight?: number;
|
|
620
|
+
/** The top slab is a roof (`roof` id) instead of `slab_<floors-1>`. */
|
|
621
|
+
roof: boolean;
|
|
622
|
+
}
|
|
623
|
+
interface CoreOptions {
|
|
624
|
+
/** Centre of the core in plan, object-local `[x, z]` (default `[0, 0]`). */
|
|
625
|
+
center?: [number, number];
|
|
626
|
+
/** Thickness of the outer walls of the tube (default 0.35 m: 30 to 60 cm in high-rise cores; at least h/25, NBR 6118 18.5 / EN 1992-1-1 9.6). */
|
|
627
|
+
wallThickness?: number;
|
|
628
|
+
/** Thickness of the walls inside it, between the stair and the shafts and between shafts (default 0.2 m). */
|
|
629
|
+
innerThickness?: number;
|
|
630
|
+
/** Elevator shafts (default 2), each `shaft` wide along z and `shaftDepth` deep along x. */
|
|
631
|
+
elevators?: number;
|
|
632
|
+
shaft?: number;
|
|
633
|
+
shaftDepth?: number;
|
|
634
|
+
/** Stair compartment: width along x (two flights of 1.2 m side by side) and length along z (default 2.6 x 4.8 m, NBR 9077). */
|
|
635
|
+
stairWidth?: number;
|
|
636
|
+
stairLength?: number;
|
|
637
|
+
/** Concrete of the walls (default `concrete`). */
|
|
638
|
+
material?: string;
|
|
639
|
+
/** Rebar cage of the walls: bars of `diameter` every `spacing` (default 12.5 mm every 0.15 m: about 0.5% of the section, above the 0.2% of EN 1992-1-1 9.6.2). */
|
|
640
|
+
rebar?: {
|
|
641
|
+
spacing?: number;
|
|
642
|
+
diameter?: number;
|
|
643
|
+
};
|
|
644
|
+
/** Thickness of the mat foundation under the core when the frame has no raft (default 1.2 m). */
|
|
645
|
+
matThickness?: number;
|
|
646
|
+
}
|
|
647
|
+
declare const CORE_DEFAULTS: {
|
|
648
|
+
readonly wallThickness: 0.35;
|
|
649
|
+
readonly innerThickness: 0.2;
|
|
650
|
+
readonly elevators: 2;
|
|
651
|
+
readonly shaft: 2.2;
|
|
652
|
+
readonly shaftDepth: 2.4;
|
|
653
|
+
readonly stairWidth: 2.6;
|
|
654
|
+
readonly stairLength: 4.8;
|
|
655
|
+
readonly material: "concrete";
|
|
656
|
+
readonly rebar: {
|
|
657
|
+
readonly spacing: 0.15;
|
|
658
|
+
readonly diameter: 0.0125;
|
|
659
|
+
};
|
|
660
|
+
readonly matThickness: 1.2;
|
|
661
|
+
};
|
|
662
|
+
/** Outer size of the core in plan, `[x, z]`, from its options: the stair compartment beside the row of shafts. */
|
|
663
|
+
declare const coreSize: (o?: CoreOptions) => [number, number];
|
|
664
|
+
/**
|
|
665
|
+
* Adds the concrete core: four shear walls per storey forming a tube, the wall between the stair and the shafts and the walls between shafts, each
|
|
666
|
+
* resting on the one below (continuous from the foundation to the roof) with its rebar cage, the slab of each storey resting on the tube, two
|
|
667
|
+
* flights and a landing of stairs per storey inside, and an elevator car parked at the bottom of each shaft. Part ids: `core_<f>_<n|s|e|w|stair|shaft_k>`,
|
|
668
|
+
* `stair_<f>_a|b`, `landing_<f>`, `elevator_<k>`, `core_mat`.
|
|
669
|
+
*/
|
|
670
|
+
declare function addCore(spec: DestructibleSpec, g: TowerGeometry, options?: CoreOptions): DestructibleSpec;
|
|
671
|
+
interface CurtainWallOptions {
|
|
672
|
+
/** Width of a panel (default 1.5 m). */
|
|
673
|
+
panel?: number;
|
|
674
|
+
/** Glass of the panels (default `glass`: annealed or laminated glass that breaks in large shards; `tempered_glass` breaks in small cubes). */
|
|
675
|
+
material?: string;
|
|
676
|
+
/** Glass thickness in metres: the two panes of an insulated unit (default 0.012, 6 + 6 mm). */
|
|
677
|
+
thickness?: number;
|
|
678
|
+
/** Mass of the aluminium frame per m² of facade (default 10 kg/m²). */
|
|
679
|
+
frameKgM2?: number;
|
|
680
|
+
/** Size of the pieces a broken panel falls in (default 0.6 m: a laminated pane breaks in large shards held by the interlayer). */
|
|
681
|
+
shard?: number;
|
|
682
|
+
/** Gap from the slab edge to the glass (default 0.1 m). */
|
|
683
|
+
offset?: number;
|
|
684
|
+
/** Storeys without glass (the mechanical floor has louvres): default none. */
|
|
685
|
+
skip?: (floor: number) => boolean;
|
|
686
|
+
}
|
|
687
|
+
declare const CURTAIN_DEFAULTS: {
|
|
688
|
+
readonly panel: 1.5;
|
|
689
|
+
readonly material: "glass";
|
|
690
|
+
readonly thickness: 0.012;
|
|
691
|
+
readonly frameKgM2: 10;
|
|
692
|
+
readonly shard: 0.6;
|
|
693
|
+
readonly offset: 0.1;
|
|
694
|
+
};
|
|
695
|
+
/**
|
|
696
|
+
* Adds a glass curtain wall around the frame: one panel per bay and storey, floor to floor, hung from the edge of the slab above it (`bolt`, carries
|
|
697
|
+
* nothing: role none). In a blast the panels shatter into `shard`-sized pieces (`units`) that fall from the facade; a panel whose slab falls goes
|
|
698
|
+
* with it. Part ids: `glass_<f>_<side>_<k>` with side `n`, `s`, `e`, `w`.
|
|
699
|
+
*/
|
|
700
|
+
declare function addCurtainWall(spec: DestructibleSpec, g: TowerGeometry, options?: CurtainWallOptions): DestructibleSpec;
|
|
701
|
+
interface PunchedFacadeOptions {
|
|
702
|
+
/** Material of the infill wall (default `brick`: a masonry or block wall between the columns, as the residential towers are built). */
|
|
703
|
+
material?: string;
|
|
704
|
+
/** Thickness of the wall in metres (default 0.2). */
|
|
705
|
+
thickness?: number;
|
|
706
|
+
/** Width of the window as a share of the clear bay (default 0.6). */
|
|
707
|
+
window?: number;
|
|
708
|
+
/** Sill and head of the window above the floor of the storey (default 0.9 and 2.4 m; the head is kept under the beam). */
|
|
709
|
+
sill?: number;
|
|
710
|
+
head?: number;
|
|
711
|
+
/** Glass of the window and its thickness (default `glass`, 12 mm: an insulated unit). */
|
|
712
|
+
glass?: string;
|
|
713
|
+
glassThickness?: number;
|
|
714
|
+
/** Storeys without infill (louvres on a mechanical floor): default none. */
|
|
715
|
+
skip?: (floor: number) => boolean;
|
|
716
|
+
}
|
|
717
|
+
declare const PUNCHED_DEFAULTS: {
|
|
718
|
+
readonly material: "brick";
|
|
719
|
+
readonly thickness: 0.2;
|
|
720
|
+
readonly window: 0.6;
|
|
721
|
+
readonly sill: 0.9;
|
|
722
|
+
readonly head: 2.4;
|
|
723
|
+
readonly glass: "glass";
|
|
724
|
+
readonly glassThickness: 0.012;
|
|
725
|
+
};
|
|
726
|
+
/**
|
|
727
|
+
* Closes the perimeter bays of every storey with an infill wall that has a window in it (the alternative to the curtain wall): a sill wall under the
|
|
728
|
+
* window, a wall over it and a pier at each side, all resting on the columns of the bay (role partition: they load the columns and carry nothing, as the
|
|
729
|
+
* walls of `buildFrame`), and the glass in the opening, which rests on the sill and carries nothing. Part ids: `infill_<f>_<side>_<k>_sill|head|pl|pr`,
|
|
730
|
+
* `glass_<f>_<side>_<k>` with side `n`, `s`, `e`, `w` (the same ids as the curtain wall, so the two exclude each other).
|
|
731
|
+
*/
|
|
732
|
+
declare function addPunchedFacade(spec: DestructibleSpec, g: TowerGeometry, options?: PunchedFacadeOptions): DestructibleSpec;
|
|
733
|
+
interface FlatRoofOptions {
|
|
734
|
+
/** Slope of the screed to the drains (default 0.01: 1%, the minimum of NBR 9575 for flat roofs). */
|
|
735
|
+
slope?: number;
|
|
736
|
+
/** Screed thickness at the drains (default 0.02 m). */
|
|
737
|
+
screedMin?: number;
|
|
738
|
+
/** Density of the screed (default 2000 kg/m³, cement and sand). */
|
|
739
|
+
screedDensity?: number;
|
|
740
|
+
/** Membrane material and thickness (default `rubber` 1.5 mm: an EPDM sheet). */
|
|
741
|
+
membrane?: string;
|
|
742
|
+
membraneThickness?: number;
|
|
743
|
+
/** Drains (default one per 150 m² of roof, at least 2, on the long centre line). */
|
|
744
|
+
drains?: number;
|
|
745
|
+
/** Water standing on the membrane in metres (default 0.005: 5 mm of a storm on its way to the drains); set it in game with `setLiters`. */
|
|
746
|
+
water?: number;
|
|
747
|
+
}
|
|
748
|
+
declare const FLAT_ROOF_DEFAULTS: {
|
|
749
|
+
readonly slope: 0.01;
|
|
750
|
+
readonly screedMin: 0.02;
|
|
751
|
+
readonly screedDensity: 2000;
|
|
752
|
+
readonly membrane: "rubber";
|
|
753
|
+
readonly membraneThickness: 0.0015;
|
|
754
|
+
readonly water: 0.005;
|
|
755
|
+
readonly areaPerDrain: 150;
|
|
756
|
+
};
|
|
757
|
+
/**
|
|
758
|
+
* Turns the top slab into a flat roof: a screed sloped to the drains (its weight from the mean thickness `screedMin + slope * run / 2`), the
|
|
759
|
+
* waterproofing membrane over it with the rain water on it (`contains` water, running down through a puncture: `outflow` [0, -1, 0], so a shot through
|
|
760
|
+
* the membrane is a `leak` into the floor below) and the drains (tag `drain`). Screed and membrane load the roof slab (role partition: carried,
|
|
761
|
+
* carry nothing). Part ids: `roof_screed`, `roof_membrane`, `roof_drain_<k>`.
|
|
762
|
+
*/
|
|
763
|
+
declare function addFlatRoof(spec: DestructibleSpec, g: TowerGeometry, options?: FlatRoofOptions): DestructibleSpec;
|
|
764
|
+
interface MechanicalFloorOptions {
|
|
765
|
+
/** Elevator machines: one per elevator, over its shaft (default from the core; 2). */
|
|
766
|
+
elevators?: number;
|
|
767
|
+
/** Where the shafts are, object-local `[x, z]` of each (default from the core layout). */
|
|
768
|
+
shafts?: Array<[number, number]>;
|
|
769
|
+
/** Mass of a traction machine with its frame (default 2500 kg) and of what hangs from it: car, counterweight, rated load (default 1500 + 2000 + 1000 kg). */
|
|
770
|
+
machineMass?: number;
|
|
771
|
+
suspendedMass?: number;
|
|
772
|
+
/** Water tank in litres (default: `occupants` per storey x 200 L a day x 40% stored up high, NBR 5626, plus a fire reserve of 6000 L, NBR 13714). */
|
|
773
|
+
waterLiters?: number;
|
|
774
|
+
occupants?: number;
|
|
775
|
+
fireReserve?: number;
|
|
776
|
+
/** Chillers on the floor (default 2 of 3500 kg). */
|
|
777
|
+
chillers?: number;
|
|
778
|
+
chillerMass?: number;
|
|
779
|
+
/** Material and wall thickness of the tank (default `plastic` 10 mm: a fibreglass or polyethylene reservoir). */
|
|
780
|
+
tankMaterial?: string;
|
|
781
|
+
tankWall?: number;
|
|
782
|
+
/** Where the tank goes, `[x, z]` (default the middle of the bay at -x, away from the core). */
|
|
783
|
+
tankAt?: [number, number];
|
|
784
|
+
/**
|
|
785
|
+
* Storey the equipment stands on (default the top one, under the roof). On any other storey the part ids end in `_<floor>` (`water_tank_20`,
|
|
786
|
+
* `chiller_0_20`), so a tower can carry a mechanical floor every few storeys (design T10 §11).
|
|
787
|
+
*/
|
|
788
|
+
floor?: number;
|
|
789
|
+
}
|
|
790
|
+
declare const MECHANICAL_DEFAULTS: {
|
|
791
|
+
readonly tankMaterial: "plastic";
|
|
792
|
+
readonly tankWall: 0.01;
|
|
793
|
+
readonly machineMass: 2500;
|
|
794
|
+
readonly suspendedMass: 4500;
|
|
795
|
+
readonly occupants: 16;
|
|
796
|
+
readonly litersPerPerson: 200;
|
|
797
|
+
readonly storedFraction: 0.4;
|
|
798
|
+
readonly fireReserve: 6000;
|
|
799
|
+
readonly chillers: 2;
|
|
800
|
+
readonly chillerMass: 3500;
|
|
801
|
+
};
|
|
802
|
+
/** Litres of the water tank of a building of `storeys` occupied storeys (NBR 5626 consumption, the fire reserve of NBR 13714). */
|
|
803
|
+
declare const towerWater: (storeys: number, o?: Pick<MechanicalFloorOptions, "occupants" | "fireReserve">) => number;
|
|
804
|
+
/**
|
|
805
|
+
* Makes the top storey the mechanical floor: the elevator machines over the shafts, the water tank (with its water: `contains`, a shot makes it leak)
|
|
806
|
+
* and the chillers, on the slab under the roof (role partition: their weight goes into the structure). Part ids: `machine_<k>`, `water_tank`,
|
|
807
|
+
* `chiller_<k>`.
|
|
808
|
+
*/
|
|
809
|
+
declare function addMechanicalFloor(spec: DestructibleSpec, g: TowerGeometry, options?: MechanicalFloorOptions): DestructibleSpec;
|
|
810
|
+
interface DamperOptions {
|
|
811
|
+
/** Mass of the damper in kg (default: `ratio` of the modal mass of the building, estimated as `modalShare` of its mass). */
|
|
812
|
+
mass?: number;
|
|
813
|
+
/** Mass ratio, damper over the modal mass of the building (default 0.01: 0.5 to 2% is the usual range). */
|
|
814
|
+
ratio?: number;
|
|
815
|
+
/** Share of the building's mass that is its modal mass in the first mode, tip at 1 (default 0.25, a uniform cantilever). */
|
|
816
|
+
modalShare?: number;
|
|
817
|
+
/** Frequency in Hz and damping ratio of the damper (default: tuned by the world to the building, `wind.tuning`). */
|
|
818
|
+
frequency?: number;
|
|
819
|
+
damping?: number;
|
|
820
|
+
/** Where it stands on the mechanical floor, object-local `[x, z]` (default on the beam end beside the column nearest to 35% of the depth at +z, clear of the machines: its weight goes straight to the beam and the column). */
|
|
821
|
+
at?: [number, number];
|
|
822
|
+
/** Material of the mass (default `steel`; the real ones are steel or lead-filled blocks and concrete). */
|
|
823
|
+
material?: string;
|
|
824
|
+
/** Tallest the block may be, metres (default 2.5: it stands inside the mechanical floor). */
|
|
825
|
+
maxHeight?: number;
|
|
826
|
+
}
|
|
827
|
+
declare const DAMPER_DEFAULTS: {
|
|
828
|
+
readonly ratio: 0.01;
|
|
829
|
+
readonly modalShare: 0.25;
|
|
830
|
+
readonly material: "steel";
|
|
831
|
+
readonly maxHeight: 2.5;
|
|
832
|
+
};
|
|
833
|
+
/** Mass in kg of a damper for a structure: `ratio` of `modalShare` of the mass of everything above the foundations (curtain wall, roof and equipment included). */
|
|
834
|
+
declare const damperMass: (spec: DestructibleSpec, o?: Pick<DamperOptions, "ratio" | "modalShare">) => number;
|
|
835
|
+
/**
|
|
836
|
+
* Adds a tuned mass damper to the mechanical floor: a block of `material` on the slab under the roof (role partition: its mass loads the slab and
|
|
837
|
+
* goes down to the core and the columns like the machines), with `PartSpec.damper` so the world tunes it to the building and moves it against the
|
|
838
|
+
* sway (Den Hartog). Part id: `damper`.
|
|
839
|
+
*/
|
|
840
|
+
declare function addTunedMassDamper(spec: DestructibleSpec, g: TowerGeometry, options?: DamperOptions): DestructibleSpec;
|
|
841
|
+
interface TowerMechanicalOptions {
|
|
842
|
+
/**
|
|
843
|
+
* Another mechanical floor every this many storeys (design T10 §11): storeys `every`, `2 * every`... below the top one, each with its own
|
|
844
|
+
* relay water tank for the storeys it serves and its chillers, and without glass. Default none: only the top storey.
|
|
845
|
+
*/
|
|
846
|
+
every?: number;
|
|
847
|
+
}
|
|
848
|
+
/** Indices of the intermediate mechanical storeys of a tower of `floors` storeys with one every `every` (none below `every / 2` storeys of the top one). */
|
|
849
|
+
declare const mechanicalStoreys: (floors: number, every?: number) => number[];
|
|
850
|
+
interface TowerOptions extends Omit<FrameOptions, 'walls' | 'roof' | 'continuousColumns'> {
|
|
851
|
+
/** The core (default on); `false` for a frame alone. */
|
|
852
|
+
core?: CoreOptions | false;
|
|
853
|
+
/** The curtain wall (default on, without glass on the mechanical floor). */
|
|
854
|
+
facade?: CurtainWallOptions | false;
|
|
855
|
+
/** A punched facade (infill walls with windows) instead of the curtain wall: turn the curtain wall off (`facade: false`) when you use it. Default off. */
|
|
856
|
+
punched?: PunchedFacadeOptions | false;
|
|
857
|
+
/** The flat roof (default on). */
|
|
858
|
+
flatRoof?: FlatRoofOptions | false;
|
|
859
|
+
/** The mechanical floor under the roof (default on). */
|
|
860
|
+
mechanical?: (MechanicalFloorOptions & TowerMechanicalOptions) | false;
|
|
861
|
+
/** A tuned mass damper on the mechanical floor (default off: `{}` adds one of 1% of the modal mass). */
|
|
862
|
+
damper?: DamperOptions | false;
|
|
863
|
+
/**
|
|
864
|
+
* The wind the tower is made for (default none: the tower is sized for its weight only). Its `speed`, `terrain`, `class`... size the walls, columns
|
|
865
|
+
* and core bars for the wind (`sizeStructure({ wind })`), and the fields of `WindExposure` (terrain, class, topography, statistical, drag, damping)
|
|
866
|
+
* go into `DestructibleSpec.wind`, where the building stands. The world still needs its own `wind` for the wind to blow.
|
|
867
|
+
*/
|
|
868
|
+
wind?: WindOptions | false;
|
|
869
|
+
/** Size the structure (`sizeStructure`, default `{}`); `false` keeps the material capacities. */
|
|
870
|
+
sizing?: SizeStructureOptions | false;
|
|
871
|
+
}
|
|
872
|
+
/** The fields of the wind options that describe the place and the shape of one building (`DestructibleSpec.wind`). */
|
|
873
|
+
declare const windExposureOf: (w: WindOptions) => WindExposure;
|
|
874
|
+
/** Defaults of the frame of a tower: 16 x 24 m on a 8 m grid, 12 storeys of 3 m, 60 cm columns caged with 20 mm bars, 60 cm beams, continuous columns. */
|
|
875
|
+
declare const TOWER_DEFAULTS: {
|
|
876
|
+
readonly spanX: 16;
|
|
877
|
+
readonly spanZ: 24;
|
|
878
|
+
readonly columnsX: 3;
|
|
879
|
+
readonly columnsZ: 4;
|
|
880
|
+
readonly floors: 12;
|
|
881
|
+
readonly height: 3;
|
|
882
|
+
readonly columnSize: 0.6;
|
|
883
|
+
readonly beamHeight: 0.6;
|
|
884
|
+
readonly slabThickness: 0.2;
|
|
885
|
+
readonly columnCage: {
|
|
886
|
+
readonly material: "steel";
|
|
887
|
+
readonly spacing: 0.15;
|
|
888
|
+
readonly diameter: 0.02;
|
|
889
|
+
};
|
|
890
|
+
};
|
|
891
|
+
/**
|
|
892
|
+
* A multi-storey building with real structure: a frame with continuous columns, the concrete core in the bay at +x of the centre, the curtain wall,
|
|
893
|
+
* the flat roof and the mechanical floor, sized as a designer would. Every system can be turned off or configured.
|
|
894
|
+
*/
|
|
895
|
+
declare function buildTower(options?: TowerOptions): DestructibleSpec;
|
|
896
|
+
|
|
897
|
+
/**
|
|
898
|
+
* The skyscraper as a recipe: a few numbers (storeys, bay, core ratio, facade, mechanical floors, damper, wind, soil and piles) that `skyscraperLayout`
|
|
899
|
+
* turns into the sizes of a `buildTower` and `buildSkyscraper` turns into a destructible spec on deep piles. The typologies that use it
|
|
900
|
+
* (`game-floorplan-commercial` office tower, `game-floorplan-residential` residential tower) bring their own defaults and the rooms of the plan; the
|
|
901
|
+
* structure is the same one. Design T10-estrutura-real.md §11.
|
|
902
|
+
*/
|
|
903
|
+
/** Deep foundation of a tower: bored piles under the raft, taken down to firm ground (`pileLength`) by the load each one carries. */
|
|
904
|
+
interface PileDesign {
|
|
905
|
+
/** Diameter in metres (default 1.2: the bored piles of high-rise foundations are 0.8 to 2.0 m). */
|
|
906
|
+
diameter?: number;
|
|
907
|
+
/** Grid pitch as a multiple of the diameter (default 3.5; the usual minimum is 2.5 to 3). */
|
|
908
|
+
pitch?: number;
|
|
909
|
+
method?: PileSpec['method'];
|
|
910
|
+
/** Longest pile in metres (default 60); when the load does not fit, the piles are put closer. */
|
|
911
|
+
maxLength?: number;
|
|
912
|
+
/** Fixed length and count (default: from the load and the soil). */
|
|
913
|
+
length?: number;
|
|
914
|
+
count?: number;
|
|
915
|
+
}
|
|
916
|
+
declare const PILE_DEFAULTS: {
|
|
917
|
+
readonly diameter: 1.2;
|
|
918
|
+
readonly pitch: 3.5;
|
|
919
|
+
readonly method: "bored";
|
|
920
|
+
readonly maxLength: 60;
|
|
921
|
+
};
|
|
922
|
+
/**
|
|
923
|
+
* Most storeys a skyscraper has by default (owner decision 2026-10-25): above about 60 the drift at the top passes H/500, because the engine has no outrigger
|
|
924
|
+
* or perimeter tube. A default, not a physical constant: `SkyscraperOptions.range` (or a preset with another `range`) raises it.
|
|
925
|
+
*/
|
|
926
|
+
declare const SKYSCRAPER_MAX_STOREYS = 60;
|
|
927
|
+
/** Numbers that describe one typology of skyscraper. Every one is an option of `skyscraperLayout`. */
|
|
928
|
+
interface SkyscraperPreset {
|
|
929
|
+
/** Storeys: the default and the range the typology accepts (the top storey is the mechanical floor). */
|
|
930
|
+
storeys: number;
|
|
931
|
+
range: readonly [number, number];
|
|
932
|
+
/** Clear height of a storey in metres (the storey pitch is this plus the slab). */
|
|
933
|
+
height: number;
|
|
934
|
+
/** Column spacing in metres along x and z. */
|
|
935
|
+
bay: readonly [number, number];
|
|
936
|
+
/** Bays along x and z (z always odd: the core stands in the middle bay, between two rows of beams). */
|
|
937
|
+
bays: readonly [number, number];
|
|
938
|
+
/** Tallest the tower may be over its narrowest side (default 9: Taipei 101 is 8.3, the Burj Khalifa 8); the bays are widened to keep it. `false` leaves them as given. */
|
|
939
|
+
slenderness: number | false;
|
|
940
|
+
/** Target share of the floor plate taken by the concrete core (tube footprint over plate); the number of elevators follows, as far as the bay allows. */
|
|
941
|
+
coreRatio: number;
|
|
942
|
+
facade: 'curtain' | 'punched';
|
|
943
|
+
/** Another mechanical floor every this many storeys; `false` none (only the top one). */
|
|
944
|
+
mechanicalEvery: number | false;
|
|
945
|
+
/** Total height in metres from which a tuned mass damper is added on the top mechanical floor; `false` never. */
|
|
946
|
+
damperAbove: number | false;
|
|
947
|
+
/** The wind the tower is designed for (`buildTower({ wind })`). */
|
|
948
|
+
wind: WindOptions | false;
|
|
949
|
+
/** The ground: a soil class id or a profile of layers; `false` leaves the tower on anchored ground. */
|
|
950
|
+
soil: string | SoilProfile | false;
|
|
951
|
+
/** Deep piles under the raft (only with `soil`); `false` leaves a shallow raft. */
|
|
952
|
+
piles: PileDesign | false;
|
|
953
|
+
/**
|
|
954
|
+
* Sizes the lateral system by height (default on): a tower taller than `above` metres whose design drift at the requested storeys is over the limit of
|
|
955
|
+
* the wind (`driftLimit`, default H/500: NBR 6118 serviceability) gets wider bays, and with them a larger plate and core, in steps of 0.5 m up to `maxBay`
|
|
956
|
+
* until it passes. `false` keeps the layout as given (and then a 60-storey tower is `drift`).
|
|
957
|
+
*/
|
|
958
|
+
sizeForWind?: boolean | {
|
|
959
|
+
above?: number;
|
|
960
|
+
maxBay?: number;
|
|
961
|
+
};
|
|
962
|
+
/** Dead load per m² of floor besides the slab itself, kg/m² (facade, partitions, finishes, equipment), used to size the columns. */
|
|
963
|
+
superimposed: number;
|
|
964
|
+
}
|
|
965
|
+
/** Defaults of a generic skyscraper: a 40-storey tower on 12 m bays with a curtain wall, a plant floor every 20 storeys, a damper above 150 m, in a city wind, on piles to the sand under soft clay. */
|
|
966
|
+
declare const SKYSCRAPER_DEFAULTS: SkyscraperPreset;
|
|
967
|
+
interface SkyscraperOptions extends Partial<Omit<SkyscraperPreset, 'bay' | 'bays'>> {
|
|
968
|
+
bay?: number | readonly [number, number];
|
|
969
|
+
bays?: readonly [number, number];
|
|
970
|
+
/** Sizes derived from the load and the height unless given: columns, beam depth and slab thickness in metres. */
|
|
971
|
+
columnSize?: number;
|
|
972
|
+
beamHeight?: number;
|
|
973
|
+
slabThickness?: number;
|
|
974
|
+
/** The core (`false`: a frame alone); `wallThickness` and `elevators` are derived unless given. */
|
|
975
|
+
core?: CoreOptions | false;
|
|
976
|
+
curtain?: CurtainWallOptions;
|
|
977
|
+
punchedFacade?: PunchedFacadeOptions;
|
|
978
|
+
flatRoof?: FlatRoofOptions | false;
|
|
979
|
+
mechanical?: (MechanicalFloorOptions & TowerMechanicalOptions) | false;
|
|
980
|
+
damper?: DamperOptions;
|
|
981
|
+
sizing?: SizeStructureOptions | false;
|
|
982
|
+
}
|
|
983
|
+
interface SkyscraperLayout {
|
|
984
|
+
storeys: number;
|
|
985
|
+
/** Clear height, slab and storey pitch in metres. */
|
|
986
|
+
height: number;
|
|
987
|
+
slab: number;
|
|
988
|
+
pitch: number;
|
|
989
|
+
/** Height from the ground to the roof. */
|
|
990
|
+
total: number;
|
|
991
|
+
bay: [number, number];
|
|
992
|
+
/** Distance between the outer column axes. */
|
|
993
|
+
span: [number, number];
|
|
994
|
+
columnsX: number;
|
|
995
|
+
columnsZ: number;
|
|
996
|
+
columnSize: number;
|
|
997
|
+
beamHeight: number;
|
|
998
|
+
/** Size of the floor slab, `[x, z]`, centred on the origin of the spec. */
|
|
999
|
+
plate: [number, number];
|
|
1000
|
+
core: {
|
|
1001
|
+
center: [number, number];
|
|
1002
|
+
size: [number, number];
|
|
1003
|
+
wallThickness: number;
|
|
1004
|
+
elevators: number;
|
|
1005
|
+
stairWidth: number;
|
|
1006
|
+
shaftDepth: number;
|
|
1007
|
+
} | null;
|
|
1008
|
+
/** Footprint of the core over the plate. */
|
|
1009
|
+
coreRatio: number;
|
|
1010
|
+
facade: 'curtain' | 'punched';
|
|
1011
|
+
/** Storeys with plant (the intermediate ones and the top one), ascending. */
|
|
1012
|
+
mechanical: number[];
|
|
1013
|
+
damper: boolean;
|
|
1014
|
+
/** The options `buildTower` is called with. */
|
|
1015
|
+
tower: TowerOptions;
|
|
1016
|
+
}
|
|
1017
|
+
/**
|
|
1018
|
+
* Resolves the numbers of a skyscraper from a preset and the options. Without `sizeForWind: false`, a tall tower that would drift past H/500 gets wider
|
|
1019
|
+
* bays (so a larger plate and core) until it does not: the way real towers thicken the core and widen the footprint with height. Memoised, because it
|
|
1020
|
+
* builds the tower to measure it.
|
|
1021
|
+
*/
|
|
1022
|
+
declare function skyscraperLayout(options?: SkyscraperOptions, preset?: SkyscraperPreset): SkyscraperLayout;
|
|
1023
|
+
/**
|
|
1024
|
+
* Piles under the raft, by the load: a grid of `pitch` diameters over the raft, each as long as it needs to carry its share of the tower with the
|
|
1025
|
+
* NBR 6122 safety (`pileLength`); when that is longer than `maxLength` the grid is closed up and tried again, down to a pitch of 2.5 diameters.
|
|
1026
|
+
*/
|
|
1027
|
+
declare function pilesFor(spec: DestructibleSpec, soil: string | SoilProfile, design?: PileDesign): PileSpec;
|
|
1028
|
+
/** The tower of a layout: `buildTower` on a raft, then the soil and, with it, the deep piles sized by the load. */
|
|
1029
|
+
declare function buildSkyscraper(options?: SkyscraperOptions, preset?: SkyscraperPreset): DestructibleSpec;
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* The floor plan of a skyscraper at room level, shared by every typology: a central core (stairs, elevator shafts and a service shaft) inside a ring of
|
|
1033
|
+
* corridors, with the four strips of the perimeter left for the typology (office suites, apartments) to fill. The plate and the core come from the
|
|
1034
|
+
* same `SkyscraperLayout` as the structure (`buildSkyscraper`), so a room of the plan stands where the structure has its slab and its core. The plan is in
|
|
1035
|
+
* the space of `game-floorplan` (`u` to the right, `v` to the back, from the front-left corner); the structure is centred (`planToSpace`). Design
|
|
1036
|
+
* T10-estrutura-real.md §11.5.
|
|
1037
|
+
*/
|
|
1038
|
+
/** `[u0, v0, u1, v1]`. */
|
|
1039
|
+
type PlateRect = [number, number, number, number];
|
|
1040
|
+
interface PlateOptions {
|
|
1041
|
+
/** Width of the corridors around the core (default 1.8 m). */
|
|
1042
|
+
corridor?: number;
|
|
1043
|
+
/** Width of the elevator lobby beside the shafts (default 3 m). */
|
|
1044
|
+
lobby?: number;
|
|
1045
|
+
/** Narrowest the stair room is made (default 3.4 m): the stairs need more than the tube's clear width. */
|
|
1046
|
+
stairWidth?: number;
|
|
1047
|
+
}
|
|
1048
|
+
declare const PLATE_DEFAULTS: {
|
|
1049
|
+
readonly corridor: 1.8;
|
|
1050
|
+
readonly lobby: 3;
|
|
1051
|
+
readonly stairWidth: 3.4;
|
|
1052
|
+
};
|
|
1053
|
+
type StripId = 'south' | 'north' | 'west' | 'east';
|
|
1054
|
+
/** One of the four bands of the perimeter, where the typology puts its rooms. */
|
|
1055
|
+
interface PlateStrip {
|
|
1056
|
+
id: StripId;
|
|
1057
|
+
/** Side of the building the outer edge is on, as `game-floorplan` names it. */
|
|
1058
|
+
side: 'front' | 'back' | 'left' | 'right';
|
|
1059
|
+
rect: PlateRect;
|
|
1060
|
+
/** The strip runs along `u` (south and north) or along `v` (west and east). */
|
|
1061
|
+
alongU: boolean;
|
|
1062
|
+
/** Length along the perimeter and depth from the outer wall to the circulation, metres. */
|
|
1063
|
+
length: number;
|
|
1064
|
+
depth: number;
|
|
1065
|
+
/** Id (without the storey suffix) of the circulation room the inner edge touches: `corridor_s`, `corridor_n`, `corridor_w` or `lobby`. */
|
|
1066
|
+
circulation: string;
|
|
1067
|
+
}
|
|
1068
|
+
interface TowerPlate {
|
|
1069
|
+
w: number;
|
|
1070
|
+
d: number;
|
|
1071
|
+
core: PlateRect;
|
|
1072
|
+
stairs: PlateRect;
|
|
1073
|
+
service: PlateRect | null;
|
|
1074
|
+
shafts: PlateRect[];
|
|
1075
|
+
lobby: PlateRect;
|
|
1076
|
+
corridors: {
|
|
1077
|
+
s: PlateRect;
|
|
1078
|
+
n: PlateRect;
|
|
1079
|
+
w: PlateRect;
|
|
1080
|
+
};
|
|
1081
|
+
strips: PlateStrip[];
|
|
1082
|
+
}
|
|
1083
|
+
/** The plate of a layout: where the core, its rooms, the circulation and the four strips stand. */
|
|
1084
|
+
declare function towerPlate(layout: SkyscraperLayout, options?: PlateOptions): TowerPlate;
|
|
1085
|
+
/** A point of the plan (`u`, `v`) in the space of the structure (centred on the plate, `x` right, `z` back). */
|
|
1086
|
+
declare const planToSpace: (layout: SkyscraperLayout, [u, v]: [number, number]) => [number, number];
|
|
1087
|
+
type StoreyKind = 'ground' | 'typical' | 'mechanical';
|
|
1088
|
+
/** What kind each storey is: the first is the ground floor, the mechanical ones are the plant floors of the layout, the rest are typical. */
|
|
1089
|
+
declare const storeyKinds: (layout: SkyscraperLayout) => StoreyKind[];
|
|
1090
|
+
interface StoreyContext {
|
|
1091
|
+
floor: number;
|
|
1092
|
+
kind: StoreyKind;
|
|
1093
|
+
layout: SkyscraperLayout;
|
|
1094
|
+
plate: TowerPlate;
|
|
1095
|
+
/** Floor to floor, metres: the ceiling of the plan floor. */
|
|
1096
|
+
ceiling: number;
|
|
1097
|
+
}
|
|
1098
|
+
interface StripFill {
|
|
1099
|
+
rooms: RoomDef[];
|
|
1100
|
+
doors: DoorDef[];
|
|
1101
|
+
windows: WindowDef[];
|
|
1102
|
+
}
|
|
1103
|
+
/** Fills one strip of a storey with rooms. Room ids must be unique in the whole tower: end them with the storey (`_${floor}`). */
|
|
1104
|
+
type StripFiller = (strip: PlateStrip, storey: StoreyContext) => StripFill;
|
|
1105
|
+
interface TowerPlanOptions extends PlateOptions {
|
|
1106
|
+
/** The perimeter of the typical storeys. */
|
|
1107
|
+
typical: StripFiller;
|
|
1108
|
+
/** The ground floor (default: the typical filler). */
|
|
1109
|
+
ground?: StripFiller;
|
|
1110
|
+
/** The plant floors (default: one plant room per strip, no windows). */
|
|
1111
|
+
mechanical?: StripFiller;
|
|
1112
|
+
}
|
|
1113
|
+
/** Cuts a strip into `count` equal parts along its length. */
|
|
1114
|
+
declare const splitStrip: (strip: PlateStrip, count: number) => PlateRect[];
|
|
1115
|
+
/**
|
|
1116
|
+
* Windows on every outside wall of a room of the plate, `spacing` metres apart (at least one a wall); `y0`, `y1` the sill and head (default 0.3 and the
|
|
1117
|
+
* ceiling less 0.5 m, a glass facade).
|
|
1118
|
+
*/
|
|
1119
|
+
declare function exteriorWindows(id: string, rect: PlateRect, plate: TowerPlate, ceiling: number, o?: {
|
|
1120
|
+
spacing?: number;
|
|
1121
|
+
width?: number;
|
|
1122
|
+
y0?: number;
|
|
1123
|
+
y1?: number;
|
|
1124
|
+
}): WindowDef[];
|
|
1125
|
+
/** The door from a room of a strip to the circulation it touches. */
|
|
1126
|
+
declare const stripDoor: (id: string, strip: PlateStrip, floor: number, width?: number) => DoorDef;
|
|
1127
|
+
/**
|
|
1128
|
+
* The storeys of a tower as `FloorDef`s for `TemplateDef.floorsFn`: each has the core and the circulation, the strips filled by the typology for its
|
|
1129
|
+
* kind of storey (ground, typical, plant), `ceiling` the storey pitch of the structure. The template's size must be the plate (`layout.plate`).
|
|
1130
|
+
*/
|
|
1131
|
+
declare function towerFloors(layout: SkyscraperLayout, plan: TowerPlanOptions): FloorDef[];
|
|
1132
|
+
/** The names of the rooms and storeys the plan helpers make (`elevator_lobby`, `plant_room`, `typical_floor`...), for the packs that fill the strips to register with `engine.registerLocale`. */
|
|
1133
|
+
declare const towerLocales: {
|
|
1134
|
+
readonly en: {
|
|
1135
|
+
readonly labels: {
|
|
1136
|
+
elevator_lobby: string;
|
|
1137
|
+
service_shaft: string;
|
|
1138
|
+
plant_room: string;
|
|
1139
|
+
mechanical_floor: string;
|
|
1140
|
+
typical_floor: string;
|
|
1141
|
+
};
|
|
1142
|
+
};
|
|
1143
|
+
readonly 'pt-BR': {
|
|
1144
|
+
readonly labels: {
|
|
1145
|
+
elevator_lobby: string;
|
|
1146
|
+
service_shaft: string;
|
|
1147
|
+
plant_room: string;
|
|
1148
|
+
mechanical_floor: string;
|
|
1149
|
+
typical_floor: string;
|
|
1150
|
+
};
|
|
1151
|
+
};
|
|
1152
|
+
};
|
|
1153
|
+
|
|
478
1154
|
declare const version = "0.1.0";
|
|
479
1155
|
|
|
480
|
-
export { CONSTRUCTIONS, CONSTRUCTION_SYSTEMS, type ChaletOptions, type Chimney, type Construction, type ConstructionBuild, type ConstructionBuilder, type ConstructionSystem, type ConstructionSystemDef, DENSITY, type DestructibleSpecOptions, type FoundationType, GROUND, type Opening, type PartRole, type PlanContext, ROOF_COVERINGS, type Rect, type Roof, type RoofCoveringDef, type RoofPane, type RoofShape, type ShackOptions, type SourceDoor, type SourceWall, type SourceWindow, type Structure, type StructureExtras, type StructureOptions, type StructurePackOptions, type StructurePart, type StructureSource, type Support, type TankPlanOptions, type TankPlatform, type Tent, type WallDetail, type WallMaterials, type WallSpecimenOptions, type WaterTank, type WoodFrameOptions, buildStructure, buildWallSpecimen, campConstruction, chaletConstruction, constructionOfSystem, logCabinConstruction, masonryConstruction, planWaterTank, register, registerConstruction, registerConstructionSystem, registerRoofCovering, shackConstruction, structureLayer, toDestructibleSpec, version, woodFrameConstruction };
|
|
1156
|
+
export { CONSTRUCTIONS, CONSTRUCTION_SYSTEMS, CORE_DEFAULTS, CURTAIN_DEFAULTS, type ChaletOptions, type Chimney, type Construction, type ConstructionBuild, type ConstructionBuilder, type ConstructionSystem, type ConstructionSystemDef, type CoreOptions, type CurtainWallOptions, DAMPER_DEFAULTS, DENSITY, type DamperOptions, type DestructibleSpecOptions, FLAT_ROOF_DEFAULTS, type FlatRoofOptions, type FoundationType, GROUND, MECHANICAL_DEFAULTS, type MechanicalFloorOptions, type Opening, PILE_AREA, PILE_DEFAULTS, PLATE_DEFAULTS, PUNCHED_DEFAULTS, type PartRole, type PileDesign, type PlanContext, type PlateOptions, type PlateRect, type PlateStrip, type PunchedFacadeOptions, RAFT_THICKNESS, REBAR_RATIOS, ROOF_COVERINGS, type Rect, type Roof, type RoofCoveringDef, type RoofPane, type RoofShape, SKYSCRAPER_DEFAULTS, SKYSCRAPER_MAX_STOREYS, SLAB_PANEL_DEFAULTS, type ShackOptions, type SkyscraperLayout, type SkyscraperOptions, type SkyscraperPreset, type SlabPanelOptions, type SourceDoor, type SourceWall, type SourceWindow, type StoreyContext, type StoreyKind, type StripFill, type StripFiller, type StripId, type Structure, type StructureExtras, type StructureOptions, type StructurePackOptions, type StructurePart, type StructureSource, type Support, TOWER_DEFAULTS, type TankPlanOptions, type TankPlatform, type Tent, type TowerGeometry, type TowerMechanicalOptions, type TowerOptions, type TowerPlanOptions, type TowerPlate, type WallDetail, type WallMaterials, type WallSpecimenOptions, type WaterTank, type WoodFrameOptions, addCore, addCurtainWall, addFlatRoof, addMechanicalFloor, addPunchedFacade, addTunedMassDamper, applySlabPanels, beamDepthFor, beamSpan, buildSkyscraper, buildStructure, buildTower, buildWallSpecimen, campConstruction, chaletConstruction, constructionOfSystem, coreSize, damperMass, exteriorWindows, logCabinConstruction, masonryConstruction, mechanicalStoreys, pilesFor, planToSpace, planWaterTank, register, registerConstruction, registerConstructionSystem, registerRoofCovering, resolveSlabPanels, shackConstruction, skyscraperLayout, slabPanelView, slabPanelsOf, splitStrip, storeyKinds, stripDoor, structureLayer, toDestructibleSpec, towerFloors, towerLocales, towerPlate, towerWater, version, windExposureOf, woodFrameConstruction };
|