https://github.com/yzx9/sdflit
Fast and Robust Signed Distance Function Library
https://github.com/yzx9/sdflit
pyo3 sdf
Last synced: about 1 month ago
JSON representation
Fast and Robust Signed Distance Function Library
- Host: GitHub
- URL: https://github.com/yzx9/sdflit
- Owner: yzx9
- License: apache-2.0
- Created: 2023-12-22T03:11:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-01-20T13:26:29.000Z (7 months ago)
- Last Synced: 2026-04-15T00:14:56.941Z (4 months ago)
- Topics: pyo3, sdf
- Language: Rust
- Homepage:
- Size: 98.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SDF-Lit
## Usage
```sh
pip install sdflit
```
Try it in Python:
```python
>>> import sdflit as sdf
>>> sphere = sdf.Sphere((0, 0, 0), 1)
>>> sphere.distance((0, 0, 0))
-1.0
>>> sphere.distance((1, 0, 0))
0.0
>>> sphere.distance((1, 1, 1))
0.7320507764816284
```
## Development
Setup Python venv:
```sh
python -m venv .env
source .env/bin/activate
pip install maturin
```
Build Python package after each modification:
```sh
maturin develop
```
## License
This work is licensed under a Apache-2.0.
Copyright (c) 2023-present, Zexin Yuan