cadbuildr-architecture
Summary
Buildings as code for CADbuildr: grids, layered walls with IRC stud framing, doors, windows, stairs, slabs, columns, beams, roofs, guards, rooms and a demo house, built from cited tables, placed by connect and code-checked.
Tags
cad, python, library, architecture, building, bim, framing, irc, stairs, roof, walls
Status
yellow
Guidelines
- Dimensions come from
standards.py(cited) or inputs; typical values are markedEstimated. - Place every element with
ground/connect; members connect to the member they bear on. - Code compliance is a
__checks__issue; inputs that cannot be built raise named errors. - Parts record volume and box from the profiles they build, so tests need no kernel.
- Keep the package self-contained (foundation + numpy) so it can move to its own repo.
Dependencies
Upstream
- cadbuildr-foundation
Downstream
- (none)
Overview
Buildings as code, as a CADbuildr library (pip install cadbuildr-architecture,
import cadbuildr.architecture, library id architecture). Every element is
real construction geometry built from cited dimensions, placed with
ground / connect, and checked against a building code in __checks__.
- Grids and levels (
grid.py):Grid(lettered axes along X, numbered along Y),Levels, andGridDatum, the grid as anchors (GridNodeon every intersection and level). - Layered walls (
walls.py):Wallis its layers outside to inside, at their real thicknesses (Exterior 2x4/2x6,Interior 2x4,Masonry cavity (EN),CMU 8in, or your ownWallLayerlist). Openings are cut through every layer. The units are hosted byconnect, and walls join at L corners and T junctions throughWallEnd/WallFace(the joins close loops, so a wrong length fails). - Stud framing (
framing.py):StudFrameper IRC R602. Studs at 16" / 24" (406 / 610 mm) or 400 / 600 mm on centre, a single bottom plate and a double top plate, king and jack studs, and built-up headers sized from IRC Table R602.7 with a plywood or foam spacer. Windows get sills and cripples, and the bottom plate is cut at doors. Dressed lumber per PS 20-20 / CSA O141 (2x4 = 38 x 89 mm), with eased edges. - Doors and windows (
openings.py):Doorcomes in US pre-hung sizes (2'0"..3'0" x 6'8") and DIN 18101 sizes (885 x 2010 with a rebated leaf). It has jambs with stops, a threshold, and a hollow-core or solid leaf with a lock bore, handing LH / RH / LHR / RHR, and a revolute swing.Windowhas US "3050" sizes or metric sizes on the 125 mm grid (EN 14351-1). Its operations are fixed, casement / tilt-turn, awning, hopper, single-hung and sliding. Each window has a timber frame and sash, a 4-16-4 IGU (EN 1279) and an IRC R310 net clear opening. - Stairs (
stairs.py):stair_layoutsizes a stair by the 2R + G rule.StairFlighthas cut 2x12 stringers, nosed treads, risers and a handrail.Stairbuilds straight, L or U stairs with landings and posts. Checks: IRC R311.7 (riser <= 196, tread >= 254, headroom >= 2032, width >= 914, nosing, flight rise, landing, handrail), orcode="DIN 18065"/"UK ADK". - Slabs, footings, columns, beams (
structure.py):Slabis a slab-on-grade with a thickened edge (IRC R506 / R403.1). There areStripFooting/PadFootingfootings.ColumnandBeamtake W / HE / IPE sections with root fillets, hollow SHS / HSS, timber, or built-up lumber (AISC v16.0, EN 10365).PostAndBeamBayputs all of them on a grid. - Floor decks (
floors.py):FloorDeckhas joists, rims and an OSB subfloor, with bearings, floor seats and floor edges. - Roofs (
roofs.py):Roofframes a gable, hip or shed roof by pitch. Rafters are placed at spacing, with birdsmouth seats, tails and ridge plumb cuts. A ridge board at least as deep as the plumb cut (R802.3), hips and jacks, a fascia, sheathing, barge rafters and the gable-end infill complete it. Checks: R905 minimum pitch, ridge depth, bearing, and birdsmouth depth. - Guards (
guards.py):Guardhas posts, rails, a cap and balusters. Checks: IRC R312 (914 mm height, the 102 mm sphere) or UK ADK. - Rooms and plans (
rooms.py):RoomandFloorPlanreport areas and volumes (sloped ceilings included). Checks: R304 area and dimension, R305 ceiling height, and an R310 egress opening in sleeping rooms. - Demo house (
building.py):DemoHouseis a slab, six walls, a door, four windows, a loft deck, a stair to the loft, loft guards and a 12:12 gable roof. It has four rooms and a schedule inreport().
Lengths are millimetres or strings with units: "6'8\"", "92-5/8\"",
"2.4 m", "80 in" (units.length).
from cadbuildr.foundation import show
from cadbuildr.architecture import DemoHouse, Wall, Stair
house = DemoHouse()
print(house.report()["total_area_m2"])
assert [i for i in house.check() if i["severity"] == "error"] == []
show(house)
wall = Wall(length="12'", wall_type="Exterior 2x4", openings="window:4':3050@2'")
stair = Stair(total_rise=3000, kind="L", turn="left")
python -m cadbuildr.foundation.library manifest cadbuildr.architecture
echo '{"item": "architecture:Stair", "inputs": {"total_rise": 3000, "kind": "U"}}' | python -m cadbuildr.foundation.library eval
Agent recipes: SKILL.md (mirror:
threepointo/skills/libraries/cadbuildr_architecture.md). Content plan:
docs/specs/plan_library-content_00003/packages/architecture.md.
Metadata
Release files for cadbuildr-architecture 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cadbuildr_architecture-0.1.0.tar.gz | 94.8 kB | Without provenance | Details for cadbuildr_architecture-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cadbuildr_architecture-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for cadbuildr_architecture-0.1.0-py3-none-any.whl |
Total release size: 186.7 kB
Release files / cadbuildr_architecture-0.1.0.tar.gz
| Download URL | cadbuildr_architecture-0.1.0.tar.gz |
|---|---|
| Size | 94.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6309b32e741fdd85c6b55c300f44ed240c5d39ffd1c083a7ce5d95084b361a3
|
|
BLAKE2b-256 checksum How to use checksums |
1161447b07a1950ac2496650aab33ae7725adddfdf3251c1fa69b32bed9117b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.19
|
Release files / cadbuildr_architecture-0.1.0-py3-none-any.whl
| Download URL | cadbuildr_architecture-0.1.0-py3-none-any.whl |
|---|---|
| Size | 91.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dabc35a6c2245ba36ac196745954ce3f0e84340724ea0b0a4e68e60a82bc7ced
|
|
BLAKE2b-256 checksum How to use checksums |
14da2836569958290bd339968e925ed48d6346691b2bf1e865b070184b254135
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.19
|
Security for cadbuildr-architecture 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.