Micro-CT-driven generation of biomimetic enamel lattices with FEA-based design optimization.
Project description
biomimetic-lattice-pipeline
Micro-CT–driven generation of biomimetic enamel lattices with finite-element-based design optimization.
The pipeline turns measured three-dimensional rod geometry from synchrotron micro-CT of tooth enamel into parametric CAD lattices, runs linear-elastic finite-element analysis (FEA) on them, scores the results against pluggable objectives, and can drive a closed-loop Optuna optimization that searches the manufacturability-constrained design space — emitting a metrics JSON and a LaTeX/PDF report per run.
This is the software behind the Matter manuscript "Translating Helically Decussated Enamel into Damage-Tolerant Bioinspired Lattices" (Renteria et al., in preparation).
Architecture
A single canonical morphometrics.json is the only coupling point between stages, so each component can be
swapped independently:
ingest/ measured micro-CT morphometrics -> canonical morphometrics.json
mapping/ morphometrics -> CAD parameters (deterministic, with logged manufacturability clamps)
generators/ parametric continuous-twist CAD family + rod-by-rod digital-twin variants
fea/ strain-solver driving SfePy to a target representative stress
metrics/ crack-deflection streamlines, biomimicry score, SCF, toughness, ...
objectives/ YAML-configured, registry-based scoring (crack deflection, toughness, ...)
orchestration/ single-run, sweep, Optuna optimization, and closed-loop drivers
reporting/ LaTeX/PDF report generation
geometry/ CadQuery + SfePy CAD/mesh/FEA engine, driven by generators/ + fea/ via subprocess (conda)
Install
git clone https://github.com/crentb/biomimetic-lattice-pipeline.git
cd biomimetic-lattice-pipeline
python -m pip install -e ".[dev]" # core runtime + dev tools (pytest, ruff, black)
Optional heavy geometry/visualization extras:
python -m pip install -e ".[fea]" # pyvista, gmsh, meshio, scikit-image
Full FEA additionally requires CadQuery and SfePy (installed via conda, as they are awkward to pip-install across platforms); the CAD/FEA engine itself ships in this repo under
geometry/(seegeometry/README.md). The default install and the CI exercise the pure-Python design and analytics logic; the heavy FEA/CAD path is gated behind theslowpytest marker.
Quickstart
# End-to-end single-specimen run: morphometrics -> CAD -> mesh -> FEA -> metrics -> report
python scripts/run_pipeline.py --morphometrics path/to/morphometrics.json \
--run-name demo --objective crack_deflection --model-type continuous_twist
# Parametric sweep over a single free CAD parameter
python scripts/run_sweep.py --morphometrics path/to/morphometrics.json \
--run-name sweep_layers --param N_BRIDGE_LAYERS --values 4 6 8
# Closed-loop Optuna optimization of an objective
python scripts/run_optimize.py --morphometrics path/to/morphometrics.json \
--run-name opt_cd --objective crack_deflection --n-trials 30
(See scripts/ for the full set of CLI entry points.)
Testing
pytest -m "not slow" # fast, pure-Python logic tests (what CI runs)
pytest # everything, including the FEA integration test (needs the conda FEA stack)
License
Apache-2.0 — see LICENSE and NOTICE.
Citation
A CITATION.cff will accompany the first tagged release; until then, please cite the Matter manuscript above.
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 biomimetic_lattice_pipeline-0.2.0.tar.gz.
File metadata
- Download URL: biomimetic_lattice_pipeline-0.2.0.tar.gz
- Upload date:
- Size: 105.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0664b455a7bf1b68c15947c3890b0a0f4a4a707da55f0003c5a1364e9e66eb3
|
|
| MD5 |
2328445da34d1959ebf620de406ba535
|
|
| BLAKE2b-256 |
26e00bea3772b8efcef48eb5a261ad9e616027dd8f1bb241e9a43a466d17c9f2
|
Provenance
The following attestation bundles were made for biomimetic_lattice_pipeline-0.2.0.tar.gz:
Publisher:
release.yml on crentb/biomimetic-lattice-pipeline
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
biomimetic_lattice_pipeline-0.2.0.tar.gz -
Subject digest:
e0664b455a7bf1b68c15947c3890b0a0f4a4a707da55f0003c5a1364e9e66eb3 - Sigstore transparency entry: 2187940662
- Sigstore integration time:
-
Permalink:
crentb/biomimetic-lattice-pipeline@aa263af559e45774dd964acc7eea795c71a21393 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/crentb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aa263af559e45774dd964acc7eea795c71a21393 -
Trigger Event:
push
-
Statement type:
File details
Details for the file biomimetic_lattice_pipeline-0.2.0-py3-none-any.whl.
File metadata
- Download URL: biomimetic_lattice_pipeline-0.2.0-py3-none-any.whl
- Upload date:
- Size: 124.4 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 |
cfdf1a7c517edd2fa33f6992f80f92a5a7b482e6541d456e949c085004ec91b0
|
|
| MD5 |
14dd231f83de787b4418b807e0757671
|
|
| BLAKE2b-256 |
dc2b6be0062d0d8f327f68894aa83ffda1ff9fa6ab2cc269fb6550ef0f0cd5cc
|
Provenance
The following attestation bundles were made for biomimetic_lattice_pipeline-0.2.0-py3-none-any.whl:
Publisher:
release.yml on crentb/biomimetic-lattice-pipeline
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
biomimetic_lattice_pipeline-0.2.0-py3-none-any.whl -
Subject digest:
cfdf1a7c517edd2fa33f6992f80f92a5a7b482e6541d456e949c085004ec91b0 - Sigstore transparency entry: 2187940700
- Sigstore integration time:
-
Permalink:
crentb/biomimetic-lattice-pipeline@aa263af559e45774dd964acc7eea795c71a21393 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/crentb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@aa263af559e45774dd964acc7eea795c71a21393 -
Trigger Event:
push
-
Statement type: