Formlabs Developers
Download PreForm Insider to start developing with the PreForm API.

Examples

Examples are provided for common use cases of the Formlabs Python SDK. Such as creating a report from a finished build to post-processing and billing or packing SLS jobs from a browser application.

Example code#

Scripts that do one task from the command line and write a file you can use.

Quickstart

Prepare an STL file in PreForm, then queue it on a printer or save it as a .form file. A great starting point for scripting with formlabs-sdk.

Printability Report

Grade a folder of STL files PASS, WARN, or FAIL for printing, with the checks behind each grade and a picture of each part that didn't pass.

Instant quote

Quote a price for a part in each material on a price list, with the print time and the resin including supports.

Print setting rollout

Move a queue of .form files to a new print setting, and preview the layer counts and print times before anything is saved.

Part labels

Turn a finished build into a report for sorting and billing: every part matched to its customer order, the material it used, and a bag label with its picture.

Serial numbers

Label every part in a build with a serial number, placed in the model's own coordinates so the part's orientation doesn't matter.

Layout modes

Lay out the same cubes with each auto-layout option, from spacing and locked rotation to bounds and a fixed seed, and compare the builds.

Pack modes

Pack the same boats with each per-part model lock, from free to upright, and compare the builds.

Layout across builds

Lay out more dental arches than fit on one build platform, ejecting the newest onto the next build so the oldest print first.

Pack across builds

Pack more parts than fit in one SLS build volume, carrying the parts that don't fit to the next build.

Example applications#

Complete applications with a user interface, with PreForm Server behind them.

Web SLS Packer

A web app that packs STL parts into Fuse 1+ and Fuse X1 builds from a browser, and sends each build to a printer.

What's next#