← Back to archive

Repo of the Day

BelfrySCAD/BOSL2: The Belfry OpenScad Library, v2.0. An OpenSCAD library of shapes, masks, and manipulators to make working with OpenSCAD easier. BETA

Published: Aug 21, 2026

Open repository ↗

The Belfry OpenScad Library, v2.0. An OpenSCAD library of shapes, masks, and manipulators to make working with OpenSCAD easier. BETA - BelfrySCAD/BOSL2

Summary

BOSL2 (Belfry OpenScad Library v2) is a BSD-2-Clause extension library for OpenSCAD, the programmatic 3D modeling language. It provides modules for shapes, transformations, rounded edges, threads, gears, and geometry/math helpers, making OpenSCAD code shorter and more readable. The README flags the project as BETA and warns that scripts written for the older BOSLv1 will not work with BOSL2.

What it is useful for

BOSL2 is useful when building parametric 3D models in OpenSCAD without re-implementing common geometry. The README highlights several areas:

  • Attachments for positioning parts relative to other parts (e.g., placing a component on TOP, RIGHT-aligned) rather than tracking raw coordinates.
  • Rounding and filleting, which are awkward in raw OpenSCAD, via cuboid(), offset_sweep(), prism_connector(), and edge_profile().
  • Shorthand transforms: up(z) instead of translate([0,0,z]), plus xcopies() for grids, zrot_copies() for radial patterns, and skew().
  • Building blocks and complex objects: prismoid(), cyl(), tube(), torus(), path_sweep() to move a 2D polygon along a 3D path, skin() to blend cross-sections, Bézier and NURBS helpers, and metaballs for organic surfaces.
  • Ready-made parts: gears, generic threading, NPT pipe threads, bottle threads, screws, clips, hinges, and dovetail joints.
  • Math and geometry helpers: linear solvers, root finding, line and circle intersection, coordinate transforms, and list/string utilities.

How engineers can use it

Two install paths are documented.

Manual install:

  1. Download the master.zip or .tar.gz archive from the GitHub repo.
  2. Unpack it, preserving the directory structure.
  3. Rename the unpacked directory to BOSL2.
  4. Move it to the OpenSCAD library directory: Windows My Documents\OpenSCAD\libraries\, Linux $HOME/.local/share/OpenSCAD/libraries/, macOS $HOME/Documents/OpenSCAD/libraries/. For SNAP or prepackaged installs, the README directs users to OpenSCAD's Help → Library Info for the User Library Path, or to set OPENSCADPATH.
  5. Restart OpenSCAD.

On Fedora Linux, the README documents sudo dnf install openscad-bosl2, noting the package may lag behind the current release.

After installation, reference the library from a .scad file and call the documented modules. Full reference material is in the project wiki at https://github.com/BelfrySCAD/BOSL2/wiki. The README requires OpenSCAD 2021.01 or later, marks the library as BETA, and explicitly states BOSLv1 code is incompatible.