|
| 1 | + |
| 2 | +# How to create a vendor profile |
| 3 | + |
| 4 | +The vendor profiles allow to easily creates many different profiles from a common base, via an inheritance graph. It's all contained in a single ini file. |
| 5 | + |
| 6 | + |
| 7 | +## ini format |
| 8 | +As the file in in ini format, each section is in the format: |
| 9 | +``` |
| 10 | +[section_id:section_value] |
| 11 | +setting_name1 = setting_value1 |
| 12 | +setting_name2 = setting_value2 |
| 13 | +``` |
| 14 | +each setting in a section need to be unique. |
| 15 | + |
| 16 | +## Sections |
| 17 | +Here are the different sections of the vendor profile ini file. Each are explained in more detail afterwards |
| 18 | +* `[vendor]`: the first section, containing information about the vendor, to be displayed in the wizard, and to help with (auto-)updates. |
| 19 | +* `[printer_model]`: allow to group printer Presets into a common section, with its thumbnail for the wizard. it's the entry point to install vendor presets. When installed, the slicer will remember each {vendor-printer_model-variant} key is installed. |
| 20 | +* `[printer]`: printer preset with its extruder(s) |
| 21 | +* `[filament]`: fff filament preset |
| 22 | +* `[print]`: fff print preset |
| 23 | +* `[sla_material]`: sla resin preset |
| 24 | +* `[sla_print]`: sla print preset |
| 25 | + |
| 26 | +For the printer, filament and print section, there is two kinds of name: |
| 27 | +1) `[print:my_print_preset_key]`: this is a preset that is useable in the slicer, it can be selected in the combo box in the interface. |
| 28 | +2) `[print:*0.2mmheight_print*]`: this is a preset that isn't visible in the slicer, it's only used as a library of settings to be applied at the end to the first kind |
| 29 | + |
| 30 | +The printer, filament and print section can inherit another one (of the same type) via the `inherit` setting. It can takes a single value or an array, separated by `;`. Example: |
| 31 | +``` |
| 32 | +[print:*common_print*] |
| 33 | +perimeters = 3 |
| 34 | +... |
| 35 | +
|
| 36 | +[print:*one_per_top*] |
| 37 | +only_one_perimeter_top = 1 |
| 38 | +
|
| 39 | +[print:final_print_preset] |
| 40 | +inherit = *common_print*; *one_per_top* |
| 41 | +fill_density = 15% |
| 42 | +``` |
| 43 | +## `[vendor]`Section |
| 44 | +This section doesn't have any section value, it's just `[vendor]` |
| 45 | +The settings are: |
| 46 | +* `id`: the string id of the vendor file. |
| 47 | +* `technologies` = The printer technologies available in this files. Can be `FFF`, `SLA` or `FFF;SLA` if this file has both. |
| 48 | +* `name`: the displayed string in the wizard. If `{technology}` is present inside, it will be replaced by the technology string (FFF or SLA). |
| 49 | +* `full_name`: a displayed string in the wizard. can have `{technology}`. |
| 50 | +* `config_version`: the current version to see if this file is newer , the same or older than the one installed in the slicer. See below how it works. |
| 51 | +* `config_update_url`: the url to call to check for new versions. Left it empty if you don't have it. |
| 52 | +* `changelog_url`: the url for the changelog of this file. Can be left empty. |
| 53 | + |
| 54 | +### version |
| 55 | +The version has X.X.X.X+metadata-prerelease |
| 56 | +Example of valid versions: |
| 57 | +`2.7` |
| 58 | +`2.7.0` |
| 59 | +`2.7.61.12345` |
| 60 | +`2.7.1.1-alpha2` |
| 61 | +`2.7.1.1-beta1` |
| 62 | +`2.7.1.1+2024.01.23` |
| 63 | +`2.7.1.1+2024.01.23-susi` |
| 64 | +if the version is 'bigger', then it's more recent can replace an older version. |
| 65 | +How to check if one version is bigger/ more recent than the other? |
| 66 | +First we check the first number: `2.0` > `1.10` |
| 67 | +If equal, then we check the second number: `2.10` > `2.9` |
| 68 | +If equal, then we check the third number: `2.7.1234` > `2.7.0` |
| 69 | +If equal, then we check the third number: `2.7.0.1` > `2.7.0.0` |
| 70 | +If equal, then we check the prerelease string (alphanumeric order): `2.7.0.1-b1` > `2.7.0.1-a2`, or if it exists `2.7.0.1` > `2.7.0.1-b` |
| 71 | + |
| 72 | +note: the metadata part is ignored |
| 73 | +note: if the number of digit is different, then the comparison only look at the first ones`2.7.1` == `2.7`, `2.7` > `2.7.1-alpha` |
| 74 | + |
| 75 | +## `[printer_model]`Section |
| 76 | +The section has a value. It's a id to link the printer_model with printer profiles. Example: `[printer_model:Voron_v4_250]` |
| 77 | +The settings are: |
| 78 | +* `name`: Displayed name in the wizard for this printer model. |
| 79 | +* `variants`: array of string separated by ';' to link a printer preset to a variant. These strings are displayed in the wizard in this order, with the first being the 'default' for this printer model. Example: `0.4; 0.25; highflow 0.6; 0.4 with 5 filaments` |
| 80 | +* `technology`: FFF or SLA |
| 81 | +`family`: all printer_model with the same family string are placed on the same line. these families are in the same order as in this file. |
| 82 | +* `bed_model`: name of the stl file in your vendor directory that contains the bed geometry (example: `bed_model = bed-v4-250.stl`) |
| 83 | +* `bed_texture`: name of the png file in your vendor directory that contains the bed texture (example: `bed_texture= bed-v4-250.png`) |
| 84 | +* `bed_with_grid`: 0 or 1 if you want to have a grid displayed on top of the bed texture. |
| 85 | +* `thumbnail`: name of the png file in your vendor directory that contains the thumbnail to display in the wizard (example: `thumbnail = Voron_v4_250_thumb.png`) |
| 86 | +* `default_materials`: array of filaments/materials name to install by default when installing at least one of this printer model. example: `default_materials = Basic ABS @VORON; Basic PLA @VORON;` |
| 87 | + |
| 88 | +## print/sla_print/printer/filament/sla_material |
| 89 | + |
| 90 | +The section value is used as an id to reference the printers preset for the inheritance graph. There are two kind of presets: the normal ones that can be displayed and used and the hidden ones that have a `*` as the first and last character and are only used as intermediate preset in the inheritance tree. |
| 91 | +Examples: `[printer:*common*]` `[printer:Printer project 42-id.2]` `[printer:my_printer_id]` |
| 92 | + |
| 93 | + |
| 94 | +### Slicer settings |
| 95 | +To define a setting in a print, filament or printer preset, you put its key (look at the tooltip in the slicer), then the value after an `=``. |
| 96 | +* Boolean type: put `0` for false and `1` for true. |
| 97 | +* Integer type: write the number |
| 98 | +* Float type: write it with a `.` as zero-separator (`42.1234`) |
| 99 | +* Percentage: like a Float with a `%` after (`42.1234%`) |
| 100 | +* String type: you can write it directly after the `=` (`start_gcode = #custom start\nprint_start EXTRUDER=200`). Some`\` will be interpreted: `\n` for new line, `\\` for a '\', `\n` for 'carriage return' ). You can also enclosed it into `"`: (`start_gcode = "#custom start\nprint_start EXTRUDER=200"`) |
| 101 | +* Enum type: you need to get the value key for the option you need. The easiest is to get it from a saved config (from the end of a gcode or a saved profile). Example: `fill_pattern = gyroid` |
| 102 | +* Point type: it's FloatxFloat (`thumbnails = 64x64`) |
| 103 | +* Graph type: it's a vector of value separated by `:`. the first three value are: begin_index, end_index, curve_type(0=SQUARE, 1=LINEAR, 2=SPLINE) and all the other values are the points of the graph. Example: `overhangs_dynamic_speed= 0:3:1:0x0:50x25:100x100` |
| 104 | + |
| 105 | +If the settings is an array, the values need to be separated by a `,`: `thumbnails = 64x64,400x300` |
| 106 | +If the setting is deactivated, put a `!` before: `first_layer_extrusion_width = !0.42` |
| 107 | +For an array, you can deactivate each value the same way: `idle_temperature = !30,!30` |
| 108 | + |
| 109 | +It's not possible to replace only one element of a vector, you need to set the full vector. |
| 110 | + |
| 111 | +### inheritance |
| 112 | + |
| 113 | +The `inherits` setting allow to start this preset with some settings already set. it's an array using `;` as separator. It's not mandatory. |
| 114 | +Examples: `inherits = *common*; *hot*` `inherits = my_printer_id; *slow*` |
| 115 | + |
| 116 | +The preset start with nothing defined. |
| 117 | +The first preset in `inherits` can set the values it defines. |
| 118 | +Same for the next ones in the `inherits` array, and it erase the current value if it's already defined. |
| 119 | +Then the settings defined in this Preset ca erase anything already defined by the `inherits`. |
| 120 | + |
| 121 | +Advice about inheritance: |
| 122 | +* If you define it, put it first after the section name, to increase its visibility. |
| 123 | +* There is two kind of presets: |
| 124 | + 1) The first kind defines every settings, by themselves or from an inherited preset. We call them 'full preset' |
| 125 | + 2) The second kind only defines a subset of the settings, and so don't inherit any 'full preset'. We call them 'flavour preset' |
| 126 | +* Any final preset (without `*` as first and last character in their id) need to be a 'full preset'. |
| 127 | +* Hidden presets (with `*` as first and last character in their id) can be 'full preset' or 'flavour preset'. |
| 128 | +* A final preset can inherit a final preset. |
| 129 | +* A 'full preset' should defines all settings or inherit another 'full preset'. Any setting that isn't defined in a final Preset won't be able to be reverted to 'system value' in the slicer. |
| 130 | +* If a 'full preset' inherit another 'full preset', it needs to be the first in the `inherits` array (anything before will be erased by it). |
| 131 | +* It's advised to use the word 'common' in any hidden 'full preset', to be sure you only put them as the first inheritance. It's easy to have a `*common*` root that defines everything and then specialised 'commons' like `*common_voron2*` that inherit another common. And of course avoid naming any 'flavour preset' as 'common'. |
| 132 | +## `[printer]` Section |
| 133 | +The printer section has some special setting: |
| 134 | +* `printer_model`: Any final Preset (without `*` as first and last character in their id) need to have this setting defined (by itself or by inheritance) to link it to a printer_model. The value of this setting need to be the same as the printer_model section value. Example: `printer_model = Voron_v4_250` |
| 135 | +* `printer_variant`: Any final Preset (without `*` as first and last character in their id) need to have this setting defined (by itself or by inheritance) to link it to a printer_model variant. The value of this setting need to be the same as one of the `variants` values of the linked printer_model. Examples: `printer_variant = 0.4` `printer_variant = highflow 0.6` |
| 136 | +* `default_print_profile`: the print section value that should be the default when you select this printer. |
| 137 | +* `default_filament_profile`: the filament section value that should be the default when you select this printer. |
| 138 | +* `default_sla_print_profile`: the print_sla section value that should be the default when you select this printer. |
| 139 | +* `default_sla_material_profile`: the sla_material section value that should be the default when you select this printer. |
| 140 | + |
| 141 | +## `[print]` and `[sla_print]` Section |
| 142 | +it's advised to set a `compatible_printers_condition` or a `compatible_printers` to let the user select this print option only when the desired printer(s) is selected. It avoids polluting the interface's print profile list with print profile from other vendors. |
| 143 | + |
| 144 | +## `[filament]` and `[sla_material]` Section |
| 145 | +You may want to set `compatible_printers_condition` or a `compatible_printers` for the default material profile (like "basic PLA") to not pollute the material list with a "basic pla" for each vendor installed. |
| 146 | +If you define a special material only defined in this vendor profile, you can let these field blank to allow any printer to use this material. |
| 147 | + |
| 148 | +You can also use `compatible_prints` and `compatible_prints_condition` if you need to have special filament setting for a special kind of print profile (like a speedy print profile that need higher temperature & more cooling). |
| 149 | + |
| 150 | +## Tool |
| 151 | +If you are able to build the slicer, you can build the project `convert_config`. |
| 152 | +This tool allow to check & fix a vendor profile. |
| 153 | +If you launch it with the path of your profile, it will tell you the issues the profiles has (if you feed it with a profile from prusaslicer, it will tell you all the conversions it makes). Then it will create a fixed config in a new directory (named 'convert'), adding any missing setting into the common roots. |
| 154 | +Take care of any "error" or "warning" line, these indicates problems you need to take care manually (like a preset inheriting two presets that both defines everything). |
| 155 | +If you want to submit a new vendor or a revision of a current profile for a certain version of the slicer, then the ini file should be unchanged when going through this tool. |
0 commit comments