compas_wood¤

compas_wood is the COMPAS interface to the
wood_nano timber joinery
kernel: it generates plate shells, detects the joints between neighbouring
plates, and returns the joint-carved outlines and cut volumes ready for
fabrication.
The stack has three layers:
- wood - the C++ library that does all the work: plate elements, joinery detection, joint volume generation, lofting.
- wood_nano - nanobind bindings of wood, published as a compiled wheel.
- compas_wood (this package) - a pure-Python layer that converts between
COMPAS types (
Polyline,Mesh) and the kernel's raw containers. No computation happens here.
Quick example¤
from compas_wood import translation_shell_elements, joinery_solver_elements
# Sweep a cross-section along a profile into a shell of plate elements
# (no arguments = the built-in arch).
shell_mesh, elements = translation_shell_elements()
# Detect joinery between the plates and get back merged, joint-carved outlines.
plates, joints = joinery_solver_elements(
bottom_polylines=[e.bottom for e in elements],
top_polylines=[e.top for e in elements],
)
# Write the result as a scene for session_viewer, and print its URL.
from compas_wood.session_scene import SessionScene, publish, viewer_url
from compas_wood.viewer import add_joinery
scene = SessionScene("quickstart")
add_joinery(scene, plates, joints, draw_meshes=True)
publish(scene, "quickstart")
print(viewer_url("quickstart"))
Where to go next¤
- Installation -
pip install compas_woodand the build-from-source route forwood_nano. - Migration from 2.x - 3.0 is a clean break; the table there maps every removed 2.x function to its replacement.
- Examples - the template generators, the joinery solver, and the contact detection.
- API Reference - one page per module.
Rhino / Grasshopper¤
A Rhino plugin also named compas_wood ships from the wood_nano repository via the Yak package manager. It does not depend on this Python package.