Before you start
You have a project with the viewsground-plan, section-a and elevation-south, and the section mark, from Create a plan view and Cut a section.
Write the sheet
All sizes and positions on a sheet are in millimetres. The origin is the top-left corner of the page. This sheet starts with one viewport, the plan at 1:50.Add it to the project
Put more views on the sheet
Add one viewport for each view. These viewports put the section at 1:50 and the elevation at 1:100.Change the scale
The scale is a field of the viewport. The title below the viewport shows the new scale.Number the section mark
The section mark on the plan can show where its section is. Give the target of the mark the sheet and the viewport. The mark then reads2 / A-101: drawing 2 on sheet A-101.
Add a dimension and a note
A sheet holds annotations. Ameasure dimension uses two points of the model, in metres, in the view of one viewport. Floorkit calculates the distance, so the text is always the real size. A text note uses one point on the page, in millimetres.
Show the sheet on screen
createSheetRenderer makes the screen view of a sheet. It needs your sheets and a function that draws a saved view. Here project is a function, so the renderer always draws your current project.
resolveSavedView draws a viewport that has a viewId. extractor draws a viewport that has its own source. This project has no such viewport, so the extractor gives the plan.
After you change the project, call renderer.update(project.paper).
Let the user arrange the page
The user can select a viewport or an annotation and move it. The renderer does not change your project. It sends an event, and you save the change.create event comes from a drawing tool. renderer.setTool('text') starts the text tool: the user clicks the page and gets a note. Other tools are 'dimension', 'leader', 'line' and 'rect'. renderer.setTool('select') goes back to selection.
Change the paper style
A paper style changes the pens, the fills and the lettering of the sheet. It does not change your project.undefined goes back to the style of the document. To export with a style, pass { style: 'ink-sketch' } as the options of exportProjectPdf.
Rules
- The
sizeof the page must agree with itsformatandorientation.pageSizegives you the correct values. - A viewport shows the full view, centred in its frame. Set
viewCenterto keep one model point in the centre. - To show the same view at a different scale, add a second viewport with the same
viewId. - The points of a
measuredimension do not follow the model. If you move the wall, set the points again. - The renderer shows your sheets. It does not own them. Save each change in your project, then call
update.
Next
Export a PDF
Get this sheet as a file.
Sheet types
See each field of a sheet, a viewport and an annotation.
createSheetRenderer API
See each member of the screen view.
Paper styles API
Make your own style.