Hi developer, sorry this might be a bad news for you, this system is glue together with php and javascript. The good news is, I am here to provide you the best explaination of what is happening in this system.
If you need a simple example, please take a look at the ui.html. Although the UI is in Chinese, but the comments are in English.
In simple words, this is what happens:
Operation Procedures
1. User upload an stl to the server (with upload.php), the server return a storage filename which can be hashed or timestamp (In this implementation, timestamp is used, the file will be stored in ./input)
2. The given filename is stored by Javascript to browser RAM and request the stl viewer to get the stl file for preview.
3. Afther the user confirm their upload file is correct, the javascript then call another script (slice.php) to slice the stl model and return the filename for the gcode file (which, located under ./output)
4. Next, you can do whatever you want with the given gcode files.(Like sending it a Raspberry Pi / ESP32 etc)
Cura Engine Dummy
Cura Engine Dummy is a VB.net written script that helps you "steal" the command that sent from Cura UI to Cura Engine. This is how its works.
Under normal situation, Cura UI will send the slicing commands to CuraEngine for slicing when you press "prepare" (or update anything in older versions of cura). As the command is too long and not human readable, this exe file (which, you can find under ./CuraEngine Dummy/bin/Debug/CuraEngine Dummy.exe) is used to replace the original CuraEngine.exe and output all the paramter it gets to a txt file.
To use this file, follow the steps below:
1. Go to the root of your Cura Slicer Software
2. Find CuraEngine.exe, rename it as "CuraEngineReal.exe"
3. Copy the "CuraEngine Dummy.exe" into the same directory where the real CuraEngine is located
4. Rename "CuraEngine Dummy.exe" to "CuraEngine"
5. Open CuraUI with a random file, adjust the profile so that it fits most of your print well / choose the one that you use most
6. Press "Prepare", the Cura UI should crash and closed by itself. The CuraEngine.exe (Dummy) should export a txt file full of input variables.
7. Strip out all the newlines and put the rest of the content into ./template/default.txt
8. Replace the input and output filename from the commands to "{outputfilename}" -em0 -l "{inputfilename}"