Differentiable rasterizer for CAD Boolean operations — JAX-native B-Rep kernel with stratum-aware gradients.
Project description
BRepAX
Differentiable rasterizer for CAD Boolean operations.
BRepAX is a JAX-native library that enables gradient-based optimization through B-Rep (Boundary Representation) topology changes. It translates contact dynamics formulations from differentiable physics into the CAD domain, providing stratum-aware differentiation for Boolean operations on geometric primitives.
Installation
pip install brepax
With optional dependencies:
pip install "brepax[viz]" # Visualization
pip install "brepax[persistence]" # Persistent homology
pip install "brepax[all]" # Everything
Quick Start
import jax
import jax.numpy as jnp
from brepax.primitives import Disk
# Create two disks
disk1 = Disk(center=jnp.array([0.0, 0.0]), radius=jnp.array(1.0))
disk2 = Disk(center=jnp.array([1.5, 0.0]), radius=jnp.array(1.0))
# Evaluate SDF -- fully differentiable
query = jnp.array([0.75, 0.0])
sdf_value = disk1.sdf(query)
# Gradients flow through everything
grad_fn = jax.grad(lambda q: disk1.sdf(q))
gradient = grad_fn(query)
Roadmap
BRepAX is under active development. Current capabilities:
- Primitives: 8 geometric types with differentiable SDF interface
- Boolean operations: Union, subtract, intersect with stratum-dispatched gradients
- STEP I/O: Read STEP files, extract metadata, convert faces to primitives
- Visualization: 3D tessellated shape rendering
- Applications: Mold direction optimization demonstrator
Planned modules (not yet implemented):
persistence/— Persistent homology integrationtopology/— Half-edge mesh representation
Documentation
Full documentation: lv416e.github.io/brepax
License
Apache License 2.0. See LICENSE for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file brepax-0.2.0.tar.gz.
File metadata
- Download URL: brepax-0.2.0.tar.gz
- Upload date:
- Size: 249.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7977aefbbfe40849fb4cb93be4e12dcf66f00a813822edf70e2ed9c5040a5fe
|
|
| MD5 |
7b749446a66f8387f185718931b23749
|
|
| BLAKE2b-256 |
38f84132fb0cb85bdf7fbb82860a0b3dee571d7259f09d271d63f7710fd8b286
|
Provenance
The following attestation bundles were made for brepax-0.2.0.tar.gz:
Publisher:
publish.yaml on lv416e/brepax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brepax-0.2.0.tar.gz -
Subject digest:
e7977aefbbfe40849fb4cb93be4e12dcf66f00a813822edf70e2ed9c5040a5fe - Sigstore transparency entry: 1324390911
- Sigstore integration time:
-
Permalink:
lv416e/brepax@7cec9a4a4f03455f9d0d83d3e391005785f2a409 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/lv416e
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@7cec9a4a4f03455f9d0d83d3e391005785f2a409 -
Trigger Event:
push
-
Statement type:
File details
Details for the file brepax-0.2.0-py3-none-any.whl.
File metadata
- Download URL: brepax-0.2.0-py3-none-any.whl
- Upload date:
- Size: 45.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5cfb0c0ae43363a462ace43ab577db59eb8af24057cff089dc001b92a3c50f7
|
|
| MD5 |
84748902bba7b4d27a1551017137d917
|
|
| BLAKE2b-256 |
fcbe1c085d0b3e89623917319732ca56f9986aa29a089493b1a085fa72efb607
|
Provenance
The following attestation bundles were made for brepax-0.2.0-py3-none-any.whl:
Publisher:
publish.yaml on lv416e/brepax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brepax-0.2.0-py3-none-any.whl -
Subject digest:
a5cfb0c0ae43363a462ace43ab577db59eb8af24057cff089dc001b92a3c50f7 - Sigstore transparency entry: 1324390970
- Sigstore integration time:
-
Permalink:
lv416e/brepax@7cec9a4a4f03455f9d0d83d3e391005785f2a409 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/lv416e
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@7cec9a4a4f03455f9d0d83d3e391005785f2a409 -
Trigger Event:
push
-
Statement type: