Parts and stock¶
part
¶
Parts made from stock, their local frame and their named sides.
A board is described as if it lies flat on the bench, length left to right, reference face up and reference arris (where the reference face meets the reference edge) towards the woodworker.
Part frame (mm): the origin lies on the reference arris at the left end, x runs along the length (grain), y across the width towards the back edge, z up along the normal of the reference face. The design box of a board is therefore [0, length] x [0, width] x [-thickness, 0].
A mirrored board is the mirror image of an unmirrored one with the same features, e.g. the right side of a case against the left one, both with their reference faces outside and reference edges at the front. Its part frame is the same, but its ends swap names: its left end lies at x = length. Joints and cuts on its named sides are then mirrored too.
A rod (round stock) is thought of as a square box with its four long arrises rounded off: its frame and design box are those of a board as wide and thick as its diameter, [0, length] x [0, diameter] x [-diameter, 0], its axis at y = diameter / 2, z = -diameter / 2. Its ends are real sides; its four long sides are virtual, the tangent planes of the box. They place the rod (flush with the top of a rail) and give directions for cross holes and flats, but cuts that need a planar side refuse them.
A board may be laminated: glued up from equal plies, then cut as one. The plies show as separate solids in the model (the glue lines in the drawings) and in the cut list.
Side
¶
Bases: Enum
The six sides of a board, as (axis of the normal, its sign).
Part
¶
Base class of parts: a named piece of stock with a design length.
The design box is the part as the user sees it between its joints, e.g. a
rail from shoulder to shoulder. Joints may extend the blank beyond it.
With mirror, its ends swap names (see the module docs).
blank
¶
The blank filling the box between lo and hi (the design box
with any allowances), in the part frame.
is_virtual
¶
is_virtual(side: Side) -> bool
Whether a side isn't a real planar side of the part (of a rod).
ply_boxes
¶
The boxes of the plies the blank between lo and hi is glued up from.
arris
¶
The arris where two adjacent sides of this part meet.
Board
dataclass
¶
Board(
name: str,
stock: Stock,
length: float,
width: float,
cuts: list[Cut] = list(),
mirror: bool = False,
plies: int = 1,
plies_across: Literal[
"thickness", "width"
] = "thickness",
)
Bases: Part
A named board with design dimensions; thickness comes from its stock.
With plies > 1, it is laminated from as many equal boards, stacked
through its thickness (glued face to face, the glue lines showing on its
edges and ends) or, with plies_across="width", side by side across its
width (the glue lines on its faces and ends), e.g. a 90 mm square leg
from two 45 x 90 mm boards.
Rod
dataclass
¶
Bases: Part
A named rod of round stock: a dowel, a peg, a rung, a pole.
Its frame is that of its bounding box (see the module docs); its long
sides (top_face, front_edge, ...) are virtual. Allowances only go on
its ends.
SideRef
dataclass
¶
A reference to one side of a part's design box.
virtual
property
¶
Whether the side isn't a real planar side of the part (a long side of a rod).
plane
property
¶
Plane of the side in the part frame.
z is the outward normal. x runs along the length for faces and edges, along the width for ends. y follows from the right-hand rule. The origin is the corner of the side such that the side covers [0, size[0]] x [0, size[1]] in plane coordinates. The plane is the same on a mirrored board: x runs from its right end.
depth
property
¶
Depth of material behind the side (the part's extent along the normal).