... | @@ -101,12 +101,12 @@ The setting's value can then be queried in file ```printer.lua``` of the printer |
... | @@ -101,12 +101,12 @@ The setting's value can then be queried in file ```printer.lua``` of the printer |
|
|
|
|
|
## ```printer.lua``` <a name="printer_lua"></a>
|
|
## ```printer.lua``` <a name="printer_lua"></a>
|
|
|
|
|
|
This file specifies how to translate the sliced geometry to printing instructions (e.g., G-Code). These instructions are specific to the machine/printer the profile is made for. Moreover, the translation is done through lua functions that are called by IceSL whenever the print process demands it <sup>4</sup>. The list of functions to implement are the following:
|
|
This file specifies how to translate the sliced geometry to printing instructions, hereafter referred to as the _G-Code file_. These instructions are specific to the machine/printer the profile is made for. Moreover, the translation is done through lua functions that are called by IceSL whenever the print process demands it <sup>4</sup>. The list of functions to implement are the following:
|
|
|
|
|
|
| Function | Description |
|
|
| Function | Description |
|
|
| ------ | ------ |
|
|
| ------ | ------ |
|
|
| ```header()``` | called at beginning of the G-code creation |
|
|
| ```header()``` | called to create the header of the G-Code file |
|
|
| ```footer()``` | called at end of the G-code creation |
|
|
| ```footer()``` | called to create footer of the G-code file |
|
|
| ```comment(c)``` | called when outputting a comment ```c``` |
|
|
| ```comment(c)``` | called when outputting a comment ```c``` |
|
|
| ```layer_start(z)``` | called at the start of a layer at height ```z``` |
|
|
| ```layer_start(z)``` | called at the start of a layer at height ```z``` |
|
|
| ```layer_stop()``` | called at the end of a layer |
|
|
| ```layer_stop()``` | called at the end of a layer |
|
... | @@ -142,7 +142,7 @@ IceSL provides a number of lua helper functions to facilitate the writing to gco |
... | @@ -142,7 +142,7 @@ IceSL provides a number of lua helper functions to facilitate the writing to gco |
|
|
|
|
|
### State variables <a name="variables"></a>
|
|
### State variables <a name="variables"></a>
|
|
|
|
|
|
When implementing the lua functions for G-code production, the user can access all printing settings used while slicing. Settings with *boolean*, *integer* or *float* values as well as custom settings defined in ```features.lua``` can be queried/polled.
|
|
When implementing the above lua functions, the user can access all printing settings used while slicing. Settings with *boolean*, *integer* or *float* values as well as custom settings defined in ```features.lua``` can be queried/polled.
|
|
|
|
|
|
Additionally, IceSL provides other useful variables that are also accessible. We detail them next:
|
|
Additionally, IceSL provides other useful variables that are also accessible. We detail them next:
|
|
|
|
|
... | | ... | |