... | ... | @@ -128,32 +128,32 @@ The setting's value can then be queried in file `printer.lua` of the printer pro |
|
|
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 |
|
|
|
|----------|-------------|
|
|
|
| `header()` | called to create the header of the G-Code file |
|
|
|
| `footer()` | called to create footer of the G-code file |
|
|
|
| `comment(c)` | called when outputting a comment `c` |
|
|
|
| `layer_start(z)` | called at the start of a layer at height `z` |
|
|
|
| `layer_stop()` | called at the end of a layer |
|
|
|
| `extruder_start()` | called before extruding |
|
|
|
| `extruder_stop()` | called after extruding |
|
|
|
| `select_extruder(ext)` | called when setting-up the extruder `ext`. This function is called for each available extruder at the beginning of the G-Code and once for the first used extruder in the print. After this, IceSL calls `swap_extruder` |
|
|
|
| `swap_extruder(ext1,ext2,x,y,z)` | called when swapping extruder `ext1` to `ext2` at position `x,y,z` |
|
|
|
| `prime(ext,e)` | called when priming from value `e` with extruder `ext`. This function must return the absolute value of the E-axis after priming |
|
|
|
| `retract(ext,e)` | called when retracting from value `e` with extruder `ext`. This function must return the absolute value of the-E axis after retracting |
|
|
|
| `move_e(e)` | called when moving the E-axis to value `e` with the current extruder |
|
|
|
| `move_xyz(x,y,z)` | called when traveling to `x,y,z` |
|
|
|
| `move_xyze(x,y,z,e)` | called when traveling to `x,y,z` while extruding to value `e` |
|
|
|
| `progress(percent)` | called on each step of producing the GCode; `percent` is the total progress of the print |
|
|
|
| `set_feedrate(rate)` | called when setting the feed-rate of the printer to `rate` |
|
|
|
| `set_fan_speed(speed)` | called when setting the part cooling fan velocity to `speed` |
|
|
|
| `set_extruder_temperature(ext,temp)` | called when setting the extruder `ext` temperature to `temp` |
|
|
|
| `wait(sec,x,y,z)` | called when the parameter `enable_min_layer_time` is set to true and the printing time for the layer is less than `min_layer_time_sec`. `sec` is the remaining time to achieve `min_layer_time_sec` and `x,y,z` is where IceSL expects the head to be after the wait |
|
|
|
| `set_and_wait_extruder_temperature(ext,temp)` | called when setting the extruder `ext` temperature to `temp` while waiting. Used when printing with multiple extruders |
|
|
|
| `set_mixing_ratios(ratios)` | called when setting the mixing ratios of each filament fed onto the mixing extruder; `ratios` is a table containing the ratio for each filament (the add up to 1). This function is only called when using color mixing |
|
|
|
|
|
|
Functions returning a value (i.e., `prime` and `retract`) are expected to be **called by IceSL only** <sup>5</sup>. This is due to the fact that IceSL uses the returned value to internally keep track of the E-axis. Calling them explicitly may render the E values fed to the profile functions inconsistent.
|
|
|
|
|
|
Functions that have the length of extrusion (i.e., the E-axis) as a parameter (e.g., `prime`, `retract`, `move_e`, `move_xyze`), are called with `e` as an absolute value (i.e., not delta) of the extrusion length. The return value of the function (if applicable) is also the absolute value of the extrusion length.
|
|
|
| ------ | ------ |
|
|
|
| ```header()``` | called to create the header of the G-Code file |
|
|
|
| ```footer()``` | called to create footer of the G-code file |
|
|
|
| ```comment(c)``` | called when outputting a comment ```c``` |
|
|
|
| ```layer_start(z)``` | called at the start of a layer at height ```z``` |
|
|
|
| ```layer_stop()``` | called at the end of a layer |
|
|
|
| ```extruder_start()``` | called before extruding |
|
|
|
| ```extruder_stop()``` | called after extruding |
|
|
|
| ```select_extruder(ext)``` | called when selecting the extruder ```ext``` |
|
|
|
| ```swap_extruder(ext1,ext2,x,y,z)``` | called when swapping extruder ```ext1``` to ```ext2``` at position ```x,y,z``` |
|
|
|
| ```prime(ext,e)``` | called when priming from value ```e``` with extruder ```ext```. This function must return the value of the E-axis after priming |
|
|
|
| ```retract(ext,e)``` | called when retracting from value ```e``` with extruder ```ext```. This function must return the value of the-E axis after retracting |
|
|
|
| ```move_e(e)``` | called when moving the E-axis to value ```e``` with the current extruder |
|
|
|
| ```move_xyz(x,y,z)``` | called when traveling to ```x,y,z``` |
|
|
|
| ```move_xyze(x,y,z,e)``` | called when traveling to ```x,y,z``` while extruding to value ```e``` |
|
|
|
| ```progress(percent)``` | called on each step of producing the GCode; ```percent``` is the total progress of the print |
|
|
|
| ```set_feedrate(rate)``` | called when setting the feed-rate of the printer to ```rate``` |
|
|
|
| ```set_fan_speed(speed)``` | called when setting the part cooling fan velocity to ```speed``` |
|
|
|
| ```set_extruder_temperature(ext,temp)``` | called when setting the extruder ```ext``` temperature to ```temp``` |
|
|
|
| ```wait(sec,x,y,z)``` | called when the parameter ```enable_min_layer_time``` is set to true and the printing time for the layer is less than ```min_layer_time_sec```. ```sec``` is the remaining time to achieve ```min_layer_time_sec``` and ```x,y,z``` is where IceSL expects the head to be after the wait |
|
|
|
| ```set_and_wait_extruder_temperature(ext,temp)``` | called when setting the extruder ```ext``` temperature to ```temp``` while waiting. Called when using multiple extruders |
|
|
|
| ```set_mixing_ratios(ratios)``` | called when setting the mixing ratios of each filament feeding onto the mixing extruder; ```ratios``` is a table containing the ratio for each filament. This function is only called when using color mixing |
|
|
|
|
|
|
Functions returning a value (i.e., ```prime``` and ```retract```) are expected to be **called by IceSL only** <sup>5</sup>. This is due to the fact that IceSL uses the returned value to internally keep track of the E-axis. Calling them explicitly may render the E values fed to the profile functions inconsistent.
|
|
|
|
|
|
Functions that have the length of extrusion (i.e., the E-axis) as a parameter (e.g., ```prime```, ```retract```, ```move_e```, ```move_xyze```), are called with ```e``` as an absolute value (i.e., not delta) of the extrusion length. The return value of the function (if applicable) is also the absolute value of the extrusion length.
|
|
|
|
|
|
<sup>4. Though all printer profiles packaged in IceSL produce G-Code, this approach is sufficiently general to allow production of other machine languages, and by extension, to other manufacturing machines.</sup>
|
|
|
|
... | ... | @@ -179,19 +179,19 @@ When implementing the above lua functions, the user can access all printing sett |
|
|
Additionally, IceSL provides other useful variables that are also accessible. We detail them next:
|
|
|
|
|
|
| Variable | Type | Description |
|
|
|
|----------|------|-------------|
|
|
|
| `number_of_extruders` | integer | number of extruders used in the print |
|
|
|
| `extruders` | table of integers | extruder id's used in the print |
|
|
|
| `filament_diameter_mm` | table of floats | filament diameter for each extruder |
|
|
|
| `filament_priming_mm` | table of floats | filament priming for each extruder |
|
|
|
| `number_of_layers` | integer | total layers of print |
|
|
|
| `layer_id` | integer | current layer |
|
|
|
| `layer_spiralized` | boolean | whether current layer is spiralized |
|
|
|
| `filament_tot_length_mm` | table of floats | filament consumed for each extruder. Available only at the end of the print |
|
|
|
| `time_sec` | integer | current (estimated) printing time in seconds |
|
|
|
| `layer_start_time` | float | elapsed (estimated) time in seconds since start of print. Available in \`layer_start' function |
|
|
|
| `layer_stop_time` | float | elapsed (estimated) time in seconds since start of print. Available in 'layer_stop' function |
|
|
|
| `layer_time` | float | elapsed (estimated) time in seconds since start of layer. Available in 'layer_stop' function |
|
|
|
| ------ | ------ | ------ |
|
|
|
| ```number_of_extruders``` | integer | number of extruders used in the print |
|
|
|
| ```extruders``` | table of integers | extruder ids used in the print |
|
|
|
| ```filament_diameter_mm``` | table of floats | filament diameter for each extruder |
|
|
|
| ```filament_priming_mm``` | table of floats | filament priming for each extruder |
|
|
|
| ```number_of_layers``` | integer | total layers of print |
|
|
|
| ```layer_id``` | integer | current layer |
|
|
|
| ```layer_spiralized``` | boolean | whether current layer is spiralized |
|
|
|
| ```filament_tot_length_mm``` | table of floats | filament consumed for each extruder. Available only at the end of the print |
|
|
|
| ```time_sec``` | integer | current (estimated) printing time in seconds |
|
|
|
| ```layer_start_time``` | float| elapsed (estimated) time in seconds since start of print. Available in `layer_start' function |
|
|
|
| ```layer_stop_time``` | float| elapsed (estimated) time in seconds since start of print. Available in 'layer_stop' function |
|
|
|
| ```layer_time``` | float| elapsed (estimated) time in seconds since start of layer. Available in 'layer_stop' function |
|
|
|
|
|
|
Variables that specify the printing geometry also exist:
|
|
|
|
... | ... | @@ -209,23 +209,22 @@ Variables that specify the printing geometry also exist: |
|
|
IceSL can also discriminate the type of path being processed and its properties. For this purpose, use the following variables:
|
|
|
|
|
|
| Variable | Type | Description |
|
|
|
|----------|------|-------------|
|
|
|
| `path_is_perimeter` | Boolean | current path is a perimeter |
|
|
|
| `path_is_outer_perimeter` | Boolean | current path is an outer perimeter |
|
|
|
| `path_is_shell` | Boolean | current path is a shell |
|
|
|
| `path_is_infill` | Boolean | current path is an infill |
|
|
|
| `path_is_brim` | Boolean | current path is a brim |
|
|
|
| `path_is_raft` | Boolean | current path is a raft |
|
|
|
| `path_is_shield` | Boolean | current path is a shield |
|
|
|
| `path_is_tower` | Boolean | current path is a tower |
|
|
|
| `path_is_support` | Boolean | current path is a support |
|
|
|
| `path_is_bridge` | Boolean | current path is a bridge |
|
|
|
| `path_is_travel` | Boolean | current path is traveling |
|
|
|
| `path_is_cover` | Boolean | current path is a cover |
|
|
|
| `path_is_gapfill` | Boolean | current path is a gapfill |
|
|
|
| `path_length` | float | current path length |
|
|
|
| `path_flow_multiplier` | float | current path flow multiplier |
|
|
|
| `path_speed_multiplier` | float | current path speed multiplier |
|
|
|
| ------ | ------ | ------ |
|
|
|
| ```path_is_perimeter``` | Boolean | current path is a perimeter |
|
|
|
| ```path_is_outer_perimeter``` | Boolean | current path is an outer perimeter |
|
|
|
| ```path_is_shell``` | Boolean | current path is a shell |
|
|
|
| ```path_is_infill``` | Boolean | current path is an infill |
|
|
|
| ```path_is_brim``` | Boolean | current path is a brim |
|
|
|
| ```path_is_raft``` | Boolean | current path is a raft |
|
|
|
| ```path_is_shield``` | Boolean | current path is a shield |
|
|
|
| ```path_is_tower``` | Boolean | current path is a tower |
|
|
|
| ```path_is_support``` | Boolean | current path is a support |
|
|
|
| ```path_is_bridge``` | Boolean | current path is a bridge |
|
|
|
| ```path_is_travel``` | Boolean | current path is traveling |
|
|
|
| ```path_is_cover``` | Boolean | current path is a cover |
|
|
|
| ```path_length``` | float | current path length |
|
|
|
| ```path_flow_multiplier``` | float | current path flow multiplier |
|
|
|
| ```path_speed_multiplier``` | float | current path speed multiplier |
|
|
|
|
|
|
Utility information is also available by means of variables:
|
|
|
|
... | ... | |