Skip to content

Code2Form 0.1.0

Choose a tag to compare

@enzotripoli enzotripoli released this 21 Oct 15:53
· 59 commits to main since this release

First release of Code2Form: parametric 3D design as code, with a live preview.

Highlights

  • Editor and live 3D view: syntax highlighting, errors marked on their line, a new render as you type; orbit, pan and zoom.
  • Your files: designs are saved as .c2f, and .scad files open as they are.
  • Customizer: parameters declared in comments get sliders, dropdowns, checkboxes and text fields, grouped by section; presets are saved next to the design in a .json file.
  • Geometry: CSG with Manifold, text() with the bundled Liberation fonts, import() of STL, OFF, AMF, 3MF, DXF and SVG, and surface() from .dat and PNG.
  • STL export, checked with PrusaSlicer's own loader.
  • c2f command line: prints the AST, the CSG tree or an STL, with -D name=value, -p presets.json and -P preset.

Downloads

File For
Code2Form-0.1.0-macos-arm64.zip The app, for Macs with Apple silicon (M1 or later), macOS 11 or later
c2f-0.1.0-macos-arm64.zip The command line, same platform
SHA256SUMS.txt Checksums of both

The app is not notarized by Apple yet. On first launch, macOS blocks it: open it once, then go to System Settings → Privacy & Security and click Open Anyway. Or run, once:

xattr -dr com.apple.quarantine /Applications/Code2Form.app

To open .c2f and .scad files with Code2Form by double-click: Finder → Get Info on a file → Open with → Code2Form → Change All.

Intel Macs, Windows and Linux: build from source with Rust 1.85 or later (cargo build --release); see the README.

Known limitations

  • Exports STL only for now.
  • offset(r = ...) places its arc points slightly differently from other implementations, which can move volumes by up to 0.3%.
  • No undo history across reloads, find and replace, or recent files yet.