Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

217 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plater

Plater

Plater is a 3D printer plates placer and optimizer. It takes a few STL files and some parameters such as the plate dimension, part orientation and spacing, and it tries to generates 3D model to print your parts with at least as possible plates.

It uses a really simple configuration file that contains the list of parts with their quantities and dimension. You can then build your STL plate(s) and release it with your part, or simply release the plater.conf file and let people do their own plates using their own settings.

Note that Plater will not choose the best orientation of a part for you, this is up to the user because it depends on a lot of things.

Download binaries from Release page

Alternate mirror:

Using

With the GUI

Note: the GUI is unmaintained. It still builds and runs with the original options (plate size, spacing, precision, sort mode, random iterations), but it does not expose any of the newer placement features added to the command line — the algorithm selector (-A, including anneal), area balancing (-B), parallel chains (-t), tall-part centring (-T), the consolidation pass (-C), and the fit/shrink size searches (-i / -z). For any of those, use the command line. There are no plans to update the GUI.

To make a plate, first load your STL files. Click "Add Part(s)" button and select one or more .stl file.

This will open a wizard, you'll be able to select the orientation and the quantity of the part.

Then, enter your plate dimension (in mm). You can also adjust the spacing of the parts and the precision (internally, plater use a discrete representation of parts, lower is better).

Hit "Run", this will generate you the STL file(s) corresponding to your plates.

All the settings you change can be saved to a config.json file using the "File > config.json" menu. This file will be created in the same folder as plater executable and will be loaded on startup.

With the command line

Plater usage is:

plater [options] plater.conf

Where plater.conf is the name of your configuration file. If - is given as a file name, the configuration will be read from standard input.

The configuration file (or -) is the only required argument. Every option is optional: value options fall back to the default shown below, and the on/off toggles (-v, -p, -m, -S, -c, -C, -T, and -D) are disabled unless given. Options may appear in any order, before or after the config file.

Here are the options:

  • -h, display the usage/help and exit

  • -v, increase the verbosity, this will output more things on stderr during the placing of the parts

  • -b size, the size of the bedplate (in 2D, top view), in mm (default 150). A single value (e.g. -b 300) is a square bed; use AxB (e.g. -b 300x200) for a rectangular bed.

  • -W width / -H height, the bed width and height in mm, set independently. This is the older form of -b (-W 300 -H 200 is the same as -b 300x200), kept for backward compatibility with existing scripts.

  • -D diameter, set a circular bed of the given diameter, in mm (instead of the rectangular -b).

  • -j precision, precision, in mm (default 0.5)

  • -s spacing, parts spacing, in mm (default 2)

  • -d delta, sets the spacing of the brute forcing (see below), default 2mm

  • -r rotation, sets the angle of the brute forcing, default 90°

  • -S, try multiple sort possibilities. Instead of placing once with a single ordering (largest-area first), the placer runs over many part orderings — largest-first, smallest-first, and several randomly shuffled ones — and keeps the result with the fewest plates. A broader search (often tighter packing) at the cost of more runtime.

  • -R n, number of random shuffled-order iterations to try (default 3). Only has an effect together with -S; more iterations search harder but run slower.

  • -t threads, number of placement threads to run in parallel (default 1).

  • -c, also write a plates.csv describing each plate's parts and positions.

  • -p, will output .ppm files instead of STLs

  • -m, will output a single .3mf file containing every plate instead of one STL per plate, using the OrcaSlicer / BambuStudio multi-plate project layout. Each placed part becomes its own object named after the original part file, and every plate becomes a separate plate in the slicer (plate membership is stored in Metadata/model_settings.config, and a Metadata/project_settings.config declares the bed). Plates are arranged on the slicer's plate grid, so set -b to match your printer's bed for the grid to line up. The output file name is derived from -o with any %-placeholder stripped (e.g. the default plate_%03d produces plate.3mf).

    Open this file in OrcaSlicer with File > Open Project (or double-click it) — not File > Import. Orca only restores the separate plates when opening it as a project; importing loads the geometry onto a single plate. The file declares a plain rectangular bed matching -b, so re-select your printer preset before slicing if you need its specific settings.

  • -o pattern, sets the pattern of output files, default is plate_%03d, this means that the first plate will be named plate_001.stl, the second plate_002.stl and so on.

  • -O name, sets the name of the single -m 3MF output file (default plate.3mf). The .3mf extension is appended if missing. Use this so repeated runs don't overwrite a previous export, e.g. -O TridentR2 writes TridentR2.3mf.

Placement algorithm

