Often we receive several models and are asked to quote for several quantities. Manually arranging parts to find an optimal packing can be very time consuming and it’s impossible once the number of models or quantities exceed 2.
Previously I had developed scripts to generate a quote for an existing .form file or a collection of models using the Preform Server API. The script was limited to a single build chamber. Later we purchased a Fuse 1+ to add to our Fuse 1. With this small fleet it because even more difficult to quote because the 1+ is significant faster but you don’t want to idle the Fuse 1.
So I write a new script to automatically calculate the optimal packing for N models, each with a specified quantity, and generate the final .form files with a price and time estimate.
If you are interested in licensing this script please contact me at dkelly at industrious3d.com
================================================================
PACKING PLAN
================================================================
Printer / material: FS30-1-0 / FLP12G01 @ 0.11 mm
Model spacing: 3.0 mm
Distinct models: 2
Total parts: 1000
----------------------------------------------------------------
Chamber 1: 215 parts {539.stlx164, 5310.stlx51}
Chamber 2: 215 parts {539.stlx164, 5310.stlx51}
Chamber 3: 215 parts {539.stlx164, 5310stlx51}
Chamber 4: 355 parts {539.stlx8, 5310.stlx347}
----------------------------------------------------------------
BUILD CHAMBERS NEEDED: 4
6 Likes
Very cool!
What can we do to make the API better for you?
1 Like
I’m really pleased with the PreformServer API. The only request I can think of would be Linux release.
Here’s the usage for the planner script:
usage: fuse_pack_planner.py [-h] [--base-url BASE_URL] [--preform-server PREFORM_SERVER] [--port PORT] [--list-materials] [--item PATH:QTY] [--orient [PATH:]X,Y[,Z]] [--machine-type MACHINE_TYPE]
[--material-code MATERIAL_CODE] [--print-setting PRINT_SETTING] [--layer-thickness LAYER_THICKNESS] [--model-spacing MODEL_SPACING] [--max-trial MAX_TRIAL]
[--refine-budget REFINE_BUDGET] [--no-refine] [--output-dir OUTPUT_DIR] [--form-prefix FORM_PREFIX] [--no-validate] [--quiet]
Plan optimal Fuse SLS build-chamber packing for a multi-model order via the Formlabs PreForm Server Local API.
options:
-h, --help show this help message and exit
--base-url BASE_URL Base URL of a running PreFormServer. (default: http://localhost:44388)
--preform-server PREFORM_SERVER
Path to PreFormServer executable to start automatically. (default: None)
--port PORT Port to use when starting PreFormServer. (default: 44388)
--list-materials Print available Fuse printers/materials and exit. (default: False)
--item PATH:QTY A model and its quantity, e.g. /abs/part.stl:200. Repeat --item for each distinct model.
--orient [PATH:]X,Y[,Z]
Fix print orientation (Euler angles, degrees) for parts whose strength/surface quality depends on layer-line direction. 'X,Y' applies to all models; 'PATH:X,Y' to one model (overrides
the global value). With X,Y the packer may still rotate the part about Z; add a third angle to forbid any rotation. Repeat --orient as needed.
--machine-type MACHINE_TYPE
Fuse machine_type (see --list-materials). (default: FS30-1-0)
--material-code MATERIAL_CODE
Nylon/TPU material_code. (default: FLP12G01)
--print-setting PRINT_SETTING
print_setting. Material-specific; run --list-materials (e.g. Fuse 1+ Nylon 12 uses DEFAULT_V5, not DEFAULT). (default: DEFAULT_V5)
--layer-thickness LAYER_THICKNESS
layer_thickness_mm, e.g. 0.11. (default: 0.11)
--model-spacing MODEL_SPACING
Minimum spacing (mm) between packed models. (default: 3.0)
--max-trial MAX_TRIAL
Max copies to pack in one solo-capacity attempt. (default: 512)
--refine-budget REFINE_BUDGET
Max extra auto-pack calls to spend on refinement. (default: 60)
--no-refine Skip the refinement pass (faster, less optimal). (default: False)
--output-dir OUTPUT_DIR
If set, write one .form file per planned chamber to this directory (created if needed). Must be a valid path on the machine running PreFormServer. (default: None)
--form-prefix FORM_PREFIX
Optional filename prefix for exported .form files, e.g. 'order1234_' -> order1234_chamber_01.form. (default: )
--no-validate Skip the check that machine_type is a Fuse/SLS printer. (default: False)
--quiet Reduce logging. (default: False)
Some of the other scripts I’ve written are:
- Label generator - creates labels contain date, time, printer, material, .form name, model name, quantity and a rendered image (for larger label sizes)
- Quoting script - analyzes a form file and generates a quote. Can import, repair (if needed) and pack obj, stl, stp and additional form files also.
We just added another Fuse to our facility. Very nice ecosystem you and your team have built.
Cheers,
Dwight Kelly
Industrious 3D