Skip to content

v1.0.0

Latest

Choose a tag to compare

@wmacevoy wmacevoy released this 10 Apr 21:23

SCON v1.0.0 — JSON for OpenSCAD

A lightweight library that brings structured configuration (maps/objects) to OpenSCAD using [key, value] pair lists.

Features

  • scon_value — path-based extraction from nested SCON structures
  • scon_make — wrap data into callable config objects with inheritance
  • scon_to_json — serialize SCON back to JSON strings
  • scon_from_json — convert native JSON imports (OpenSCAD dev builds)
  • JSON→SCON converters — Python and JS scripts (Node, Bun, QuickJS)

Getting started

include <scon.scad>

cfg = scon_make([["radius", 1], ["center", [0, 0, 0]]]);
r = cfg(["radius"]);        // 1
c = cfg(["center"]);        // [0, 0, 0]
fn = cfg(["fn"], 32);       // 32 (missing value fallback)

See the README for full documentation and examples.