By default Plater uses its original brute-force placement. The -A option selects an alternative, and -C adds a consolidation pass:

  • -A algorithm, selects the placement algorithm (default brute):

    • brute — the original full brute-force search. Hole-aware: it can nest small parts inside holes/cavities of larger ones for the tightest packing.
    • pruned — hole-aware pruned brute force. Produces identical packing to brute (same plates, byte-for-byte) but is faster. Recommended when your parts have holes.
    • skyline — bottom-left "drop" heuristic. Fastest, but it cannot fill holes (it only stacks onto the top profile), so it can need a larger plate for parts with cavities. Best for hole-free parts. Rectangular plates only; falls back to brute for circular beds.
    • contactskyline with max-contact scoring (denser placement). Same no-hole-filling limitation as skyline.
    • anneal — simulated-annealing search over part orderings. The other algorithms place the parts in a fixed (largest-first) order; anneal instead searches which order to place them in — and which gravity and rotation bias to use — re-running the hole-aware brute-force placer on each candidate ordering and keeping the densest packing found. It is seeded from the largest-first result, so it is never worse than brute, only slower. This is the quality-first option: it trades CPU time (set with -e) for tighter packing. Pair it with finer -r/-d for the tightest results. Hole-aware (uses brute internally) and works on rectangular and circular beds.
  • -e seconds, wall-clock time budget for the anneal search (default 30). Larger budgets explore more orderings and pack tighter; it stops at the budget and keeps the best packing seen so far, so you can stop it any time. No effect unless -A anneal is selected.

  • -B, balance pass for -A anneal. The dense first-fit packing fills the first plate preferentially, so the last plate can end up much lighter (e.g. two full plates and a third with only a few parts). With -B, once the minimum plate count is found — and only if it is more than one plate — the parts are reassigned largest-volume-first onto the least-loaded plate that fits them (an LPT pass), spreading the big parts across the plates so the print volume comes out roughly equal, without ever using more plates than the minimum. Balance is measured as the spread (coefficient of variation) of the summed part mesh volume per plate — volume is a better proxy for print time than 2D footprint, so the plates take a similar time to print. The reassignment is kept only if it actually improves the balance and still fits in the minimum plates. Only meaningful with -A anneal. Composes with -T (centred and balanced).

    Note when combined with a size search (-z / -i): a balanced layout needs more room than a dense one (the big parts must be spread out, not crammed), so -B holds the bed at the smallest size where the balanced packing still fits the minimum plates, rather than shrinking down to where only a dense (lopsided) packing fits. In other words, -B trades a little bed size for an even split.

    -A anneal also honours -t threads, which runs that many independent annealing chains in parallel and keeps the best (more chains = more exploration at the same wall-clock budget).

  • -C, consolidation pass. After placing, try to drop a plate by re-packing all parts into one fewer plate (exploring several part orderings); the result is kept only if it strictly reduces the plate count, so it never makes things worse. Useful when a single-sort run leaves a sparse trailing plate; redundant with the broader search of -S.

  • -T, bias taller parts toward the centre of the plate (often more reliable to print — better cooling/adhesion symmetry, less risk from edge drafts). How it centres depends on the algorithm:

    • With -A anneal: the search itself scores each placement toward the plate centre (seeded tallest-first, largest area breaking height ties), so it optimises a centred layout while still minimising the plate count — and it composes with -B (centred and volume-balanced).
    • Otherwise (e.g. -A brute): it first finds the minimum number of plates with the normal packing, then, without exceeding that plate count, spreads the tall parts evenly across the plates and pulls them toward each plate's centre. When the plates are full there may not be room to centre them — the tall parts are then still balanced across the plates (corner-packed). Fewer plates always takes priority over centring.

Fit search (ideal plate size)

Instead of placing on a single fixed plate size, Plater can search for the smallest plate that still fits your parts in as few plates as possible. In this mode -b are the physical maximum plate size (your bed), and you give an ideal (smallest preferred) size to start from:

  • -i ideal, the ideal/smallest plate size, in mm. Setting this enables the fit search. A single value (e.g. -i 250) is a square ideal. For a non-square ideal use WxH (e.g. -i 250x180): width and height each start at their own ideal and grow toward their own -b maximum, independently.
  • -g step, the growth increment, in mm (default 10).
  • -N plates, the number of plates to target first (default 1).

