dsfab
Datasculptures Fabrication — a presentation-agnostic Python library that converts coloured meshes to fabricable files with verifiable provenance.
What it does
dsfab sits between "I have a coloured mesh in memory" and "I have a fabricable file on disk with verifiable provenance." It is a shared dependency used by SFS, DTS, and future portfolio tools.
- Mesh writers — PLY (per-vertex colour), OBJ (+MTL), STL, 3MF
- Constraint-fitting —
fit_to_cube: scale any point set into a target cube (geometry-agnostic) - Printability —
validate_printability: watertight, manifold, winding, minimum feature size - Colour segmentation —
segment_by_scalar+render_legend_png: the coloured-STL print path - Provenance —
write_manifest: SHA-256 manifest for all inputs and outputs
Installation
pip install dsfab
Quick start
import trimesh
from pathlib import Path
import dsfab
mesh = trimesh.load("my_mesh.ply")
result = dsfab.write_mesh(mesh, Path("output.ply"), "ply")
print(f"Wrote {result.bytes} bytes, SHA-256: {result.sha256}")
Requirements
Python ≥ 3.11. Dependencies: trimesh ≥ 4.0, numpy ≥ 1.26, matplotlib ≥ 3.8.
License
MIT
Metadata
Release files for dsfab 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dsfab-0.1.0.tar.gz | 28.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dsfab-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.5 kB
Release files / dsfab-0.1.0.tar.gz
| Download URL | dsfab-0.1.0.tar.gz |
|---|---|
| Size | 28.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d76e4b0178781c0c119a9457828c5420a307058f9a75cc9afb8b5d75957b2fb
|
|
BLAKE2b-256 checksum How to use checksums |
7fc403ff543ec129c76e2fb9a86dba50f7fec8c26ba14b3e589f37e10e6c448c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.9
|
Release files / dsfab-0.1.0-py3-none-any.whl
| Download URL | dsfab-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0a041b9b41a9cf36823951be46a64b5ee3d83a8e05d7561d5f821884cd348f54
|
|
BLAKE2b-256 checksum How to use checksums |
ef2de6a4a68ecf7666c81419c7fa3b652c22f193bc2957c0f91162695eb47853
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.9
|