Skip to main content

Wood joinery one-liners (mortise & tenon, laps...) built on CADbuildr foundation anchors + joints

Project description

cadbuildr.woodworking

Summary

Wood joinery built on foundation anchors + joints, at two API levels:

  • Interfaces API (preferred): explicit sites (beam.end("b"), leg.face("px").at(650, from_="a"), .clocked(deg), .inside(face)), spec objects (TenonSpec, FingerSpec, MiterSpec), and a validating Joinery builder — site bookkeeping (a beam end hosts one interface), cross-interface collision detection inside shared beams, and loop closing (a four-corner box or mitered frame builds, and its last corner is geometrically verified instead of failing).
  • Legacy one-liners (mortise_and_tenon(assembly, rail, leg, face="px", at=280)): kept for the demo gallery; they guess ends and fold directions and cannot express closed loops or detect colliding joints.

Tags

cad, python, wood, joinery, joints, assembly

Status

yellow

Guidelines

  • Be precise about the interface: joints consume explicit sites (beam.end("b"), face.at(dist, from_=...)) — never guess ends, datums, clocking, or fold directions inside a joint function.
  • Separate WHERE (sites) from WHAT (spec dataclasses with documented defaults); an interface owns placement, cuts, and its occupancy volumes.
  • Interfaces are validated as a set (Joinery.build): end reuse, collisions inside shared beams, and loop closure are errors, not silent geometry.
  • Derive from the Beam anchors (ends and faces) instead of adding ad-hoc anchors.

Dependencies

Upstream

Downstream

Usage

from cadbuildr.woodworking import Beam, FingerSpec, Joinery, TenonSpec

# A four-corner finger-jointed box — the last corner closes the loop and is
# verified geometrically (ClosureError if the board lengths don't add up).
a, c = Beam(120, 18, 300), Beam(120, 18, 300)
b, d = Beam(120, 18, 200), Beam(120, 18, 200)
j = Joinery()
spec = FingerSpec(count=6)
j.box_corner(a.end("b").inside("ny"), b.end("a").inside("ny"), spec)
j.box_corner(b.end("b").inside("ny"), c.end("a").inside("ny"), spec)
j.box_corner(c.end("b").inside("ny"), d.end("a").inside("ny"), spec)
j.box_corner(d.end("b").inside("ny"), a.end("a").inside("ny"), spec)
assembly = j.build(ground=a)  # validate -> cut -> place -> verify closure

# A table corner: two tenons in one leg. Same height would raise
# JointCollisionError (the pockets would cross inside the leg).
leg, rail_x, rail_y = Beam(45, 45, 700), Beam(45, 45, 300), Beam(45, 45, 300)
j = Joinery()
j.mortise_and_tenon(rail_x.end("b"), leg.face("px").at(650, from_="a"))
j.mortise_and_tenon(rail_y.end("b"), leg.face("py").at(610, from_="a"),
                    TenonSpec(length=30, fit=0.2))
assembly = j.build(ground=leg)

mortise_and_tenon forms the tenon (shoulder cuts), mortises the pocket into the face, and seats the beams perpendicular. cross_lap interlocks two beams with half-depth notches and coincident mid-planes.

Implemented joints

T & corner joints: butt_joint, doweled_butt (+ Dowel pins), mitered_butt, mortise_and_tenon, dado_joint, rabbet_joint, cross_lap, end_lap, box_joint (fingers), through_dovetail (flared tails/pins via pencil polygons).

Edge joints (full-length profiles): edge_joint, tongue_and_groove, sliding_dovetail.

Planned (same Connection pattern): half-blind / secret dovetail, biscuit, pocket-hole, tambour.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cadbuildr_woodworking-0.1.0.tar.gz (42.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cadbuildr_woodworking-0.1.0-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file cadbuildr_woodworking-0.1.0.tar.gz.

File metadata

File hashes

Hashes for cadbuildr_woodworking-0.1.0.tar.gz
Algorithm Hash digest
SHA256 822a786ab3b2ff21bf2d6eab789c6b904aafd3f6a18c65070cfdf2255e3b2da3
MD5 f2be902075acf3a0c099d5b146b987c5
BLAKE2b-256 ea4de27bc029e41087d2983b2995bb3ad843fb8f887a87aad1d6cceaa45883bb

See more details on using hashes here.

File details

Details for the file cadbuildr_woodworking-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cadbuildr_woodworking-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b356c9e5c2d5972d1d4eb3d31cdde80a3546176d9101926cc2282194e6fa1342
MD5 78f2769a4550b8a6c93ee68a454f0be8
BLAKE2b-256 1496a2af73a2db2500b62f730730e79781bf2edd10f81f56c26b17c0de1356b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page