Before you start
You have a project from Create a plan view.Save a section
This section cuts the building along the line from[4.5, -1] to [4.5, 5]. The line goes through the window and across the roof ridge. The view looks to the right of that line, to the door, and shows 5 metres of depth.
settings.openingDetail sets how doors and windows draw in a section or an elevation. With no openingDetail, every drawing is the same as before:
frameLines: 'outer'draws the frame, mullions and transoms of a window as one band: the lines where they meet are left out. The default'both-faces'draws both faces of each member.sashOutlines: falseleaves out the inner outline of each sash. The default istrue.sill: 'line'draws a sill as its top line, and'none'leaves it out. In both, the wall shows below the line. The default'box'draws its outline.
settings.roomOutlines: truedraws each room that the cut line crosses as a closed thin line, from the floor of the room to its height. A room with noheightgoes up to the top of its storey.settings.groundLine.fillBelow: truefills the ground under each run of the ground line, down to the bottom of the crop, as aSITEregion of rolegroundhatchedearth. It draws under the building and the line. Theearthhatch is the drawing’s own fill, so a paper style replaces it only withproducerFill: 'ignore'and its own fill for the role, for example{ producerFill: 'ignore', roles: { ground: { hatch: 'gravel' } } }. Off when absent; an elevation with it is refused withinvalid-ground-line.settings.belowGround: 'omit'leaves out the cut and seen material under the ground line of the site. The ground line stays. A model with no site draws all of it, with a warning. A view with anelementIdslist draws no ground line, but'omit'still clips at the site ground.
{ ...sectionA, showContext: false, settings: { levelHeads: 'omit', furniture: 'omit' } } draws only the building:
settings.levelHeads: 'omit'leaves out the head of each storey and saved level. The grids and the heads of thelevelHeadslist of the view still draw.settings.surfaceColors: 'omit'leaves out thesurfaceBackgroundand thesurfacePatternColorof the materials, as a line drawing.settings.furniture: 'omit'leaves out every placed block, furniture and fixtures. A view whoseelementIdsnames a block is refused.showContext: falseleaves out the context buildings of the site. The ground line and the site boundary stay.
buildingId: 'house' draws the house alone. buildingIds: ['house', 'garage'] draws the buildings it names and leaves the others out, with their level heads and grids: for example a proposed street elevation without the existing house. A project keeps as many saved sections as you add, each with its own id. Opening a project refuses an empty buildingIds, an id listed twice, an id with buildingId (invalid-views) and an id that is no building (unknown-building).
With showSiteBoundary: true, two settings change the red site boundary line. settings.siteBoundaryLabel: { text: 'Boundary Line' } writes the text up each line, outside the site. settings.siteBoundaryExtent: { top: 'eaves', behindBuilding: true } starts the line at the highest eaves and hides it behind the building. See Label the boundary and choose the site texts.
Measure a height from the mean ground
A section or an elevation keepslevelHeads and heightDimensions, each between two height references. On sloping ground (site.groundPoints), { kind: 'ground' } is the site elevation, one level. { kind: 'mean-ground', buildingId } is the mean height of the ground around a building instead: along the outer faces of the walls of its lowest storey.
sampling: 'outline'(the default) is the mean along the whole outline, weighted by length and exact on the facets of the ground.'corners'is the mean at the corners of the outline.{ everyM: 1 }is the mean at points spread evenly along the outline, about that many metres apart. Use the one your rule names.ground: 'existing'readssite.existingGroundPointsin place of the finished ground. With no ground points the finished ground is flat at the siteelevation, and so is its mean.- A level head on it prints
Mean groundunless it has alabel. A building with no walls on its lowest storey, or'existing'on a site with none, names nothing: the mark is not drawn and the drawing’swarningssay so. - Opening a project refuses a blank
buildingId, anothergroundorsampling, aneveryMthat is not above 0, or another field, withinvalid-height-ref.
Save an elevation
This elevation looks at the south face. Theorigin is 2 metres in front of the building, and lookDirection points to the building.
origin. In that frame the vertical axis points down. Thus bottom: -6 keeps 6 metres above the zero height, and top: 0.5 keeps 0.5 metres below it.
Show part of a view
ApartialCrop draws only the part of a section or an elevation inside its outline. Each edge in breakEdges draws as a break line: a thin line with a zigzag at its middle. Set breakStyle: 'plain' to draw each break edge as one straight thin line instead. Edge i goes from outline[i] to the next point. Use it for a long party wall of a terraced house, where the real drawing shows one part of the wall.
outline is in metres in the frame of the view, with the vertical axis up: x is the distance across the view, and y is the world height. This is the opposite of the vertical axis of an elevation crop. For a section, x goes from 0 at the left of the view to the length of the cut line, and y is in verticalCrop. Every point must be inside the crop of the view. The ground line stops at the outline, and the level labels stay next to the part that draws.
Add the views to the project
drawProjectView(project, 'section-a', { session }), or put it on a sheet. With { session }, the drawing reads the live build of the session. Without a session, drawProjectView builds a temporary copy of the model.
Show the cut on the plan
A mark on the plan shows where the section cuts. You save which plan gets the mark and which view it points to. Floorkit takes the line from the section, so the mark moves when you change the section.[unplaced] Section A until the section is on a sheet. Compose a sheet gives it a drawing number.
Rules
- Draw the cut line fully across the building. Start and end it outside the walls.
- Keep the cut line and the far limit of the view away from wall faces, from the edges of openings and from the roof ridge. Floorkit rejects a view when one of its limits only touches a face or lies along an edge. Move the line, or change
depth, by some centimetres. - Door leaves are closed in a section and in an elevation. With
settings.doorLeaves: 'open', a leaf reaches one door width out of its wall. Include that distance when you setdepth. - An elevation does not cut. When its plane goes through an element, for example an open door leaf or a wall, the elevation draws all of that element, also the part in front of the plane.
- A level label is at the left of the view, outside the crop. Give the view some empty width on that side when you put it on a sheet.
- Level heads on one side whose text would meet on the paper stack: the lowest stays on its level, and each one above moves up, 1 mm clear of the text below it, at the scale of the view’s first sheet viewport. A moved head prints its true value; its level line stays on the true level and turns up to the head.
settings.levelHeadStacking: 'off'draws every head on its level. - A section uses a straight line. An elevation looks from outside the building.
- Blocks (furniture and fixtures) draw in projection with the projection pen. A cut line through a block draws its edges, with no cut line and no poché. A block hides what is behind it.
- Each cut region and each cut line belongs to one element: it has one
sourceRefand the element’sstyle.ogType. Elements that touch still draw one outline around them, with no line where they meet. - The glass of a curtain wall draws as two cut lines with
style.material: 'GLASS', at 0.18 mm, with no poché. - Railings draw lighter than walls: 0.25 mm cut, 0.18 mm outline, 0.13 mm projected.
- If Floorkit cannot cut one element, it leaves that element out and adds a line to
warningsof the drawing. The other elements draw. - If Floorkit cannot draw the view,
drawProjectViewthrowsProjectDrawingErrorwith acode.
Next
Compose a sheet
Put the section next to the plan.
Marks and level labels API
See each field of a mark.