Skip to content

andrinr/jaxcad

Repository files navigation

jaxCAD

Differentiable SDF primitives, transformations, and constraint system built with JAX.

Warning

The API is not stable. Expect breaking changes.

primitives


Features

  • SDF primitives — sphere, box, capsule, cylinder, torus, and more
  • Boolean ops — union, intersection, subtraction with smooth blending
  • Transforms — translate, rotate, scale, mirror, repeat
  • Raymarcher — sphere-tracing renderer with materials, lighting, refraction, and anti-aliasing
  • Differentiable rendering — gradients flow through the full render pipeline via JAX
  • Constraint system — geometric constraints (distance, angle, coincident) with Riemannian gradient descent and Newton projection onto the constraint manifold
  • JAX-native — every scene is a pure function; jit, grad, and vmap work out of the box

primitives

Development install

Clone this repo and

cd jaxcad
uv sync
pre-commit install

Tests

pytest tests/

Docs

Requires Quarto and the docs extras:

pip install -e ".[docs]"
quartodoc build   # generate API reference from docstrings
quarto preview    # serve locally at localhost:4321

Inspired by Fidget and Inigo Quilez's distance functions.


primitives

License

Elastic License 2.0 — free for personal, research, and internal business use. Offering jaxcad as a hosted or managed service requires a commercial license. Contact andrin.rehmann@gmail.com for commercial enquiries.

About

Differentiable SDF primitives, transformations, constraint system and raymarching built with JAX.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages