Skip to content
Archee Docs

Sheets and reports

Declare drawing sheets with paper ids, views, a bill of materials and a title, and assemble reports from parts.

Sheets

A sheet belongs to a part. It sets the paper, the scale and the views.

sheet a0 landscape {
  scale 1:2
  view top = cut(gbox, through = a1)
  view front = proj(top)
  view side = proj(front, top)
  bom auto
  title from req
}
LineMeaning
sheet PAPER [landscape or portrait]The sheet and its paper id
scale 1:2The drawing scale
view NAME = cut(...), proj(...), detail(...)A view of a part, or a projection of another view
bom autoThe bill of materials from the assembly’s parts, or bom PATH
title from PATH or title "text"The title block source

Views are expressions over parts, so a projected view stays aligned with the view it comes from.

Paper ids

PAPER is an id from the paper table, in any case, or a custom W x H mm.

FamilyIdsStandard
ISO Aa0 to a4ISO 216
ISO Bb0 to b4ISO 216
ANSIansi_a to ansi_eASME Y14.1
ARCHarch_a to arch_e, arch_e1ASME Y14.1
IdLong side x short side (mm)
a01189 x 841
a1841 x 594
a2594 x 420
a3420 x 297
a4297 x 210

An unknown id reports N01 with the nearest ids. The sheet size is data, so the same part moves from A3 to A1 by changing one id.

Reports

An artifact assembles a report, a bill of materials, a quote, a drawing set or a notice.

arc 0.1
use gbox = rec/gbox.arc

artifact report kind report {
  section "1. Chọn thông số trục" {
    prose "Mô men xoắn trên trục II là {gbox.T2:Nm:0}, đường kính sơ bộ {gbox.shaft2.d_min:mm:1}."
  }
  for s in parts(gbox, kind = shaft) {
    section "Trục" {
      prose "Trục {s.name} có d1 = {s.d1}."
      table dims = s.out
    }
  }
  section "Bản vẽ" {
    figure gbox.a0
  }
}
  • section "title" { ... } holds prose, table and figure lines.
  • prose strings interpolate values: {path}, {path:unit} and {path:unit:digits}.
  • table NAME = PATH renders the outputs of a part.
  • figure PATH places a sheet.
  • for s in parts(PATH, kind = KIND) repeats its sections once per part of that kind. {s.name} is the instance name.

A prose section remembers a hash of each value it shows. When the value changes, the section is marked stale (A02) so you rewrite it.