prusa3d / PrusaSlicer

G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
https://www.prusa3d.com/prusaslicer/
GNU Affero General Public License v3.0
7.64k stars 1.92k forks source link

How to extend PrusaSlicer with scripts or Plugins? #3188

Closed X3msnake closed 4 years ago

X3msnake commented 4 years ago

How can one write a plugin or script for PrusaSlicer i dont find documentation about it anywhere.

I want to make a plugin to export the SLA slices to CWS, cbddlp, photon and try to integrate the slicer with some of the photonsters tools like Validator

i know we can change the extension on export, but at the moment MSLA slicing does not add any gcode

One also need the Gcode to be formatted in specific ways

tamasmeszaros commented 4 years ago

Hello! There is no such thing in PrusaSlicer as plug-in bundles. If you need to extend it beyond the boundaries of custom profiles, grab the source code and make it happen. We also appreciate pull requests.

X3msnake commented 4 years ago

@tamasmeszaros where can i learn about the slicing logic and files PrusaSlicer uses to create the slices and write the images plust the config file to the .sl1 zip file?

I presume the slicing and output to file happens in this folder code correct? https://github.com/prusa3d/PrusaSlicer/tree/8376d142670a804647292709495fd9645bf05510/src/libslic3r/SLA

tamasmeszaros commented 4 years ago

@X3msnake, Sorry for the late reply. There is no documentation other than the source code and its comments. You are right in that the SLA story resides in src/libslic3r/SLA folder. These form the backend for SLA print preparation. However, the actual slicing is done in src/libslic3r/SLAPrint.cpp and src/libslic3r/SLAPrintSteps.cpp. There is a class Zipper (Zipper.hpp) which is handed over to the SLAPrint object when the output archive is constructed. You can use that zipper object to write additional files into the output archive. See line 160 in src/slic3r/GUI/BackgroundSlicingProcess.cpp.

Good luck!

tamasmeszaros commented 4 years ago

This topic is also touched in #3713

X3msnake commented 4 years ago

Thanks for the update and the info :)

tamasmeszaros notifications@github.com escreveu no dia segunda, 16/03/2020 à(s) 08:51:

This topic is also touched in #3713 https://github.com/prusa3d/PrusaSlicer/issues/3713

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/prusa3d/PrusaSlicer/issues/3188#issuecomment-599415803, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUR56Q2DZ5QK4PHWW4QB7TRHXSAFANCNFSM4JNRC7KQ .

-- Com os melhores cumprimentos, Vinicius Silva

simonjohansson commented 4 years ago

@X3msnake did you get anywhere with this?

X3msnake commented 4 years ago

we ended up creating a command line conversion tool.

lookup uv3dp

No dia sexta-feira, 29 de maio de 2020, Simon Johansson < notifications@github.com> escreveu:

@X3msnake https://github.com/X3msnake did you get anywhere with this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/prusa3d/PrusaSlicer/issues/3188#issuecomment-635988031, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUR56TAP2JNWNNDAVSS6MLRT65X7ANCNFSM4JNRC7KQ .

-- Com os melhores cumprimentos, Vinicius Silva