draw.titleblock
drafting: D = draw.titleblock (SIZE, FIELDS)
drafting: D = draw.titleblock (SIZE)
drafting: SIZES = draw.titleblock ()
A sheet frame with a title block in its corner.
D = draw.titleblock (SIZE, FIELDS) returns a drawing
holding the border of a sheet of the named size and the title block in its
bottom right corner, filled in from FIELDS. Merge it with the drawing
it frames.
SIZES = draw.titleblock () lists the sheet sizes.
The ISO A series from A4 to A0, by name, in landscape. Every one is in millimetres, and the border is inset 10 mm from the trimmed edge except at the left, where it is inset 20 mm to leave a filing margin — which is what ISO 5457 asks for and what a drawing loses if it is punched without.
FIELDS is a struct whose fields fill the block. Any of title,
drawing, material, scale, units, date,
drawnby and revision is used; anything else is ignored, and
anything absent is left blank rather than invented.
The values are text and are written as given. A scale of '1:2' is
a claim about the drawing it frames, and nothing here checks it: the frame
does not know what it was merged with.
Everything is placed on layer 'FRAME', so a caller can turn the
border off, restyle it, or drop it before sending the geometry to a machine
that has no use for it.
See also: draw.Drawing, draw.coordtable, merge
Source Code: draw.titleblock
A sheet frame with its title block, ready to merge with the drawing it frames. Everything sits on layer FRAME, so it can be dropped before the geometry goes to a machine that has no use for it.
draw.titleblock ()
ans =
{
[1,1] = A4
[1,2] = A3
[1,3] = A2
[1,4] = A1
[1,5] = A0
}
F = struct ('title', 'BEARING BRACKET', 'drawing', 'BRK-014', ...
'material', 'EN8', 'scale', '1:1', 'units', 'mm', ...
'date', '2026-08-17', 'drawnby', 'AB', 'revision', 'B');
sheet = draw.titleblock ('A4', F);
part = draw.Drawing ().circle ([0, 0], 30).circle ([0, 0], 12);
part.Linetype = 'CENTER';
part.Colour = 'red';
part = part.centremark ();
sheet = sheet.merge (part.transform ('translate', [120, 120]));
plot (sheet, 'FontSize', 6);
title ('an A4 sheet with its frame, block and part');