Skip to content

Examples

Each example builds the input, runs an engine, shows the result in compas_viewer, and writes the placed geometry to data/output/ as JSON (full result) and OBJ (outlines + holes).

  1. Collision — physics/relaxation engine, default viewer.
  2. NFP + GA — NFP + genetic-algorithm engine.
  3. Live animation (NFP) — watch the GA layout evolve.
  4. Clearance offset — add gaps with offset_geo / offset_sheets.
  5. Attributes — carry geometry (a centroid point) through placement.
  6. Pack (array) — fixed number of elements per row with pack.
  7. Pack (distance) — wrap by row width with pack(max_width=...).
  8. Text (font) — single-stroke text with text_to_polylines.