Skip to main content

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-fittingfit_to_cube: scale any point set into a target cube (geometry-agnostic)
  • Printabilityvalidate_printability: watertight, manifold, winding, minimum feature size
  • Colour segmentationsegment_by_scalar + render_legend_png: the coloured-STL print path
  • Provenancewrite_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dsfab-0.1.0.tar.gz (28.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dsfab-0.1.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

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

Hashes for dsfab-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8d76e4b0178781c0c119a9457828c5420a307058f9a75cc9afb8b5d75957b2fb
MD5 09afc99d7e64c5beb9b8cfd93f215884
BLAKE2b-256 7fc403ff543ec129c76e2fb9a86dba50f7fec8c26ba14b3e589f37e10e6c448c

See more details on using hashes here.

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

Hashes for dsfab-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a041b9b41a9cf36823951be46a64b5ee3d83a8e05d7561d5f821884cd348f54
MD5 3ac02468ea01ab144381b10ecf65d7d3
BLAKE2b-256 ef2de6a4a68ecf7666c81419c7fa3b652c22f193bc2957c0f91162695eb47853

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page