This service supports your 3D printing workflow by utilizing auto-rotation and slicing functionality.
The PrePrint Service is based on:
The full workflow can be deployed either on a single machine or on two separated nodes as described below:
The following steps will be done:
- Slice a model using the PrePrint server Plugin.
- The model will be auto-rotated for a proper 3D print by the Tweaker-3 software.
- The auto-rotated model will be sent back to the octoprint server.
- The optimized model will be sliced using Slic3r.
- The final machine code will be sent back to the octoprint server.
- The printing can be started.
Each step is optional and can be set in the settings.
- One server node that is connected to your 3D printer, like a raspberry pi.
- One server node for pre-processing, which has at least 2GHz CPU frequency. If the node connected to the printer is strong enough, one server suffices.
- Optional: Install Docker version 1.10.0+ and Docker Compose version 1.6.0+ on the more powerful node.
1. Install the Plugin
Install the PrePrint Server plugin via the bundled Plugin Manager or manually using this URL on the Printer-Controller
In order to make the service highly available, it is recommended to deploy the PrePrint Service in docker. If you are not familiar with docker yet, have a quick look at the links in the requirements-section.
Then run the application locally with:
git clone https://github.com/christophschranz/OctoPrint-PrePrintService cd OctoPrint-PrePrintService docker-compose up --build -d docker-compose logs -f
docker-compose.yml is also configured to run in a given docker swarm,
docker-compose.yml to your setup and run:
docker-compose build docker-compose push docker stack deploy --compose-file docker-compose.yml preprintservice
The service is available localhost:2304/tweak
(on the hosting node),
where a simple UI is provided for testing the PrePrint Service.
docker-compose down to stop the service. (If you ever wish ;) )
Configure the plugin in the settings and make sure the url for the PrePrint service is set correct:
Finally, click on the
Slice-Button of uploaded STL-Models and
produce printable machinecode via this Preprocessing-Plugin.
To test the whole setup, do the following steps:
Visit localhost:2304/tweak, select a stl model file and make an extended Tweak (auto-rotation)
withoutslicing. The output should be an auto-rotated (binary) STL model. If not, check the logs of the docker-service using
docker-compose logs -fin the folder where the
Now, do the same
withslicing, the resulting file should be a gcode file of the model. Else, check the logs of the docker-service using
docker-compose logs -fin the same folder.
Visit the octoprint server and try to slice an uploaded stl model file. After some seconds a
.gcofile should be uploaded. Note that in a small time frame a
.gcofile with only one line and 83 bytes can appear. This is expected and should be overwritten afterwards after a short time. If this doesn't work, start the octoprint server per CLI with
octoprint serveand track the logs. The following two lines are expected:
2019-04-07 22:28:44,301 - octoprint.plugins.preprintservice - INFO - Connection to PrePrintService on http://192.168.48.81:2304/tweak is ready, status code 200 2019-04-07 22:28:44,321 - octoprint.plugins.preprintservice - INFO - Connection to Octoprint server on http://192.168.48.43:5000/api/version?apikey=A943AB47727A461F9CEF9EXXXXXXXX is ready, status code 200
If the the Octoprint Server's URL is invalid, you will see this:
2019-04-07 22:27:34,746 - octoprint.plugins.preprintservice - WARNING - "Connection to Octoprint server on http://192.168.48.43:5000 couldn't be established"
If you see instead the following, please check the APIKEY: (403 - forbidden)
2019-04-07 22:30:09,570 - octoprint.plugins.preprintservice - WARNING - Connection to Octoprint server on http://192.168.48.43:5000/api/version couldn't be established, status code 403
If the the PrePrint Server can't be reached, you will see this:
2019-04-07 22:27:34,746 - octoprint.plugins.preprintservice - WARNING - Connection to PrePrint Server on http://192.168.48.81:2304/asdf couldn't be established
Make also sure that your selected
profilefile is correct.
If you have any troubles in setting this plugin up or tips to improve this instruction, please let me know!
This plugin, as well as the auto-rotation module Tweaker-3 was developed in my spare time. If you like it, I would be thankful about a cup of coffee :)