Giter Site home page Giter Site logo

plater's Introduction

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

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.

Here are the options:

  • -v, increase the verbosity, this will output more things on stderr during the placing of the parts
  • The size of the bedplate (in 2D, top view)
    • -W width, width of the plate, in mm (default 150)
    • -H height, height of the plate, in mm (default 150)
  • -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°
  • -p, will output .ppm files instead of STLs
  • -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.

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).

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

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.

plater's People

Contributors

combolek avatar deuxvis avatar freddii avatar gbea avatar gregwar avatar leph avatar ybott avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plater's Issues

Sorted models info

Hi,
Is there a way to know which models go to which plate after sorting via Plater? I'm trying to keep a tab on my prints while printing them optimally and Plater has been a huge help.

Consistent crashing issue

I'm working with high detailed models and generally find that Plater is crashing consistently. No errors are tossed, the window just goes away. Sometimes I can mitigate this by disabling "view after generation" - and sometimes it doesn't even generate the plates.

My simpler models don't seem to have this issue in Plater, but they're lower poly. I can provide the STLs individually (they're paid-for), or logs based on what's needed.

Feature Request: Show circular bed as circular

When using the circular bed option with many parts, you can see them in the rectangular grid forming a circular outline, but it's hard to see how close to the edge you are, which might help with really packing things in.

The request is to show (in the plater view, once the plating has been found) the circular bed outline when this option is used.

Feature Request: add circular bed support

I love the idea of Plater, but all my printers are deltas with circular beds. With that shape, dense plating is much harder, so plater would have even more value there.

Is this a big change? Might give it a try if you can point me to the right place. Thanks.

not possible to place parts that exceed the bed size diagonally.

Hi,
i wanted to place legolini (https://legolini.com/files/Legolini_STL.7z) parts on a 300mm bed, which unfortunately does not work although the long parts would fit diagonally.

`$ size=300 && ~/Plater-master/plater/build/plater -v -W $size -H $size -j 0.5 -s 0.5 -d 0.5 -r 45 -S -R 1 -t 8 -o "packed${size}plate%01d" plater.conf 
* Reading from plater.conf
- Loading combined_german_magazine_part1+2.stl (quantity 1, orientation bottom)...
! Can't process: Part combined_german_magazine_part1+2.stl is too big for the plate`

V1.0 linux & Source Errors: "error while loading shared libraries: libQtOpenGL.so"

OS: Pop_OS 21.04 (Ubuntu 21.04)
Stanrdard user/non-system dev machine (meaning no "buildutils")

$ ./Plater
./Plater: error while loading shared libraries: libQtOpenGL.so.4: cannot open shared object file: No such file or directory

I run many other Qt apps though already. E.g. FreeCAD.

I also tried to pull down the source. However, upon compiling I get this error:

$ mkdir build
$ cd build/
$ cmake ..
-- The CXX compiler identification is GNU 10.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The C compiler identification is GNU 10.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
CMake Error at gui/CMakeLists.txt:25 (find_package):
  By not providing "FindQt5.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt5", but
  CMake did not find one.

  Could not find a package configuration file provided by "Qt5" with any of
  the following names:

    Qt5Config.cmake
    qt5-config.cmake

  Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
  to a directory containing one of the above files.  If "Qt5" provides a
  separate development package or SDK, be sure it has been installed.


-- Configuring incomplete, errors occurred!
See also "(snip)../Plater/build/CMakeFiles/CMakeOutput.log".
See also "(snip)../Plater/build/CMakeFiles/CMakeError.log".

Error log didn't hold much. Just some C++ source that was unable to include, most likely from the missing Qt above.

crash when importing files from directory with too long path on Windows

Hi,

Plater.exe crashes unexspectedly when pressing the "Add part(s)" button. The fix seems to put the files to some directories up to shorten the path. I am using Windows 10 64 Bit Pro Version.

grafik

I made some testings where i put the file chainy_v2.stl some dirs up until it works instead crashing. I just renamed the paths because they contained some info i dont want to publish here.

  • fail: C:\Users\mario\Seafile\cloud.123456-STLEXPOR.DD\Gedöns\123456Design\Keyorganizer123456\STL Export\chainy_v2.stl
  • fail: C:\Users\mario\Seafile\cloud.123456-STLEXPOR.DD\Gedöns\123456Design\Keyorganizer123456\chainy_v2.stl
  • fail: C:\Users\mario\Seafile\cloud.123456-STLEXPOR.DD\Gedöns\123456Design\chainy_v2.stl
  • fail: C:\Users\mario\Seafile\cloud.123456-STLEXPOR.DD\Gedöns\chainy_v2.stl
  • works: C:\Users\mario\Seafile\cloud.123456-STLEXPOR.DD\chainy_v2.stl

grafik

maybe somebody has an idea how to fix it.
regards, Mario

Understanding settings

I read the readme but I'm not clear on the difference between parts spacing, precision and brute force spacing. I'd appreciate if you could explain in a little more detail. Thank you!

Windows download link broken?

The link for the windows exe's seems broken -- I looked in the git repository it points to, but didn't see it there.

Are these still available somwhere?

Possible to optimize/rank/sort by height?

Firstly awesome application!

Tried it and saw that my new .stl had very different levels of heights,

(picture from cura)
image

Would it be possible to try to target higher parts (with some kind of rank) in a groups or something, so when the smaller parts are done the 3d printer does not have to travel too far.

Plater width, height and what about length?

Hey @Rhoban
I am using plater on our printer, and printing bed base is not squared. It's dimensions are:

X(width)=200mm Y(length)=250mm Z(height)=210mm

But we cannot specify length in command line. But in GUI version of plater there are two boxes that seem to specify width and length but not height.

Could You clarify on that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.