The search first checks the full bed size (which always yields the fewest plates) to establish the target plate count, then grows the plate size from the ideal up to the bed (each axis toward its own -b, never exceeding it) and stops at the smallest size that reaches that target (-N plates, or the fewest reachable if -N can't be met). It does not keep trying larger sizes once the target is reached.

With -A anneal the size scan is deliberately linear (smallest upward, stopping at the first size that reaches the target) rather than a binary search: the annealing result isn't perfectly repeatable, so a binary search could mistake a feasible small plate for needing more plates and skip to needlessly larger ones.

For example, with a 300x300 bed but a preferred 250x250 area, packing holed parts (hole-aware, faster) into a named 3MF:

plater -b 300 -i 250 -g 5 -A pruned -C -m -O job project.conf

This tries 250, 255, ... up to 300 on a single plate; if nothing fits on one plate it moves to two plates (again preferring the smallest size), and so on. The chosen size is what feeds the 3MF plate grid, so combine it freely with -m.

Shrink fit (automatic, no ideal needed)

-z is a simpler, automatic variant of the fit search that needs no -i ideal. It starts at the full -b bed size — which always needs the fewest plates — and steps the bed size down by -g, keeping the smallest size that still packs into that baseline plate count. It stops the first time a smaller size would need an extra plate (or no longer fits a part) and keeps the previous, larger size.

  • -z, enable the shrink fit. Uses -g as the step (default 10 mm). Mutually exclusive with -i (if both are given, -z wins).

When the parts already fit on a single plate at the full bed, there is no plate count left to optimise, so a placement search (-A anneal) adds nothing to the size hunt — the only goal is a smaller bed. In that case -z uses fast placement to step the size down, rather than re-running the search at every size. The final layout at the chosen size still uses the requested algorithm, though, so -A anneal gives its dense centre-out packing (which fills the gaps that the plain centred greedy leaves). When more than one plate is genuinely needed, the requested algorithm is used at each size as normal (it can still cut the plate count).

-T interacts with the shrink the same way -B does: centring the tall part needs a little room, so the very tightest bed would pack everything into a corner with the tall part off to one side. With -T, -z therefore stops at the smallest bed where the tall part can still be centred, rather than shrinking all the way down to the densest corner-pack — the tightest centred layout.

For example, on a 300x300 bed:

plater -b 300 -z -g 20 -A brute project.conf

might report 1 plate at 300x300, still 1 plate at 280x280, then 260x260 would need 2 plates -> stop, and pick 280x280 — the smallest bed that didn't cost an extra plate. As with -i, the physical -b bed is restored for the 3MF plate grid; the shrink only governs how tightly the parts pack.

The plater.conf file

The configuration file looks like this:

# This is an example of plater.conf file
part.stl 1
other_part.stl 3 back
yet-another-part.stl 8 left

Each line begins with a part name, followed by the quantity, and optionally the side that should be on the plate. The side can be bottom (default, you can also put nothing), front, top, back, left or `right.

You can put comment lines beginning with #, it can be useful to add some advices on how generate your plate or some copyrights.

The file should be described relatively to the plater.conf file.

If a filename contains a space ( ), you can escape it with the \ character (like some\ plate.stl).

You can generate a plater.conf automatically from a directory of STL files with tools/gen_plater_conf.py — it fills in quantities from _x<N> file-name suffixes and can split "accent" parts (prefixed [a]) into a separate config.

How does it works?

The problem of placing parts is quite hard and very likely NP-complete. Plater is an heuristic based on greedy algorithm that use brute force.

Each part is first pixelized into a bitmap (each pixel is white for free space and black for used space), with a given precision. Then, this bitmap is dilatated with a given spacing.

Then, the placer tries to put each part one by one on the plate, brute forcing position to maximize a score based on a simple gravity-like property, which tend to pack the parts. If it can't place the part, it try adding a new plate and so on.

It is running multiple times with multiple parameters, and the best solution, i.e the one with the less plates is kept.

Note that the result can be bad in some limit cases, and it will not replace your expert brain! However, it is useful to do the placing automatically and quickly.

Building

Plater

To build plater, go in the plater/ directory and then use the cmake:

mkdir build
cd build
cmake ..
make

This will create for you the libplater and the plater command tool

GUI

Unmaintained. These instructions are stale (Qt 4.8 / qmake), while the CMake build expects Qt5, so the GUI may not build as written on a current system. The command-line tool above is the maintained path and the only one that exposes the newer placement features. The GUI links the same libplater, so it still works for basic plating if you can get it to build.

First, install Qt 4.8.0. Then, be sure you built plater in plater/build/.

Using QtCreator

You can simply run QtCreator on gui.pro and build it.

Using command line

Go in the gui/ directory, and do:

mkdir build
cd build
qmake ..
make
sudo make install

This will create the plater-gui binary file.

About

3D-printer parts placer and plate generator

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages