Datasculptures Fabrication: shared mesh export, fit-to-cube, printability, and provenance for data-sculpture tools.
Project description
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
Project details
Release history Release notifications | RSS feed
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 dsfab-0.1.0.tar.gz.
File metadata
- Download URL: dsfab-0.1.0.tar.gz
- Upload date:
- Size: 28.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d76e4b0178781c0c119a9457828c5420a307058f9a75cc9afb8b5d75957b2fb
|
|
| MD5 |
09afc99d7e64c5beb9b8cfd93f215884
|
|
| BLAKE2b-256 |
7fc403ff543ec129c76e2fb9a86dba50f7fec8c26ba14b3e589f37e10e6c448c
|
File details
Details for the file dsfab-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dsfab-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a041b9b41a9cf36823951be46a64b5ee3d83a8e05d7561d5f821884cd348f54
|
|
| MD5 |
3ac02468ea01ab144381b10ecf65d7d3
|
|
| BLAKE2b-256 |
ef2de6a4a68ecf7666c81419c7fa3b652c22f193bc2957c0f91162695eb47853
|