... | @@ -4,42 +4,40 @@ This is the official documentation of IceSL printer profiles. This page specifie |
... | @@ -4,42 +4,40 @@ This is the official documentation of IceSL printer profiles. This page specifie |
|
|
|
|
|
1. [Location & Creation](#location)
|
|
1. [Location & Creation](#location)
|
|
1. [Components](#components)
|
|
1. [Components](#components)
|
|
|
|
|
|
2. [features.lua](#features_lua)
|
|
2. [features.lua](#features_lua)
|
|
1. [Custom Settings](#custom)
|
|
1. [Custom Settings](#custom)
|
|
|
|
|
|
3. [printer.lua](#printer_lua)
|
|
3. [printer.lua](#printer_lua)
|
|
1. [Helper Functions](#helpers)
|
|
1. [Helper Functions](#helpers)
|
|
2. [State Variables](#variables)
|
|
2. [State Variables](#variables)
|
|
3. [Example](#example)
|
|
3. [Example](#example)
|
|
|
|
|
|
4. [Material and Profiles](#profiles)
|
|
4. [Material and Profiles](#profiles)
|
|
|
|
|
|
## Location & Creation <a name="location"></a>
|
|
## Location & Creation
|
|
|
|
|
|
Printer profiles are located inside IceSL's asset folder<sup>1,2</sup>; Click on *File* → *Open assets folder* and from here navigate to the subdirectory ```icesl-printers/fff```.
|
|
Printer profiles are located inside IceSL's asset folder<sup>1,2</sup>; Click on _File_ → _Open assets folder_ and from here navigate to the subdirectory `icesl-printers/fff`.
|
|
|
|
|
|
Each folder inside ```icesl-printers/fff``` is processed by IceSL as a single printer profile where its name corresponds to the folder's name. **The folder name cannot contain spaces**.
|
|
Each folder inside `icesl-printers/fff` is processed by IceSL as a single printer profile where its name corresponds to the folder's name. **The folder name cannot contain spaces**.
|
|
|
|
|
|
Printer profiles installed with IceSL are also kept in a [public GitHub repository](https://github.com/shapeforge/icesl-printers/). We welcome contributions from users.
|
|
Printer profiles installed with IceSL are also kept in a [public GitHub repository](https://github.com/shapeforge/icesl-printers/). We welcome contributions from users.
|
|
|
|
|
|
<sup>1. In Windows: ```%appdata%\IceSL\```</sup> <br>
|
|
<sup>1. In Windows: `%appdata%\\IceSL\\`</sup> \
|
|
<sup>2. In Linux: ```$HOME/.icesl/```</sup>
|
|
<sup>2. In Linux: `$HOME/.icesl/`</sup>
|
|
|
|
|
|
### Components <a name="components"></a>
|
|
### Components
|
|
|
|
|
|
A printer profile has the following components:
|
|
A printer profile has the following components:
|
|
|
|
|
|
* ```features.lua``` : Printer settings (e.g., *bed size*, *nozzle diameter*)
|
|
* `features.lua` : Printer settings (e.g., _bed size_, _nozzle diameter_)
|
|
* ```printer.lua``` : G-code production functions (e.g., *prime*, *extrude*, *header*)
|
|
* `printer.lua` : G-code production functions (e.g., _prime_, _extrude_, _header_)
|
|
* **Profiles** (optional) : Subsets of printing settings for specific situations (e.g., *high quality printing*, *fast printing*)
|
|
* **Profiles** (optional) : Subsets of printing settings for specific situations (e.g., _high quality printing_, _fast printing_)
|
|
* **Materials** (optional) : Subsets of printing settings for specific materials (e.g., *PLA*, *ABS*)
|
|
* **Materials** (optional) : Subsets of printing settings for specific materials (e.g., _PLA_, _ABS_)
|
|
|
|
|
|
## ```features.lua``` <a name="features_lua"></a>
|
|
## `features.lua`
|
|
|
|
|
|
This file specifies values for printing settings that are considered (by the profile maker) important to the printer hardware. In practice, any setting where its value is a *boolean*, an *integer*, or a *float* can be set in here.
|
|
This file specifies values for printing settings that are considered (by the profile maker) important to the printer hardware. In practice, any setting where its value is a _boolean_, an _integer_, or a _float_ can be set in here.
|
|
|
|
|
|
Example:
|
|
Example:
|
|
|
|
|
|
```lua
|
|
```lua
|
|
bed_size_x_mm = 235
|
|
bed_size_x_mm = 235
|
|
bed_size_y_mm = 225
|
|
bed_size_y_mm = 225
|
... | @@ -48,9 +46,9 @@ bed_size_z_mm = 205 |
... | @@ -48,9 +46,9 @@ bed_size_z_mm = 205 |
|
nozzle_diameter_mm = 0.4
|
|
nozzle_diameter_mm = 0.4
|
|
```
|
|
```
|
|
|
|
|
|
Some settings are tied to an extruder or a [brush](https://gitlab.inria.fr/mfx/icesl-documentation/wikis/Scripting-language#drawing-and-scale-), e.g.; ```filament_diameter_mm_0``` is the diameter of the filament loaded on extruder 0, ```infill_extruder_1``` specifies the extruder to use when printing geometry emitted on brush 1.
|
|
Some settings are tied to an extruder or a [brush](https://gitlab.inria.fr/mfx/icesl-documentation/wikis/Scripting-language#drawing-and-scale-), e.g.; `filament_diameter_mm_0` is the diameter of the filament loaded on extruder 0, `infill_extruder_1` specifies the extruder to use when printing geometry emitted on brush 1.
|
|
|
|
|
|
IceSL supports a maximum number of extruders (i.e., ```max_number_extruders```) and a maximum number of brushes (i.e., ```max_number_brushes```).
|
|
IceSL supports a maximum number of extruders (i.e., `max_number_extruders`) and a maximum number of brushes (i.e., `max_number_brushes`).
|
|
|
|
|
|
Example:
|
|
Example:
|
|
|
|
|
... | @@ -75,183 +73,185 @@ for i=0,max_number_brushes,1 do |
... | @@ -75,183 +73,185 @@ for i=0,max_number_brushes,1 do |
|
end
|
|
end
|
|
```
|
|
```
|
|
|
|
|
|
Individual per-brush or per-extruder values (e.g., ```print_perimeter_2 = true```) take precedence over common values (e.g., ```print_perimeter = false```).
|
|
Individual per-brush or per-extruder values (e.g., `print_perimeter_2 = true`) take precedence over common values (e.g., `print_perimeter = false`).
|
|
|
|
|
|
Additionally, settings can be *internal* or not. Non internal settings can also be set through the UI (use the search bar for a quicker set). An exhaustive list of non internal printing settings is in the following link:
|
|
Additionally, settings can be _internal_ or not. Non internal settings can also be set through the UI (use the search bar for a quicker set). An exhaustive list of non internal printing settings is in the following link:
|
|
|
|
|
|
[Printing settings](https://icesl.loria.fr/parameters/)
|
|
[Printing settings](https://icesl.loria.fr/parameters/)
|
|
|
|
|
|
Some settings might be hidden in the UI depending on certain conditions (e.g., ```brim_distance_to_print_mm``` will be hidden if ```add_brim``` is false). As mentioned before, there also exist internal settings that can also be set in ```features.lua``` but not through the UI. We list them here:
|
|
Some settings might be hidden in the UI depending on certain conditions (e.g., `brim_distance_to_print_mm` will be hidden if `add_brim` is false). As mentioned before, there also exist internal settings that can also be set in `features.lua` but not through the UI. We list them here:
|
|
|
|
|
|
| Internal name | Type | Description |
|
|
| Internal name | Type | Description |
|
|
| ------ | ------ | ------ |
|
|
|---------------|------|-------------|
|
|
| ```xy_mm_per_int``` | _integer_ | Polygonal integer grid scale (mm/int) |
|
|
| `xy_mm_per_int` | _integer_ | Polygonal integer grid scale (mm/int) |
|
|
| ```extruder_count``` | _integer_ | Number of extruders installed on the printer |
|
|
| `extruder_count` | _integer_ | Number of extruders installed on the printer |
|
|
| ```extruder_mix_count_[e]``` | _integer_ | Number of mixed filaments on extruder ```e``` |
|
|
| `extruder_mix_count\_\[e\]` | _integer_ | Number of mixed filaments on extruder `e` |
|
|
| ```priming_mm_per_sec``` | _float_ | Speed for prime (mm/sec) |
|
|
| `priming_mm_per_sec` | _float_ | Speed for prime (mm/sec) |
|
|
| ```retract_mm_per_sec``` | _float_ | Speed for retract (mm/sec) |
|
|
| `retract_mm_per_sec` | _float_ | Speed for retract (mm/sec) |
|
|
| ```retract_perimeter_safety_distance_mm``` | _float_ | Retract distance on perimeter end (mm) |
|
|
| `retract_perimeter_safety_distance_mm` | _float_ | Retract distance on perimeter end (mm) |
|
|
| ```tower_at_location``` | _bool_ | Use custom-defined tower location |
|
|
| `tower_at_location` | _bool_ | Use custom-defined tower location |
|
|
| ```tower_location_x_mm``` | _float_ | Set tower X (mm) location w.r.t. the printing bed's closest left corner [front-facing] |
|
|
| `tower_location_x_mm` | _float_ | Set tower X (mm) location w.r.t. the printing bed's closest left corner \[front-facing\] |
|
|
| ```tower_location_y_mm``` | _float_ | Set tower Y (mm) location w.r.t. the printing bed's closest left corner [front-facing] |
|
|
| `tower_location_y_mm` | _float_ | Set tower Y (mm) location w.r.t. the printing bed's closest left corner \[front-facing\] |
|
|
| ```bed_part_offset_x_mm``` | _float_ | Set bed offset (mm) w.r.t. the geometry's center on the X axis |
|
|
| `bed_circular` | _bool_ | Enable circular bed |
|
|
| ```bed_part_offset_y_mm``` | _float_ | Set bed offset (mm) w.r.t. the geometry's center on the Y axis |
|
|
| `bed_part_offset_x_mm` | _float_ | Set bed offset (mm) w.r.t. the geometry's center on the X axis |
|
|
| ```cycle_gap_mm``` | _float_ | space (mm) gap at the end of a path whenever it closes onto itself<sup>3</sup> |
|
|
| `bed_part_offset_y_mm` | _float_ | Set bed offset (mm) w.r.t. the geometry's center on the Y axis |
|
|
| ```enable_zigzag_cover_strict_ordering_[b]``` | _bool_ | Enable strict ordering for cover zigzag infill on brush ```b``` |
|
|
| `cycle_gap_mm` | _float_ | space (mm) gap at the end of a path whenever it closes onto itself<sup>3</sup> |
|
|
| ```zigzag_cover_strict_ordering_angle_[b]``` | _float_ | Angle for strict ordering of cover zigzag infill on brush ```b``` |
|
|
| `enable_zigzag_cover_strict_ordering\_\[b\]` | _bool_ | Enable strict ordering for cover zigzag infill on brush `b` |
|
|
| ```preserve_zigzag_strict_ordering_[b]``` | _bool_ | Preserve zigzag ordering for dense surfaces on brush ```b``` |
|
|
| `zigzag_cover_strict_ordering_angle\_\[b\]` | _float_ | Angle for strict ordering of cover zigzag infill on brush `b` |
|
|
| ```cover_flow_multiplier_``` | _float_ | Cover flow multiplier for brush ```b``` |
|
|
| `preserve_zigzag_strict_ordering\_\[b\]` | _bool_ | Preserve zigzag ordering for dense surfaces on brush `b` |
|
|
| ```mixing_wipe_length_mm``` | _float_ | Wipe length when printing with multiple materials |
|
|
| `cover_flow_multiplier\_` | _float_ | Cover flow multiplier for brush `b` |
|
|
|
|
| `mixing_wipe_length_mm` | _float_ | Wipe length when printing with multiple materials |
|
|
|
|
|
|
<sup>3. If set to 0 you are likely to obtain a small blob because the tail of the path overlaps the head. Set it too large and you will obtain a gap. If left unset the setting will default to a reasonable built-in value (auto computed from the nozzle diameter).</sup>
|
|
<sup>3. If set to 0 you are likely to obtain a small blob because the tail of the path overlaps the head. Set it too large and you will obtain a gap. If left unset the setting will default to a reasonable built-in value (auto computed from the nozzle diameter).</sup>
|
|
|
|
|
|
### Custom settings <a name="custom"></a>
|
|
### Custom settings
|
|
|
|
|
|
It is possible for user-defined printing settings to be shown and modified through the UI. Currently there is support for two types of settings; **booleans** and **floats**. The following two definitions can be used in file ```features.lua``` of a printer profile:
|
|
It is possible for user-defined printing settings to be shown and modified through the UI. Currently there is support for two types of settings; **booleans** and **floats**. The following two definitions can be used in file `features.lua` of a printer profile:
|
|
|
|
|
|
```add_checkbox_setting(internal_name, description, tooltip, default)```
|
|
`add_checkbox_setting(internal_name, description, tooltip, default)`
|
|
|
|
|
|
```add_setting(internal_name, description, minVal, maxVal, tooltip, default)```
|
|
`add_setting(internal_name, description, minVal, maxVal, tooltip, default)`
|
|
|
|
|
|
These add setting ```internal_name``` with ```description```, minimum value ```minValue``` and maximum value ```maxValue```. If non is provided, default value is ```false``` for ```add_checkbox_setting``` and ```minValue``` for ```add_setting```:
|
|
These add setting `internal_name` with `description`, minimum value `minValue` and maximum value `maxValue`. If non is provided, default value is `false` for `add_checkbox_setting` and `minValue` for `add_setting`:
|
|
* ```internal_name``` : internal name for setting
|
|
|
|
* ```description``` : description of setting (shown in UI)
|
|
|
|
* ```minValue``` : minimal value in case of a number setting (i.e., ```add_setting```)
|
|
|
|
* ```maxValue``` : maximum value in case of a number setting (i.e., ```add_setting```)
|
|
|
|
* ```tooltip``` : tooltip help to show in IceSL's UI. This parameter is _optional_.
|
|
|
|
* ```default``` : default value. This parameter is _optional_.
|
|
|
|
|
|
|
|
The setting's value can then be queried in file ```printer.lua``` of the printer profile by using the setting's ```internal_name```.
|
|
* `internal_name` : internal name for setting
|
|
|
|
* `description` : description of setting (shown in UI)
|
|
|
|
* `minValue` : minimal value in case of a number setting (i.e., `add_setting`)
|
|
|
|
* `maxValue` : maximum value in case of a number setting (i.e., `add_setting`)
|
|
|
|
* `tooltip` : tooltip help to show in IceSL's UI. This parameter is _optional_.
|
|
|
|
* `default` : default value. This parameter is _optional_.
|
|
|
|
|
|
## ```printer.lua``` <a name="printer_lua"></a>
|
|
The setting's value can then be queried in file `printer.lua` of the printer profile by using the setting's `internal_name`.
|
|
|
|
|
|
|
|
## `printer.lua`
|
|
|
|
|
|
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:
|
|
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 to create the header of the G-Code file |
|
|
| `header()` | called to create the header of the G-Code file |
|
|
| ```footer()``` | called to create footer of the G-code file |
|
|
| `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 |
|
|
| ```extruder_start()``` | called before extruding |
|
|
| `extruder_start()` | called before extruding |
|
|
| ```extruder_stop()``` | called after 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``` |
|
|
| `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``` |
|
|
| `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 |
|
|
| `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 |
|
|
| `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_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_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``` |
|
|
| `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 |
|
|
| `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_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_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``` |
|
|
| `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 |
|
|
| `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_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 |
|
|
| `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 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.
|
|
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>
|
|
<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>
|
|
|
|
|
|
<sup>5. This restriction will be recalled in the future. Keeping track of the E-axis will be handled by the profile.</sup>
|
|
<sup>5. This restriction will be recalled in the future. Keeping track of the E-axis will be handled by the profile.</sup>
|
|
|
|
|
|
### Helper functions <a name="helpers"></a>
|
|
### Helper functions
|
|
|
|
|
|
IceSL provides a number of lua helper functions to facilitate the writing to GCode. These function can be used in ```printer.lua```. The following is a list detailing these functions:
|
|
IceSL provides a number of lua helper functions to facilitate the writing to GCode. These function can be used in `printer.lua`. The following is a list detailing these functions:
|
|
|
|
|
|
| Function | Description |
|
|
| Function | Description |
|
|
| ------ | ------ |
|
|
|----------|-------------|
|
|
| ```output(string)``` | writes ```string``` to the resulting G-code file |
|
|
| `output(string)` | writes `string` to the resulting G-code file |
|
|
| ```file(filename)``` | returns the contents of file ```filename``` as a string |
|
|
| `file(filename)` | returns the contents of file `filename` as a string |
|
|
| ```error(string)``` | outputs error ```string``` to the console (only available in IceSL-Slicer) |
|
|
| `error(string)` | outputs error `string` to the console (only available in IceSL-Slicer) |
|
|
| ```f(number)``` | converts ```number``` to string with precision of three (3) decimals |
|
|
| `f(number)` | converts `number` to string with precision of three (3) decimals |
|
|
| ```ff(number)``` | converts ```number``` to string with precision of six (6) decimals. It is recommended to use this function when outputting the quantity to extrude |
|
|
| `ff(number)` | converts `number` to string with precision of six (6) decimals. It is recommended to use this function when outputting the quantity to extrude |
|
|
| ```fff(number)``` | converts ```number``` to string with precision of nine (9) decimals |
|
|
| `fff(number)` | converts `number` to string with precision of nine (9) decimals |
|
|
|
|
|
|
### State variables <a name="variables"></a>
|
|
### State variables
|
|
|
|
|
|
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.
|
|
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:
|
|
|
|
|
|
| Variable | Type | Description |
|
|
| Variable | Type | Description |
|
|
| ------ | ------ | ------ |
|
|
|----------|------|-------------|
|
|
| ```number_of_extruders``` | integer | number of extruders used in the print |
|
|
| `number_of_extruders` | integer | number of extruders used in the print |
|
|
| ```extruders``` | table of integers | extruder id's 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_diameter_mm` | table of floats | filament diameter for each extruder |
|
|
| ```filament_priming_mm``` | table of floats | filament priming for each extruder |
|
|
| `filament_priming_mm` | table of floats | filament priming for each extruder |
|
|
| ```number_of_layers``` | integer | total layers of print |
|
|
| `number_of_layers` | integer | total layers of print |
|
|
| ```layer_id``` | integer | current layer |
|
|
| `layer_id` | integer | current layer |
|
|
| ```layer_spiralized``` | boolean | whether current layer is spiralized |
|
|
| `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 |
|
|
| `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 |
|
|
| `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_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_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 |
|
|
| `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:
|
|
Variables that specify the printing geometry also exist:
|
|
|
|
|
|
| Variable | Type | Description |
|
|
| Variable | Type | Description |
|
|
| ------ | ------ | ------ |
|
|
|----------|------|-------------|
|
|
| ```min_corner_x``` | float | lower-left corner of geometry to be printer (X coordinate) |
|
|
| `min_corner_x` | float | lower-left corner of geometry to be printer (X coordinate) |
|
|
| ```min_corner_y``` | float | lower-left corner of geometry to be printer (Y coordinate) |
|
|
| `min_corner_y` | float | lower-left corner of geometry to be printer (Y coordinate) |
|
|
| ```extent_x``` | float | size of geometry to be printer (X coordinate) |
|
|
| `extent_x` | float | size of geometry to be printer (X coordinate) |
|
|
| ```extent_y``` | float | size of geometry to be printer (Y coordinate) |
|
|
| `extent_y` | float | size of geometry to be printer (Y coordinate) |
|
|
| ```extent_z``` | float | size of geometry to be printer (Z coordinate) |
|
|
| `extent_z` | float | size of geometry to be printer (Z coordinate) |
|
|
| ```gcode_to_model_x``` | float | distance transformation from G-code view to geometry view (X coordinate) |
|
|
| `gcode_to_model_x` | float | distance transformation from G-code view to geometry view (X coordinate) |
|
|
| ```gcode_to_model_y``` | float | distance transformation from G-code view to geometry view (Y coordinate) |
|
|
| `gcode_to_model_y` | float | distance transformation from G-code view to geometry view (Y coordinate) |
|
|
| ```gcode_to_model_z``` | float | distance transformation from G-code view to geometry view (Z coordinate) |
|
|
| `gcode_to_model_z` | float | distance transformation from G-code view to geometry view (Z coordinate) |
|
|
|
|
|
|
IceSL can also discriminate the type of path being processed and its properties. For this purpose, use the following variables:
|
|
IceSL can also discriminate the type of path being processed and its properties. For this purpose, use the following variables:
|
|
|
|
|
|
| Variable | Type | Description |
|
|
| Variable | Type | Description |
|
|
| ------ | ------ | ------ |
|
|
|----------|------|-------------|
|
|
| ```path_is_perimeter``` | Boolean | current path is a perimeter |
|
|
| `path_is_perimeter` | Boolean | current path is a perimeter |
|
|
| ```path_is_outer_perimeter``` | Boolean | current path is an outer perimeter |
|
|
| `path_is_outer_perimeter` | Boolean | current path is an outer perimeter |
|
|
| ```path_is_shell``` | Boolean | current path is a shell |
|
|
| `path_is_shell` | Boolean | current path is a shell |
|
|
| ```path_is_infill``` | Boolean | current path is an infill |
|
|
| `path_is_infill` | Boolean | current path is an infill |
|
|
| ```path_is_brim``` | Boolean | current path is a brim |
|
|
| `path_is_brim` | Boolean | current path is a brim |
|
|
| ```path_is_raft``` | Boolean | current path is a raft |
|
|
| `path_is_raft` | Boolean | current path is a raft |
|
|
| ```path_is_shield``` | Boolean | current path is a shield |
|
|
| `path_is_shield` | Boolean | current path is a shield |
|
|
| ```path_is_tower``` | Boolean | current path is a tower |
|
|
| `path_is_tower` | Boolean | current path is a tower |
|
|
| ```path_is_support``` | Boolean | current path is a support |
|
|
| `path_is_support` | Boolean | current path is a support |
|
|
| ```path_is_bridge``` | Boolean | current path is a bridge |
|
|
| `path_is_bridge` | Boolean | current path is a bridge |
|
|
| ```path_is_travel``` | Boolean | current path is traveling |
|
|
| `path_is_travel` | Boolean | current path is traveling |
|
|
| ```path_is_cover``` | Boolean | current path is a cover |
|
|
| `path_is_cover` | Boolean | current path is a cover |
|
|
| ```path_is_gapfill``` | Boolean | current path is a gapfill |
|
|
| `path_is_gapfill` | Boolean | current path is a gapfill |
|
|
| ```path_length``` | float | current path length |
|
|
| `path_length` | float | current path length |
|
|
| ```path_flow_multiplier``` | float | current path flow multiplier |
|
|
| `path_flow_multiplier` | float | current path flow multiplier |
|
|
| ```path_speed_multiplier``` | float | current path speed multiplier |
|
|
| `path_speed_multiplier` | float | current path speed multiplier |
|
|
|
|
|
|
Utility information is also available by means of variables:
|
|
Utility information is also available by means of variables:
|
|
|
|
|
|
| Variable | Type | Description |
|
|
| Variable | Type | Description |
|
|
| ------ | ------ | ------ |
|
|
|----------|------|-------------|
|
|
| ```printer_name``` | string | printer name |
|
|
| `printer_name` | string | printer name |
|
|
| ```filename``` | string | G-code output file name |
|
|
| `filename` | string | G-code output file name |
|
|
| ```Path``` | string | path to ```printer.lua``` |
|
|
| `Path` | string | path to `printer.lua` |
|
|
| ```slicer_name``` | string | name of slicer used (i.e., 'IceSL') |
|
|
| `slicer_name` | string | name of slicer used (i.e., 'IceSL') |
|
|
| ```slicer_version``` | string | slicer version used |
|
|
| `slicer_version` | string | slicer version used |
|
|
| ```slicer_build_date``` | string | build date of slicer used |
|
|
| `slicer_build_date` | string | build date of slicer used |
|
|
|
|
|
|
Path and vertex attributes are updated each new path and each new vertex respectively. These attributes' values are always numbers and are available on the following variables<sup>6</sup>:
|
|
Path and vertex attributes are updated each new path and each new vertex respectively. These attributes' values are always numbers and are available on the following variables<sup>6</sup>:
|
|
|
|
|
|
| Variable | Type | Description |
|
|
| Variable | Type | Description |
|
|
| ------ | ------ | ------ |
|
|
|----------|------|-------------|
|
|
| ```path_attributes``` | array | Per-path attributes (updated each new path) |
|
|
| `path_attributes` | array | Per-path attributes (updated each new path) |
|
|
| ```vertex_attributes``` | array | Per-vertex attributes (updated each call to ```move_xyz``` or ```move_xyze```) |
|
|
| `vertex_attributes` | array | Per-vertex attributes (updated each call to `move_xyz` or `move_xyze`) |
|
|
|
|
|
|
The following path and/or vertex attributes are currently used by IceSL:
|
|
The following path and/or vertex attributes are currently used by IceSL:
|
|
|
|
|
|
| Variable | Type | Description |
|
|
| Variable | Type | Description |
|
|
| ------ | ------ | ------ |
|
|
|----------|------|-------------|
|
|
| ```flow_multiplier``` | Per-path, per-vertex | Flow multiplier |
|
|
| `flow_multiplier` | Per-path, per-vertex | Flow multiplier |
|
|
| ```zoffset``` | Per-vertex | Position offset on the Z axis |
|
|
| `zoffset` | Per-vertex | Position offset on the Z axis |
|
|
| ```speed_multiplier``` | Per-path | Speed multiplier |
|
|
| `speed_multiplier` | Per-path | Speed multiplier |
|
|
|
|
|
|
<sup>6. Attributes set by plugins are also available here.</sup>
|
|
<sup>6. Attributes set by plugins are also available here.</sup>
|
|
|
|
|
... | @@ -263,7 +263,7 @@ if path_attributes['flow_multiplier'] > 1 then |
... | @@ -263,7 +263,7 @@ if path_attributes['flow_multiplier'] > 1 then |
|
end
|
|
end
|
|
```
|
|
```
|
|
|
|
|
|
### Example <a name="example"></a>
|
|
### Example
|
|
|
|
|
|
As an example to tie all the concepts explained above we show the prime function of a printer profile:
|
|
As an example to tie all the concepts explained above we show the prime function of a printer profile:
|
|
|
|
|
... | @@ -276,13 +276,14 @@ function prime(extruder,e) |
... | @@ -276,13 +276,14 @@ function prime(extruder,e) |
|
end
|
|
end
|
|
```
|
|
```
|
|
|
|
|
|
## Material and Profiles <a name="profiles"></a>
|
|
## Material and Profiles
|
|
|
|
|
|
|
|
These are specialized printing settings (similar to `features.lua`) for specific situations or materials. They are located in either `profiles` or `materials` subdirectories inside the printer profile folder.
|
|
|
|
|
|
These are specialized printing settings (similar to ```features.lua```) for specific situations or materials. They are located in either ```profiles``` or ```materials``` subdirectories inside the printer profile folder.
|
|
They do not possess a naming convention but they do have to keep a `.lua` extension.
|
|
|
|
|
|
They do not possess a naming convention but they do have to keep a ```.lua``` extension.
|
|
Material example (`materials/abs.lua`)
|
|
|
|
|
|
Material example (```materials/abs.lua```)
|
|
|
|
```lua
|
|
```lua
|
|
name_en = "ABS"
|
|
name_en = "ABS"
|
|
|
|
|
... | @@ -293,9 +294,10 @@ filament_priming_mm_0 = 1.0 |
... | @@ -293,9 +294,10 @@ filament_priming_mm_0 = 1.0 |
|
bed_temp_degree_c = 110
|
|
bed_temp_degree_c = 110
|
|
```
|
|
```
|
|
|
|
|
|
The variable ```name_en``` is mandatory for UI purposes. ```name_es```, ```name_fr``` and ```name_ch``` are optional.
|
|
The variable `name_en` is mandatory for UI purposes. `name_es`, `name_fr` and `name_ch` are optional.
|
|
|
|
|
|
|
|
Profile example (`profiles/low.lua`)
|
|
|
|
|
|
Profile example (```profiles/low.lua```)
|
|
|
|
```lua
|
|
```lua
|
|
name_en = "Fast print"
|
|
name_en = "Fast print"
|
|
|
|
|
... | | ... | |