Expand description
Drawing sheets — the document’s sheets block, the projection of a placed
PMI view into paper millimetres, and the SVG writer.
§The sheets block
{ sheets: [{ id, name, size, widthMm, heightMm, views: [{ id, view, position, scale, projection }] }], idCounter }, a top-level key of the
saved document beside pmi and partAttributes. It is ABSENT on every
document without a sheet (and omitted on re-serialize), so a part that
never had one saves byte-identically. The kernel never sees it: a sheet
places what the PMI tail already resolved, so the block rides the
document’s unknown-key pass-through (crate::history::History::request_json
serializes the raw document) exactly as partAttributes does — no
HistoryRequest field, no migration, because it is new.
A sheet is a paper size in millimetres (a preset or a custom pair), the
paper’s own FURNITURE — a drawing border inset from the page edge and a
title block in its bottom-right corner (frame) — and an ordered list of
placed views. A placed view names a saved PMI view
by id and adds where it sits on the paper (position, mm from the paper’s
top-left corner), how big it draws (scale, paper mm per model unit) and
its projection kind. The saved view’s own camera is what the placement
projects through; its zoom (halfHeight) is NOT the sheet scale — a sheet
says how large the part draws on paper, the camera only says from where.
§This slice
Orthographic only: a placed view whose saved camera is perspective is
REFUSED at placement with a message rather than silently flattened
(EngineState::sheet_place_view, and the placement form that re-points a
placement). Hidden lines are removed exactly, on the B-rep — see
hlr for the pass and its floors, project for the placements, and
docs/panels/sheets.md for the user-facing contract.
Modules§
- dimension
- Sheet dimensions — a dimension drawn ON the paper, anchored to the projected geometry of a placed view rather than to a PMI annotation.
- frame
- The paper’s own furniture: the drawing BORDER and the TITLE BLOCK.
- hlr
- The ANALYTIC hidden-line pass: what a sheet draws of the model, computed from the B-rep rather than from the display mesh.
- ordinate
- Ordinate sets — a DATUM and a run of members, each reading its signed distance from the datum along one axis of the paper.
- The sheet’s PDF output contract — a minimal PDF 1.4 writer, no crate (1.7 when it carries a 3D model; see the last section).
- pdf3d
- The live 3D model a sheet PDF can carry — a U3D stream (
super::u3d) and the PDF 1.7 dictionaries that show it (ISO 32000-1 §13.6). - Manufacturing instructions on paper: the printed pages and the per-step pictures, drawn as sheets.
- project
- Projecting a placed PMI view onto its sheet: the model as edge LINES with hidden lines removed, plus EVERY annotation of the saved view, all in paper millimetres.
- svg
- The sheet’s SVG output contract.
- u3d
- A U3D (ECMA-363) writer — the 3D stream a PDF
/3Dannotation carries.
Structs§
- BomTable
- A live assembly parts list placed in paper millimetres.
- Detail
Circle - The circle of a detail view, as it was PICKED: two anchors of an existing placement’s projection — the circle’s centre and a point on its rim.
- Placed
View - A saved PMI view placed on a sheet.
- Revision
- One row of a sheet’s revision table: the revision’s letter, its date and what changed. All three are the user’s own text — a drawing office letters, dates and words its revisions its own way — so none is validated beyond being a string, and a blank one leaves its cell ruled and empty.
- Section
Cut - The cutting plane of a section view, as it was PICKED: two anchors of an existing placement’s projection.
- Sheet
- One sheet of paper.
- Sheet
State - The document’s
sheetsblock.
Constants§
- CUSTOM
- The
sizevalue of a sheet whosewidthMm/heightMmare the user’s own. - DEFAULT_
BORDER_ INSET_ MM - The default inset of the drawing BORDER from the paper’s edge, millimetres.
- DEFAULT_
SCALE - The default scale of a newly placed view (1 mm of paper per model unit).
- DEFAULT_
SIZE - The default paper size of a new sheet.
- DETAIL_
SCALE_ FACTOR - A new detail view draws at this multiple of its source’s scale — the usual reason for a detail is that the source is too small to read there.
- ORTHOGRAPHIC
- The only projection kind this slice draws.
- PAPER_
SIZES - The paper-size presets,
(key, width mm, height mm)— ISO A landscape plus the two ANSI sizes in millimetres (the block stores millimetres only, so a Letter sheet is 279.4 × 215.9 and not a second unit system). - SHEETS
- The document key the block is stored under.
Functions§
- detail_
view_ schema - The Detail view dialog’s schema: the circle — its CENTRE and a point on its RIM, each an anchor picked on one placed view — its letter, and where the enlarged view sits and at what scale.
- paper_
size - A preset’s millimetres, or
NoneforCUSTOMand anything unknown. - schema_
catalogue - The sheet object schemas, in the
inputParamsSchemavocabulary the shared form engine already renders (crate::features::form_fields_from_schema), so neither dialog is hand-written.view_idsare the document’s saved PMI views — the options of a placed view’sviewfield, which is why this catalogue is built per document rather than being a static. - section_
view_ schema - The Section view dialog’s schema: where the view sits and at what
scale, and the section itself — its CUTTING LINE, two anchors picked on a
placed view with the reference picker, its letter and which way it looks.
Its saved view is its source’s, so it has no
viewfield of its own. - sheet_
schema - The Sheet dialog’s schema.
- sheet_
view_ schema - The Placed view dialog’s schema.
viewoffers the document’s saved PMI views;projectionoffers onlyORTHOGRAPHICin this slice.