Sheets

Defined in src/dd_sheet.scad.

draw_sheet

draw_sheet(length = undef, height = undef, sheet_symbol = undef, line_width = DIM_LINE_WIDTH * 2,
           line_height = DIM_LINE_HEIGHT, grid_type = "None", grid_dim = DIM_GRID_SPACING,
           grid_line_width = DIM_LINE_WIDTH, color = DEF_LINE_COLOR)

Draws a rectangular sheet frame with its lower-left corner at the origin, and an optional background grid.

Parameter Meaning
length Sheet size along X
height Sheet size along Y
sheet_symbol A standard sheet name, in place of length and height
line_width Frame line width; twice the normal line width by default
grid_type "None", "Dot" or "Grid"
grid_dim Grid pitch; DIM_GRID_SPACING (50) by default
grid_line_width Dot radius for "Dot", line width for "Grid"
include <DraftSCAD/dimdraft.scad>

translate([ 0, 0, -DIM_LINE_WIDTH ]) draw_sheet(length = 11, height = 8.5, grid_type = "Dot", grid_dim = 0.5);

The grid is drawn one line width below the frame. Translating the whole sheet down by a line width, as above, keeps it behind annotations drawn at Z = 0.

draw_sheet() echoes to the console when it looks up a sheet symbol and when no grid is selected.

draw_frame

draw_frame(length, height, line_width = DIM_LINE_WIDTH, line_height = DIM_LINE_HEIGHT, color = DEF_LINE_COLOR)

Draws only the rectangle, with its lower-left corner at the origin. draw_sheet() calls it.

draw_grid

draw_grid(length, height, type = "None", grid_spacing = DIM_GRID_SPACING, line_width = DIM_LINE_WIDTH / 2,
          line_height = DIM_LINE_HEIGHT, color = "lightgray")

Draws only the background pattern over a length by height area from the origin. type is "None", "Dot" or "Grid".

Standard sheet sizes

drawing_sheet_sizes.scad defines sheet_sizes, a list of [name, [width, height]] entries in millimetres, in portrait orientation.

Family Names
ISO 216 A series A0, A1, A2, A3, A4
ANSI ANSI_A, ANSI_B, ANSI_C, ANSI_D, ANSI_E
US architectural ARCH_A, ARCH_B, ARCH_C, ARCH_D, ARCH_E
ASME Y14.1 ENG_A, ENG_B, ENG_C, ENG_D, ENG_E
JIS B series B0, B1, B2, B3, B4

Pass a name as sheet_symbol:

include <DraftSCAD/dimdraft.scad>

draw_sheet(sheet_symbol = "A4");

The sizes are in millimetres whatever SCALING_FACTOR is, so a standard sheet suits a model drawn in millimetres. A name that is not in the list draws nothing, unless length and height are given as well.


This site uses Just the Docs, a documentation theme for Jekyll.