Expand description
A Sheet: plain 2-D strokes and labels on paper, in millimetres with
y up, each on a layer — what a drawing and a flat pattern are laid out
as, and written in a Format: SVG (to_svg) or DXF (to_dxf).
The kernel’s curves become lines, arcs and circles where they are those
exactly (see [NurbCurve3D::as_line], [NurbCurve3D::as_arc]), and
polylines through points of them otherwise.
Text in an SVG sheet, or in any other XML a writer makes, is escaped
by xml_escape.
Structs§
- Label
- A line of text, its baseline at
at, turnedangledegrees counter-clockwise. - Layer
- What a stroke or label is, which decides how it is drawn: a layer of a DXF file, a class of an SVG one. The sheet knows no layer of its own: whoever draws on it defines the layers it draws on (a drawing its visible and hidden lines, a flat pattern what is cut and where it is bent).
- Sheet
- A sheet of paper,
widthxheightmillimetres, and what is on it. - Stroke
Enums§
- Anchor
- Which point of a label its position is.
- Format
- A file format a sheet is written in.
- Line
Type - How a layer’s strokes are dashed.
- Shape
- A shape on the paper.
Functions§
- decimal
xas written on a sheet: toplacesdecimals, without trailing zeros.- strokes_
of - The curves
curveson the paper, throughplacefrom their own coordinates atscale: each a line, an arc or a circle where it is one exactly, those continuing each other on one layer joined, and every other curve a polyline through points of it. - to_dxf
- The sheet as a DXF document.
- to_svg
- The sheet as an SVG document. The paper’s
ypoints up, SVG’s down: every point is flipped, which turns counter-clockwise arcs into SVG’s negative sweep. - xml_
escape textfit for XML: for an element’s content, or an attribute’s value between either kind of quotes.
Type Aliases§
- P
- A point on the paper.