Before you start
You have a session from Start a building. The ground storey is 3 metres high.Write the storey
The new storey starts at 3 metres. It has its own walls and its own floor slab.Add it to the building
add-storey command adds the storey with its elements, and the session builds it. You keep the session and its undo history. The command rejects a storey id that the building has. It puts the storey last in the list of storeys. The order of the list is free: the elevation of each storey places it, not its place in the list.
replace-storey-settings sets the name, the elevation, the height, the usage and the areaKind of a storey, and remove-storey removes a storey. See Editing and history. In a project, remove-storey is refused with storey-in-use while a plan view or a roof plan view shows the storey; remove the view first.
Insert a storey
insert-storey puts a new, empty storey on top of the storey belowId. The new storey starts at the elevation plus the height of that storey. Every storey that starts at or over that height moves up by the height of the new storey, so the storeys above stay stacked. A storey that starts inside the storey belowId, such as a mezzanine, stays where it is.
name is optional. The command rejects a belowId that the building does not have, and a height that is not a number above 0.
Change a height and restack
replace-storey-settings with restack: true moves the storeys above with the storey. Each storey that starts at or over the old top of the storey moves by the change of its top: a storey that is 0.4 m taller lifts every storey above it by 0.4 m, and a new elevation moves them by the same amount. A mezzanine that starts inside the storey stays where it is. Without restack, only the storey changes, and a taller storey can overlap the one above.
Copy a storey
copy-storey copies the storey fromId with all its elements and puts the copy directly on top of it, at the elevation plus the height of the source. Every storey above moves up by that height, as with insert-storey. The copy has the id newStoreyId and the name that you give; without a name it has none.
second:first-walls. The links inside the storey follow: hosted openings, saved wall joins and trims, dimensions tied to a wall, railings on a stair, and a stair that links to a slab hole of its own storey. A stair that links to a slab hole on another storey gives that link to its copy: the copy now stands under the hole, and one hole has one stair. The stair of the source has no hole above it until you cut one.
What moves with a storey
Wheninsert-storey, copy-storey or a restack moves a storey, its elements move with it. Most elements use offsets from the storey elevation, so they need no change. Two kinds use world heights, and the commands move them too:
- A railing with a
pathhas world points. Its points move up with its storey. A railing on a stair follows the stair. - A model object sits on a working plane of the building. A plane that only moving storeys use moves with them. A plane that a moving storey shares with a storey that stays gets a copy for the moving storey, with the id
<storeyId>:<planeId>, and the objects of that storey use the copy.
levels of a building are datums of their own. No storey command moves them, and a level does not follow a storey.
If the building has a mass, each part of the mass must still be tiled by its storeys, and the elevation of the mass does not move. An insert, a copy or a restack below the top of the mass moves storeys of the mass off it, and is refused with storeys-do-not-tile-segment; change the mass with replace-mass instead. A storey inserted or copied on top of the mass is in no part of it, and the model check warns with storey-outside-mass.
Rules
elevationis the height of the storey floor in the world. It is the only world height in a storey.- The elements in a storey use offsets from that elevation. You do not add the elevation to them.
- Each storey has its own walls. Walls on different storeys do not join.
- Ids are unique in the full model, not only in one storey.
- Two storeys can overlap, for a mezzanine. The model check warns with
storeys-overlap, because an overlap is often a wrong elevation. - A vertical gap between two storeys is valid and gives no warning.
Use the storey in commands
Each edit command names its storey. To add a door to the new walls, usestoreyId: 'first' and wallId: 'first-walls'.
Next
Move and reshape
Change the elements that you made.
Create a plan view
Make a plan of one storey.