YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
π Binder Jetting Dithering Parameter Optimizer
Bayesian Optimization toolkit for finding optimal dithering parameters in binder jetting additive manufacturing.
Uses Gaussian Process surrogate models + intelligent acquisition functions to minimize the number of physical print-and-scan experiments needed to find ideal dithering settings.
Problem
In binder jetting, dithering parameters control how binder is distributed across the powder bed. Getting them right is critical for dimensional accuracy β but each evaluation requires physically printing a part and 3D scanning it. This makes each experiment expensive (hours + material cost).
This toolkit solves: Given 3 dithering control variables, find the combination that minimizes deviation between printed parts and the original CAD model, using as few physical experiments as possible.
Control Variables
| Parameter | Description |
|---|---|
dithering_percentage |
% of binder applied via dithering pattern |
dithering_distance |
Spatial distance parameter for dither pattern |
dithering_gradient |
Gradient/falloff of dithering effect |
Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β YOUR WORKFLOW β
β Optimizer suggests params β You print β You scan β β
β Compare scan vs CAD β Feed deviation back β Repeat β
βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ
β
βββββββββββββ΄ββββββββββββββββ
β BAYESIAN OPTIMIZATION β
β Gaussian Process + qNEI β
β Sobol init β BO loop β
βββββββββββββ¬ββββββββββββββββ
β
βββββββββββββββββΌβββββββββββββββββββ
β β β
AxServiceOptimizer BoTorchOptimizer MultiObjectiveOptimizer
(recommended) (full control) (Pareto frontier)
Modules
| Module | Purpose |
|---|---|
optimizer.py |
3 optimizer classes: Ax Service API (recommended), pure BoTorch, Multi-Objective |
scan_deviation.py |
3D scan vs CAD comparison: RANSAC + ICP alignment, signed distances, 20+ deviation metrics |
tracker.py |
Experiment logging, CSV/JSON persistence, optimization progress plots, GP contour maps |
cli.py |
Interactive CLI + demo mode with synthetic objective |
Quick Start
1. Install
pip install ax-platform botorch open3d trimesh scipy matplotlib pandas
2. Run Demo (no printer needed)
python -m binder_jetting_optimizer --demo
This runs the full BO loop with a synthetic deviation function. You'll see:
- Sobol initialization (6 space-filling experiments)
- 20 BO-guided experiments converging toward the optimum
- GP surrogate contour maps
- Optimization progress plots
3. Run Real Campaign
python -m binder_jetting_optimizer
The interactive CLI will:
- Ask for your parameter bounds
- Suggest dithering parameters for each experiment
- Wait for you to print + scan
- Accept results (manual entry OR automatic 3D scan analysis)
- Update the GP model and suggest the next experiment
- Save state after every trial (crash-safe, resumable)
4. Python API
from binder_jetting_optimizer.optimizer import AxServiceOptimizer
# Initialize
opt = AxServiceOptimizer(
param_bounds={
"dithering_percentage": (0.0, 100.0),
"dithering_distance": (0.5, 10.0),
"dithering_gradient": (0.0, 5.0),
},
objective_name="rms_deviation",
n_sobol=6, # initial space-filling experiments
)
# Loop: suggest β print β scan β report
params, trial_idx = opt.suggest()
# ... physically print with these params, then 3D scan ...
opt.report(trial_idx, {"rms_deviation": 0.32, "max_deviation": 0.85})
# Get best parameters found so far
best_params, best_metrics = opt.get_best()
# Save/resume across sessions (multi-day campaigns)
opt.save("my_campaign.json")
opt = AxServiceOptimizer.load("my_campaign.json")
5. Automatic 3D Scan Analysis
from binder_jetting_optimizer.scan_deviation import ScanDeviationAnalyzer
analyzer = ScanDeviationAnalyzer(voxel_size=0.005, n_sample=100_000)
metrics, signed_distances, aligned_points = analyzer.analyze(
scan_path="scan.ply",
cad_path="reference.stl",
)
# metrics dict has 20+ deviation scalars ready for the BO loop
# Save colored deviation map
analyzer.save_deviation_map("deviation_heatmap.ply")
Deviation Metrics
The scan analyzer computes these metrics per experiment:
| Metric | Description | Use |
|---|---|---|
rms_deviation |
Root mean square deviation (mm) | Primary BO objective |
hausdorff_95 |
95th percentile of absolute deviation | Robust Hausdorff distance |
max_deviation |
Maximum absolute deviation | Worst-case error |
mean_signed |
Mean signed deviation (+over/-under) | Detect systematic shrinkage |
frac_within_0.1mm |
Fraction of points within 0.1mm | Quality pass rate |
frac_overbuild |
Fraction of overbuild points | Binder jetting specific |
Key References
- A Tutorial on Bayesian Optimization β the foundational BO reference
- Multi-fidelity BO in Engineering Design β multi-fidelity for manufacturing
- BoTorch: Efficient Monte-Carlo BO β the GP framework used here
- qNEHVI for Multi-Objective BO β multi-objective extension
Tips
- Start with 6-8 Sobol experiments β this gives the GP enough data to form a reasonable prior
- Budget 20-30 total experiments β BO typically converges in 15-25 trials for 3D problems
- Tighter bounds = faster convergence β if you know dithering percentage is between 30-60%, use those bounds
- Estimate your scan noise β repeat-scan the same part 3x to get SEM, then pass it to the optimizer
- Use the deviation map β the colored PLY file shows spatially where deviations occur (corners, thin walls, etc.)