Skip to main content

Module print

Module print 

Source
Expand description

Manufacturing instructions on paper: the printed pages and the per-step pictures, drawn as sheets.

brep_instructions::layout says WHERE everything goes on each page; this module fills those places with what the sheet writers already draw — polylines and centred text runs in paper millimetres, plus each step’s view projected as a placed view (ViewDrawing) — so the PDF and the SVG are super::pdf::write_pdf and super::svg::to_svg unchanged. The projections come from the engine, which owns the scene: it asks picture_rects where each picture goes, fits a view into each with fit, and hands the drawings back to pages or step_image.

Enums§

PictureAt
Where a picture goes, keyed by what it shows: cover for the cover’s, else (page index, slot index) for a step slot’s.

Constants§

IMAGE_MM
A per-step picture: its paper and the caption band above the view.

Functions§

cover_step
The step a page’s cover shows: the front matter’s, else the last.
fit
The placement (position, scale) that fits a view into rect, from its drawing at position [0, 0] and scale 1 (bounds = that drawing’s [x0, y0, x1, y1]). Text keeps its paper size, so this is the fit of the lines; the margin FILL leaves takes up the balloons’ slack.
image_picture_rect
Where a per-step picture’s view goes on its IMAGE_MM paper.
pages
The printed pages as sheets, in print order: each page’s header (the title, and the page number of the count), then its own content — the cover’s title, assembly and picture; a parts or tools list’s rows; the step slots, each framed, its picture in pictures and its text beside or below. A picture missing from pictures leaves its place empty.
picture_rects
Every picture the pages draw, with the step whose view it is and the rectangle it is fitted into.
step_image
One step’s picture as a sheet: its number and title over its view.
title
The document’s title as the pages print it.
wrap
text broken into lines no wider than width at cap height cap, at spaces; a word wider than the line stands alone on one.