2013-12-21 15:15:41 +00:00
# include "PrintConfig.hpp"
2018-06-20 11:57:37 +00:00
# include "I18N.hpp"
2017-10-27 16:52:35 +00:00
# include <set>
2017-09-18 07:56:48 +00:00
# include <boost/algorithm/string/replace.hpp>
2018-06-20 11:57:37 +00:00
# include <boost/algorithm/string/case_conv.hpp>
# include <boost/format.hpp>
2017-09-18 07:56:48 +00:00
# include <boost/lexical_cast.hpp>
2016-11-26 12:46:19 +00:00
# include <boost/thread.hpp>
2017-10-27 16:52:35 +00:00
2017-10-17 14:01:18 +00:00
# include <float.h>
2013-12-21 15:15:41 +00:00
namespace Slic3r {
2019-08-16 14:17:37 +00:00
//! macro used to mark string used at localization,
2018-02-15 16:30:33 +00:00
//! return same string
2019-05-09 12:15:56 +00:00
# define L(s) (s)
# define _(s) Slic3r::I18N::translate(s)
2018-02-15 16:30:33 +00:00
2019-03-13 18:17:26 +00:00
static void assign_printer_technology_to_unknown ( t_optiondef_map & options , PrinterTechnology printer_technology )
{
for ( std : : pair < const t_config_option_key , ConfigOptionDef > & kvp : options )
if ( kvp . second . printer_technology = = ptUnknown )
kvp . second . printer_technology = printer_technology ;
}
2015-12-07 18:39:49 +00:00
PrintConfigDef : : PrintConfigDef ( )
2018-07-31 13:09:57 +00:00
{
this - > init_common_params ( ) ;
2019-03-13 18:17:26 +00:00
assign_printer_technology_to_unknown ( this - > options , ptAny ) ;
2018-07-31 13:09:57 +00:00
this - > init_fff_params ( ) ;
2019-10-15 14:31:20 +00:00
this - > init_extruder_option_keys ( ) ;
2019-03-13 18:17:26 +00:00
assign_printer_technology_to_unknown ( this - > options , ptFFF ) ;
2018-07-31 13:09:57 +00:00
this - > init_sla_params ( ) ;
2019-03-13 18:17:26 +00:00
assign_printer_technology_to_unknown ( this - > options , ptSLA ) ;
2018-07-31 13:09:57 +00:00
}
void PrintConfigDef : : init_common_params ( )
2015-12-07 18:39:49 +00:00
{
2018-07-31 13:09:57 +00:00
ConfigOptionDef * def ;
2020-04-29 08:50:28 +00:00
def = this - > add ( " single_instance " , coBool ) ;
def - > label = L ( " Single Instance " ) ;
def - > mode = comAdvanced ;
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2018-07-31 13:09:57 +00:00
def = this - > add ( " printer_technology " , coEnum ) ;
def - > label = L ( " Printer technology " ) ;
def - > tooltip = L ( " Printer technology " ) ;
def - > enum_keys_map = & ConfigOptionEnum < PrinterTechnology > : : get_enum_values ( ) ;
def - > enum_values . push_back ( " FFF " ) ;
def - > enum_values . push_back ( " SLA " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionEnum < PrinterTechnology > ( ptFFF ) ) ;
2018-07-31 13:09:57 +00:00
def = this - > add ( " bed_shape " , coPoints ) ;
def - > label = L ( " Bed shape " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionPoints { Vec2d ( 0 , 0 ) , Vec2d ( 200 , 0 ) , Vec2d ( 200 , 200 ) , Vec2d ( 0 , 200 ) } ) ;
2019-08-16 14:17:37 +00:00
2019-07-18 09:12:11 +00:00
def = this - > add ( " bed_custom_texture " , coString ) ;
def - > label = L ( " Bed custom texture " ) ;
def - > mode = comAdvanced ;
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2019-07-18 10:56:52 +00:00
def = this - > add ( " bed_custom_model " , coString ) ;
def - > label = L ( " Bed custom model " ) ;
def - > mode = comAdvanced ;
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2019-11-15 16:33:31 +00:00
def = this - > add ( " thumbnails " , coPoints ) ;
def - > label = L ( " Picture sizes to be stored into a .gcode and .sl1 files " ) ;
def - > mode = comExpert ;
def - > set_default_value ( new ConfigOptionPoints ( ) ) ;
2018-07-31 13:09:57 +00:00
def = this - > add ( " layer_height " , coFloat ) ;
def - > label = L ( " Layer height " ) ;
def - > category = L ( " Layers and Perimeters " ) ;
def - > tooltip = L ( " This setting controls the height (and thus the total number) of the slices/layers. "
" Thinner layers give better accuracy but take more time to print. " ) ;
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0.3 ) ) ;
2018-07-31 13:09:57 +00:00
def = this - > add ( " max_print_height " , coFloat ) ;
def - > label = L ( " Max print height " ) ;
def - > tooltip = L ( " Set this to the maximum height that can be reached by your extruder while printing. " ) ;
def - > sidetext = L ( " mm " ) ;
2020-05-28 10:03:48 +00:00
def - > min = 0 ;
def - > max = 1200 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 200.0 ) ) ;
2019-03-01 16:53:02 +00:00
def = this - > add ( " slice_closing_radius " , coFloat ) ;
def - > label = L ( " Slice gap closing radius " ) ;
def - > category = L ( " Advanced " ) ;
def - > tooltip = L ( " Cracks smaller than 2x gap closing radius are being filled during the triangle mesh slicing. "
" The gap closing operation may reduce the final print resolution, therefore it is advisable to keep the value reasonably low. " ) ;
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
2019-08-16 14:17:37 +00:00
def - > mode = comAdvanced ;
def - > set_default_value ( new ConfigOptionFloat ( 0.049 ) ) ;
2019-03-05 14:15:41 +00:00
def = this - > add ( " print_host " , coString ) ;
def - > label = L ( " Hostname, IP or URL " ) ;
def - > tooltip = L ( " Slic3r can upload G-code files to a printer host. This field should contain "
" the hostname, IP address or URL of the printer host instance. " ) ;
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2019-03-05 14:15:41 +00:00
def = this - > add ( " printhost_apikey " , coString ) ;
def - > label = L ( " API Key / Password " ) ;
def - > tooltip = L ( " Slic3r can upload G-code files to a printer host. This field should contain "
" the API Key or the password required for authentication. " ) ;
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2019-08-16 14:17:37 +00:00
2019-03-05 14:15:41 +00:00
def = this - > add ( " printhost_cafile " , coString ) ;
2019-05-04 00:07:07 +00:00
def - > label = L ( " HTTPS CA File " ) ;
def - > tooltip = L ( " Custom CA certificate file can be specified for HTTPS OctoPrint connections, in crt/pem format. "
" If left blank, the default OS CA certificate repository is used. " ) ;
2019-03-05 14:15:41 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2020-02-14 09:17:55 +00:00
def = this - > add ( " elefant_foot_compensation " , coFloat ) ;
def - > label = L ( " Elephant foot compensation " ) ;
def - > category = L ( " Advanced " ) ;
def - > tooltip = L ( " The first layer will be shrunk in the XY plane by the configured value "
" to compensate for the 1st layer squish aka an Elephant Foot effect. " ) ;
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
def - > mode = comAdvanced ;
def - > set_default_value ( new ConfigOptionFloat ( 0.2 ) ) ;
2020-06-24 06:50:01 +00:00
// Options used by physical printers
def = this - > add ( " login " , coString ) ;
def - > label = L ( " Login " ) ;
// def->tooltip = L("");
def - > mode = comAdvanced ;
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
def = this - > add ( " password " , coString ) ;
def - > label = L ( " Password " ) ;
// def->tooltip = L("");
def - > mode = comAdvanced ;
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
def = this - > add ( " preset_name " , coString ) ;
def - > label = L ( " Printer preset name " ) ;
def - > tooltip = L ( " Related printer preset name " ) ;
def - > mode = comAdvanced ;
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2020-06-25 10:58:59 +00:00
def = this - > add ( " authorization_type " , coEnum ) ;
def - > label = L ( " Authorization Type " ) ;
// def->tooltip = L("");
def - > enum_keys_map = & ConfigOptionEnum < AuthorizationType > : : get_enum_values ( ) ;
def - > enum_values . push_back ( " key " ) ;
def - > enum_values . push_back ( " user " ) ;
def - > enum_labels . push_back ( " KeyPassword " ) ;
def - > enum_labels . push_back ( " UserPassword " ) ;
def - > mode = comAdvanced ;
def - > set_default_value ( new ConfigOptionEnum < AuthorizationType > ( atKeyPassword ) ) ;
2018-07-31 13:09:57 +00:00
}
void PrintConfigDef : : init_fff_params ( )
{
2015-12-16 12:09:25 +00:00
ConfigOptionDef * def ;
2017-12-12 12:43:36 +00:00
// Maximum extruder temperature, bumped to 1500 to support printing of glass.
const int max_temp = 1500 ;
2018-02-15 16:30:33 +00:00
2019-08-16 14:17:37 +00:00
def = this - > add ( " avoid_crossing_perimeters " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Avoid crossing perimeters " ) ;
2019-08-16 14:17:37 +00:00
def - > tooltip = L ( " Optimize travel moves in order to minimize the crossing of perimeters. "
2017-11-09 09:06:25 +00:00
" This is mostly useful with Bowden extruders which suffer from oozing. "
2018-02-15 16:30:33 +00:00
" This feature slows down both the print and the G-code generation. " ) ;
2019-01-25 15:57:19 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2015-12-16 12:09:25 +00:00
2017-06-21 14:15:39 +00:00
def = this - > add ( " bed_temperature " , coInts ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Other layers " ) ;
def - > tooltip = L ( " Bed temperature for layers after the first one. "
2018-02-15 16:30:33 +00:00
" Set this to zero to disable bed temperature control commands in the output. " ) ;
2020-04-13 15:55:38 +00:00
def - > sidetext = L ( " °C " ) ;
2018-02-23 08:16:35 +00:00
def - > full_label = L ( " Bed temperature " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
def - > max = 300 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInts { 0 } ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " before_layer_gcode " , coString ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Before layer change G-code " ) ;
def - > tooltip = L ( " This custom code is inserted at every layer change, right before the Z move. "
2017-11-09 09:06:25 +00:00
" Note that you can use placeholder variables for all Slic3r settings as well "
2018-02-15 16:30:33 +00:00
" as [layer_num] and [layer_z]. " ) ;
2015-12-16 12:09:25 +00:00
def - > multiline = true ;
def - > full_width = true ;
2019-04-13 21:46:52 +00:00
def - > height = 5 ;
2018-10-21 21:09:24 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2015-12-16 12:09:25 +00:00
2017-11-28 14:19:57 +00:00
def = this - > add ( " between_objects_gcode " , coString ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Between objects G-code " ) ;
def - > tooltip = L ( " This code is inserted between objects when using sequential printing. By default extruder and bed temperature are reset using non-wait command; however if M104, M109, M140 or M190 are detected in this custom code, Slic3r will not add temperature commands. Note that you can use placeholder variables for all Slic3r settings, so you can put a \" M109 S[first_layer_temperature] \" command wherever you want. " ) ;
2017-11-28 14:19:57 +00:00
def - > multiline = true ;
def - > full_width = true ;
2019-04-13 21:46:52 +00:00
def - > height = 12 ;
2018-10-21 21:09:24 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2017-11-28 14:19:57 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " bottom_solid_layers " , coInt ) ;
2019-05-04 00:07:07 +00:00
//TRN To be shown in Print Settings "Bottom solid layers"
2018-02-23 08:16:35 +00:00
def - > label = L ( " Bottom " ) ;
def - > category = L ( " Layers and Perimeters " ) ;
def - > tooltip = L ( " Number of solid layers to generate on bottom surfaces. " ) ;
def - > full_label = L ( " Bottom solid layers " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 3 ) ) ;
2015-12-16 12:09:25 +00:00
2020-02-05 15:53:26 +00:00
def = this - > add ( " bottom_solid_min_thickness " , coFloat ) ;
//TRN To be shown in Print Settings "Top solid layers"
def - > label = L ( " Bottom " ) ;
def - > category = L ( " Layers and Perimeters " ) ;
def - > tooltip = L ( " The number of bottom solid layers is increased above bottom_solid_layers if necessary to satisfy "
" minimum thickness of bottom shell. " ) ;
def - > full_label = L ( " Minimum bottom shell thickness " ) ;
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
def - > set_default_value ( new ConfigOptionFloat ( 0. ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " bridge_acceleration " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Bridge " ) ;
def - > tooltip = L ( " This is the acceleration your printer will use for bridges. "
2018-02-15 16:30:33 +00:00
" Set zero to disable acceleration control for bridges. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm/s² " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2015-12-16 12:09:25 +00:00
2017-07-31 14:23:52 +00:00
def = this - > add ( " bridge_angle " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Bridging angle " ) ;
def - > category = L ( " Infill " ) ;
def - > tooltip = L ( " Bridging angle override. If left to zero, the bridging angle will be calculated "
2017-11-09 09:06:25 +00:00
" automatically. Otherwise the provided angle will be used for all bridges. "
2018-02-19 14:32:22 +00:00
" Use 180° for zero angle. " ) ;
2019-08-16 14:17:37 +00:00
def - > sidetext = L ( " ° " ) ;
2017-07-31 14:23:52 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0. ) ) ;
2017-07-31 14:23:52 +00:00
2017-06-21 14:15:39 +00:00
def = this - > add ( " bridge_fan_speed " , coInts ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Bridges fan speed " ) ;
def - > tooltip = L ( " This fan speed is enforced during all bridges and overhangs. " ) ;
def - > sidetext = L ( " % " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
def - > max = 100 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInts { 100 } ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " bridge_flow_ratio " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Bridge flow ratio " ) ;
def - > category = L ( " Advanced " ) ;
def - > tooltip = L ( " This factor affects the amount of plastic for bridging. "
2017-11-09 09:06:25 +00:00
" You can decrease it slightly to pull the extrudates and prevent sagging, "
" although default settings are usually good and you should experiment "
2018-02-15 16:30:33 +00:00
" with cooling (use a fan) before tweaking this. " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2019-08-16 14:17:37 +00:00
def - > max = 2 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-08-16 14:17:37 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 1 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " bridge_speed " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Bridges " ) ;
def - > category = L ( " Speed " ) ;
def - > tooltip = L ( " Speed for printing bridges. " ) ;
def - > sidetext = L ( " mm/s " ) ;
2018-09-17 13:12:13 +00:00
def - > aliases = { " bridge_feed_rate " } ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2019-01-25 15:57:19 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 60 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " brim_width " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Brim width " ) ;
def - > tooltip = L ( " Horizontal width of the brim that will be printed around each object on the first layer. " ) ;
def - > sidetext = L ( " mm " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2019-03-19 08:51:50 +00:00
def - > mode = comSimple ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2015-12-16 12:09:25 +00:00
2017-02-14 11:36:04 +00:00
def = this - > add ( " clip_multipart_objects " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Clip multi-part objects " ) ;
2019-04-26 08:52:38 +00:00
def - > tooltip = L ( " When printing multi-material objects, this settings will make Slic3r "
2017-11-09 09:06:25 +00:00
" to clip the overlapping object parts one by the other "
2018-02-15 16:30:33 +00:00
" (2nd part will be clipped by the 1st, 3rd part will be clipped by the 1st and 2nd etc). " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2020-03-20 17:25:11 +00:00
def - > set_default_value ( new ConfigOptionBool ( true ) ) ;
2017-02-14 11:36:04 +00:00
2018-11-07 13:44:47 +00:00
def = this - > add ( " colorprint_heights " , coFloats ) ;
def - > label = L ( " Colorprint height " ) ;
2019-05-11 21:29:25 +00:00
def - > tooltip = L ( " Heights at which a filament change is to occur. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { } ) ;
2018-11-07 13:44:47 +00:00
2017-09-18 07:56:48 +00:00
def = this - > add ( " compatible_printers " , coStrings ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Compatible printers " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionStrings ( ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2017-09-18 07:56:48 +00:00
2017-12-18 14:07:38 +00:00
def = this - > add ( " compatible_printers_condition " , coString ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Compatible printers condition " ) ;
def - > tooltip = L ( " A boolean expression using the configuration values of an active printer profile. "
2017-12-18 14:07:38 +00:00
" If this expression evaluates to true, this profile is considered compatible "
2018-02-15 16:30:33 +00:00
" with the active printer profile. " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2017-12-18 14:07:38 +00:00
2018-12-04 16:56:49 +00:00
def = this - > add ( " compatible_prints " , coStrings ) ;
def - > label = L ( " Compatible print profiles " ) ;
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionStrings ( ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2018-12-04 16:56:49 +00:00
def = this - > add ( " compatible_prints_condition " , coString ) ;
def - > label = L ( " Compatible print profiles condition " ) ;
def - > tooltip = L ( " A boolean expression using the configuration values of an active print profile. "
" If this expression evaluates to true, this profile is considered compatible "
" with the active print profile. " ) ;
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2018-12-04 16:56:49 +00:00
2018-06-28 18:13:01 +00:00
// The following value is to be stored into the project file (AMF, 3MF, Config ...)
// and it contains a sum of "compatible_printers_condition" values over the print and filament profiles.
def = this - > add ( " compatible_printers_condition_cummulative " , coStrings ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionStrings ( ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2018-12-04 16:56:49 +00:00
def = this - > add ( " compatible_prints_condition_cummulative " , coStrings ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionStrings ( ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2017-12-18 14:07:38 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " complete_objects " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Complete individual objects " ) ;
def - > tooltip = L ( " When printing multiple objects or copies, this feature will complete "
2017-11-09 09:06:25 +00:00
" each object before moving onto next one (and starting it from its bottom layer). "
" This feature is useful to avoid the risk of ruined prints. "
2018-02-15 16:30:33 +00:00
" Slic3r should warn and prevent you from extruder collisions, but beware. " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2015-12-16 12:09:25 +00:00
2017-06-21 14:15:39 +00:00
def = this - > add ( " cooling " , coBools ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Enable auto cooling " ) ;
def - > tooltip = L ( " This flag enables the automatic cooling logic that adjusts print speed "
2018-02-15 16:30:33 +00:00
" and fan speed according to layer printing time. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBools { true } ) ;
2015-12-16 12:09:25 +00:00
2018-03-01 15:15:00 +00:00
def = this - > add ( " cooling_tube_retraction " , coFloat ) ;
2018-03-09 14:10:15 +00:00
def - > label = L ( " Cooling tube position " ) ;
2019-05-11 21:29:25 +00:00
def - > tooltip = L ( " Distance of the center-point of the cooling tube from the extruder tip. " ) ;
2018-03-09 14:10:15 +00:00
def - > sidetext = L ( " mm " ) ;
2018-03-01 15:15:00 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 91.5f ) ) ;
2018-03-01 15:15:00 +00:00
def = this - > add ( " cooling_tube_length " , coFloat ) ;
2018-03-09 14:10:15 +00:00
def - > label = L ( " Cooling tube length " ) ;
2019-05-11 21:29:25 +00:00
def - > tooltip = L ( " Length of the cooling tube to limit space for cooling moves inside it. " ) ;
2018-03-09 14:10:15 +00:00
def - > sidetext = L ( " mm " ) ;
2018-03-01 15:15:00 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 5.f ) ) ;
2018-03-01 15:15:00 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " default_acceleration " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Default " ) ;
def - > tooltip = L ( " This is the acceleration your printer will be reset to after "
2017-11-09 09:06:25 +00:00
" the role-specific acceleration values are used (perimeter/infill). "
2018-02-15 16:30:33 +00:00
" Set zero to prevent resetting acceleration at all. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm/s² " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2015-12-16 12:09:25 +00:00
2018-03-09 15:37:33 +00:00
def = this - > add ( " default_filament_profile " , coStrings ) ;
def - > label = L ( " Default filament profile " ) ;
def - > tooltip = L ( " Default filament profile associated with the current printer profile. "
" On selection of the current printer profile, this filament profile will be activated. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionStrings ( ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2018-03-09 15:37:33 +00:00
def = this - > add ( " default_print_profile " , coString ) ;
def - > label = L ( " Default print profile " ) ;
def - > tooltip = L ( " Default print profile associated with the current printer profile. "
" On selection of the current printer profile, this print profile will be activated. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2018-03-09 15:37:33 +00:00
2017-06-21 14:15:39 +00:00
def = this - > add ( " disable_fan_first_layers " , coInts ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Disable fan for the first " ) ;
def - > tooltip = L ( " You can set this to a positive value to disable fan at all "
2018-02-15 16:30:33 +00:00
" during the first layers, so that it does not make adhesion worse. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " layers " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
def - > max = 1000 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInts { 3 } ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " dont_support_bridges " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Don't support bridges " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " Experimental option for preventing support material from being generated "
2018-02-15 16:30:33 +00:00
" under bridged areas. " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( true ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " duplicate_distance " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Distance between copies " ) ;
def - > tooltip = L ( " Distance used for the auto-arrange feature of the plater. " ) ;
def - > sidetext = L ( " mm " ) ;
2018-09-17 13:12:13 +00:00
def - > aliases = { " multiply_distance " } ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 6 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " end_gcode " , coString ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " End G-code " ) ;
def - > tooltip = L ( " This end procedure is inserted at the end of the output file. "
2019-08-27 09:39:51 +00:00
" Note that you can use placeholder variables for all PrusaSlicer settings. " ) ;
2015-12-16 12:09:25 +00:00
def - > multiline = true ;
def - > full_width = true ;
2019-04-13 21:46:52 +00:00
def - > height = 12 ;
2018-10-21 21:09:24 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( " M104 S0 ; turn off temperature \n G28 X0 ; home X axis \n M84 ; disable motors \n " ) ) ;
2015-12-16 12:09:25 +00:00
2017-06-05 09:30:57 +00:00
def = this - > add ( " end_filament_gcode " , coStrings ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " End G-code " ) ;
2019-07-15 09:49:30 +00:00
def - > tooltip = L ( " This end procedure is inserted at the end of the output file, before the printer end gcode (and "
" before any toolchange from this filament in case of multimaterial printers). "
2019-08-27 09:39:51 +00:00
" Note that you can use placeholder variables for all PrusaSlicer settings. "
2018-02-15 16:30:33 +00:00
" If you have multiple extruders, the gcode is processed in extruder order. " ) ;
2017-06-05 09:30:57 +00:00
def - > multiline = true ;
def - > full_width = true ;
def - > height = 120 ;
2018-10-21 21:09:24 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionStrings { " ; Filament-specific end gcode \n ;END gcode for filament \n " } ) ;
2017-06-05 09:30:57 +00:00
2016-10-16 20:11:19 +00:00
def = this - > add ( " ensure_vertical_shell_thickness " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Ensure vertical shell thickness " ) ;
def - > category = L ( " Layers and Perimeters " ) ;
def - > tooltip = L ( " Add solid infill near sloping surfaces to guarantee the vertical shell thickness "
2018-02-15 16:30:33 +00:00
" (top+bottom solid layers). " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2016-10-16 20:11:19 +00:00
2019-02-22 14:25:35 +00:00
auto def_top_fill_pattern = def = this - > add ( " top_fill_pattern " , coEnum ) ;
def - > label = L ( " Top fill pattern " ) ;
2018-02-23 08:16:35 +00:00
def - > category = L ( " Infill " ) ;
2019-02-22 14:25:35 +00:00
def - > tooltip = L ( " Fill pattern for top infill. This only affects the top visible layer, and not its adjacent solid shells. " ) ;
2019-03-13 18:17:26 +00:00
def - > cli = " top-fill-pattern|external-fill-pattern|solid-fill-pattern " ;
2017-10-17 14:01:18 +00:00
def - > enum_keys_map = & ConfigOptionEnum < InfillPattern > : : get_enum_values ( ) ;
2015-12-16 12:09:25 +00:00
def - > enum_values . push_back ( " rectilinear " ) ;
2020-04-25 06:15:04 +00:00
def - > enum_values . push_back ( " monotonous " ) ;
2015-12-16 12:09:25 +00:00
def - > enum_values . push_back ( " concentric " ) ;
def - > enum_values . push_back ( " hilbertcurve " ) ;
def - > enum_values . push_back ( " archimedeanchords " ) ;
def - > enum_values . push_back ( " octagramspiral " ) ;
2018-06-20 12:20:48 +00:00
def - > enum_labels . push_back ( L ( " Rectilinear " ) ) ;
2020-04-25 06:15:04 +00:00
def - > enum_labels . push_back ( L ( " Monotonous " ) ) ;
2018-06-20 12:20:48 +00:00
def - > enum_labels . push_back ( L ( " Concentric " ) ) ;
def - > enum_labels . push_back ( L ( " Hilbert Curve " ) ) ;
def - > enum_labels . push_back ( L ( " Archimedean Chords " ) ) ;
def - > enum_labels . push_back ( L ( " Octagram Spiral " ) ) ;
2019-02-22 14:25:35 +00:00
// solid_fill_pattern is an obsolete equivalent to top_fill_pattern/bottom_fill_pattern.
def - > aliases = { " solid_fill_pattern " , " external_fill_pattern " } ;
2020-04-25 06:15:04 +00:00
def - > set_default_value ( new ConfigOptionEnum < InfillPattern > ( ipMonotonous ) ) ;
2019-02-22 14:25:35 +00:00
def = this - > add ( " bottom_fill_pattern " , coEnum ) ;
2019-03-14 08:19:21 +00:00
def - > label = L ( " Bottom fill pattern " ) ;
2019-06-26 11:26:49 +00:00
def - > category = L ( " Infill " ) ;
2019-02-22 14:25:35 +00:00
def - > tooltip = L ( " Fill pattern for bottom infill. This only affects the bottom external visible layer, and not its adjacent solid shells. " ) ;
2019-03-13 18:17:26 +00:00
def - > cli = " bottom-fill-pattern|external-fill-pattern|solid-fill-pattern " ;
2019-06-26 11:26:49 +00:00
def - > enum_keys_map = & ConfigOptionEnum < InfillPattern > : : get_enum_values ( ) ;
def - > enum_values = def_top_fill_pattern - > enum_values ;
2019-08-02 14:15:49 +00:00
def - > enum_labels = def_top_fill_pattern - > enum_labels ;
2019-06-26 11:26:49 +00:00
def - > aliases = def_top_fill_pattern - > aliases ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionEnum < InfillPattern > ( ipRectilinear ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " external_perimeter_extrusion_width " , coFloatOrPercent ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " External perimeters " ) ;
def - > category = L ( " Extrusion Width " ) ;
def - > tooltip = L ( " Set this to a non-zero value to set a manual extrusion width for external perimeters. "
2017-11-09 09:48:06 +00:00
" If left zero, default extrusion width will be used if set, otherwise 1.125 x nozzle diameter will be used. "
2018-02-15 16:30:33 +00:00
" If expressed as percentage (for example 200%), it will be computed over layer height. " ) ;
2019-05-14 10:15:48 +00:00
def - > sidetext = L ( " mm or % " ) ;
2019-10-18 09:53:19 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloatOrPercent ( 0 , false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " external_perimeter_speed " , coFloatOrPercent ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " External perimeters " ) ;
def - > category = L ( " Speed " ) ;
def - > tooltip = L ( " This separate setting will affect the speed of external perimeters (the visible ones). "
2017-11-09 09:06:25 +00:00
" If expressed as percentage (for example: 80%) it will be calculated "
2018-02-15 16:30:33 +00:00
" on the perimeters speed setting above. Set to zero for auto. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm/s or % " ) ;
2015-12-16 12:09:25 +00:00
def - > ratio_over = " perimeter_speed " ;
def - > min = 0 ;
2019-01-25 15:57:19 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloatOrPercent ( 50 , true ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " external_perimeters_first " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " External perimeters first " ) ;
def - > category = L ( " Layers and Perimeters " ) ;
def - > tooltip = L ( " Print contour perimeters from the outermost one to the innermost one "
2018-02-15 16:30:33 +00:00
" instead of the default inverse order. " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " extra_perimeters " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Extra perimeters if needed " ) ;
def - > category = L ( " Layers and Perimeters " ) ;
def - > tooltip = L ( " Add more perimeters when needed for avoiding gaps in sloping walls. "
2017-11-09 09:06:25 +00:00
" Slic3r keeps adding perimeters, until more than 70% of the loop immediately above "
2018-02-15 16:30:33 +00:00
" is supported. " ) ;
2019-01-25 15:57:19 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( true ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " extruder " , coInt ) ;
def - > gui_type = " i_enum_open " ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Extruder " ) ;
def - > category = L ( " Extruders " ) ;
def - > tooltip = L ( " The extruder to use (unless more specific extruder settings are specified). "
2018-02-15 16:30:33 +00:00
" This value overrides perimeter and infill extruders, but not the support extruders. " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ; // 0 = inherit defaults
def - > enum_labels . push_back ( " default " ) ; // override label for item 0
def - > enum_labels . push_back ( " 1 " ) ;
def - > enum_labels . push_back ( " 2 " ) ;
def - > enum_labels . push_back ( " 3 " ) ;
def - > enum_labels . push_back ( " 4 " ) ;
2018-07-09 11:44:41 +00:00
def - > enum_labels . push_back ( " 5 " ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " extruder_clearance_height " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Height " ) ;
def - > tooltip = L ( " Set this to the vertical distance between your nozzle tip and (usually) the X carriage rods. "
2017-11-09 09:06:25 +00:00
" In other words, this is the height of the clearance cylinder around your extruder, "
" and it represents the maximum depth the extruder can peek before colliding with "
2018-02-15 16:30:33 +00:00
" other printed objects. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 20 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " extruder_clearance_radius " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Radius " ) ;
def - > tooltip = L ( " Set this to the clearance radius around your extruder. "
2017-11-09 09:06:25 +00:00
" If the extruder is not centered, choose the largest value for safety. "
" This setting is used to check for collisions and to display the graphical preview "
2018-02-15 16:30:33 +00:00
" in the plater. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 20 ) ) ;
2015-12-16 12:09:25 +00:00
2017-05-24 13:20:20 +00:00
def = this - > add ( " extruder_colour " , coStrings ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Extruder Color " ) ;
def - > tooltip = L ( " This is only used in the Slic3r interface as a visual help. " ) ;
2017-05-24 13:20:20 +00:00
def - > gui_type = " color " ;
2017-11-01 18:30:05 +00:00
// Empty string means no color assigned yet.
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionStrings { " " } ) ;
2017-05-24 13:20:20 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " extruder_offset " , coPoints ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Extruder offset " ) ;
def - > tooltip = L ( " If your firmware doesn't handle the extruder displacement you need the G-code "
2017-11-09 09:06:25 +00:00
" to take it into account. This option lets you specify the displacement of each extruder "
" with respect to the first one. It expects positive coordinates (they will be subtracted "
2018-02-15 16:30:33 +00:00
" from the XY coordinate). " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionPoints { Vec2d ( 0 , 0 ) } ) ;
2014-06-11 20:04:19 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " extrusion_axis " , coString ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Extrusion axis " ) ;
def - > tooltip = L ( " Use this option to set the axis letter associated to your printer's extruder "
2018-02-15 16:30:33 +00:00
" (usually E but some printers use A). " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( " E " ) ) ;
2014-06-11 20:04:19 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " extrusion_multiplier " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Extrusion multiplier " ) ;
def - > tooltip = L ( " This factor changes the amount of flow proportionally. You may need to tweak "
2017-11-09 09:06:25 +00:00
" this setting to get nice surface finish and correct single wall widths. "
" Usual values are between 0.9 and 1.1. If you think you need to change this more, "
2018-02-15 16:30:33 +00:00
" check filament diameter and your firmware E steps. " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 1. } ) ;
2019-08-16 14:17:37 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " extrusion_width " , coFloatOrPercent ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Default extrusion width " ) ;
def - > category = L ( " Extrusion Width " ) ;
def - > tooltip = L ( " Set this to a non-zero value to allow a manual extrusion width. "
2017-11-09 09:48:06 +00:00
" If left to zero, Slic3r derives extrusion widths from the nozzle diameter "
" (see the tooltips for perimeter extrusion width, infill extrusion width etc). "
2018-02-15 16:30:33 +00:00
" If expressed as percentage (for example: 230%), it will be computed over layer height. " ) ;
2019-05-14 10:15:48 +00:00
def - > sidetext = L ( " mm or % " ) ;
2019-10-18 09:53:19 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloatOrPercent ( 0 , false ) ) ;
2015-12-16 12:09:25 +00:00
2017-06-21 14:15:39 +00:00
def = this - > add ( " fan_always_on " , coBools ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Keep fan always on " ) ;
def - > tooltip = L ( " If this is enabled, fan will never be disabled and will be kept running at least "
2018-02-15 16:30:33 +00:00
" at its minimum speed. Useful for PLA, harmful for ABS. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBools { false } ) ;
2015-12-16 12:09:25 +00:00
2017-06-21 14:15:39 +00:00
def = this - > add ( " fan_below_layer_time " , coInts ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Enable fan if layer print time is below " ) ;
def - > tooltip = L ( " If layer print time is estimated below this number of seconds, fan will be enabled "
2018-02-15 16:30:33 +00:00
" and its speed will be calculated by interpolating the minimum and maximum speeds. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " approximate seconds " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
def - > max = 1000 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInts { 60 } ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " filament_colour " , coStrings ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Color " ) ;
def - > tooltip = L ( " This is only used in the Slic3r interface as a visual help. " ) ;
2015-12-16 12:09:25 +00:00
def - > gui_type = " color " ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionStrings { " #29B2B2 " } ) ;
2015-05-26 00:01:43 +00:00
2016-11-01 12:41:24 +00:00
def = this - > add ( " filament_notes " , coStrings ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Filament notes " ) ;
def - > tooltip = L ( " You can put your notes regarding the filament here. " ) ;
2016-11-01 12:41:24 +00:00
def - > multiline = true ;
def - > full_width = true ;
2019-04-13 21:46:52 +00:00
def - > height = 13 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionStrings { " " } ) ;
2016-11-01 12:41:24 +00:00
def = this - > add ( " filament_max_volumetric_speed " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Max volumetric speed " ) ;
def - > tooltip = L ( " Maximum volumetric speed allowed for this filament. Limits the maximum volumetric "
2017-11-09 09:06:25 +00:00
" speed of a print to the minimum of print and filament volumetric speed. "
2018-02-15 16:30:33 +00:00
" Set to zero for no limit. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm³/s " ) ;
2016-11-01 12:41:24 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 0. } ) ;
2016-11-01 12:41:24 +00:00
2018-03-02 14:52:16 +00:00
def = this - > add ( " filament_loading_speed " , coFloats ) ;
2018-03-09 14:10:15 +00:00
def - > label = L ( " Loading speed " ) ;
2019-05-11 21:29:25 +00:00
def - > tooltip = L ( " Speed used for loading the filament on the wipe tower. " ) ;
2018-03-09 14:10:15 +00:00
def - > sidetext = L ( " mm/s " ) ;
2018-03-02 14:52:16 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 28. } ) ;
2018-03-02 14:52:16 +00:00
2018-08-21 12:36:24 +00:00
def = this - > add ( " filament_loading_speed_start " , coFloats ) ;
2018-08-24 10:46:32 +00:00
def - > label = L ( " Loading speed at the start " ) ;
2019-05-11 21:29:25 +00:00
def - > tooltip = L ( " Speed used at the very beginning of loading phase. " ) ;
2018-08-21 12:36:24 +00:00
def - > sidetext = L ( " mm/s " ) ;
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 3. } ) ;
2018-08-21 12:36:24 +00:00
2018-03-02 14:52:16 +00:00
def = this - > add ( " filament_unloading_speed " , coFloats ) ;
2018-03-09 14:10:15 +00:00
def - > label = L ( " Unloading speed " ) ;
def - > tooltip = L ( " Speed used for unloading the filament on the wipe tower (does not affect "
2019-05-11 21:29:25 +00:00
" initial part of unloading just after ramming). " ) ;
2018-03-09 14:10:15 +00:00
def - > sidetext = L ( " mm/s " ) ;
2018-03-02 14:52:16 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 90. } ) ;
2018-03-02 14:52:16 +00:00
2018-08-14 14:23:23 +00:00
def = this - > add ( " filament_unloading_speed_start " , coFloats ) ;
2018-08-24 10:46:32 +00:00
def - > label = L ( " Unloading speed at the start " ) ;
2019-05-11 21:29:25 +00:00
def - > tooltip = L ( " Speed used for unloading the tip of the filament immediately after ramming. " ) ;
2018-08-14 14:23:23 +00:00
def - > sidetext = L ( " mm/s " ) ;
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 100. } ) ;
2018-08-14 14:23:23 +00:00
2018-03-02 14:52:16 +00:00
def = this - > add ( " filament_toolchange_delay " , coFloats ) ;
2018-03-09 14:10:15 +00:00
def - > label = L ( " Delay after unloading " ) ;
def - > tooltip = L ( " Time to wait after the filament is unloaded. "
2018-03-02 14:52:16 +00:00
" May help to get reliable toolchanges with flexible materials "
2019-05-11 21:29:25 +00:00
" that may need more time to shrink to original dimensions. " ) ;
2018-03-09 14:10:15 +00:00
def - > sidetext = L ( " s " ) ;
2018-03-02 14:52:16 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 0. } ) ;
2018-03-02 14:52:16 +00:00
2018-04-24 11:02:08 +00:00
def = this - > add ( " filament_cooling_moves " , coInts ) ;
def - > label = L ( " Number of cooling moves " ) ;
def - > tooltip = L ( " Filament is cooled by being moved back and forth in the "
2019-05-11 21:29:25 +00:00
" cooling tubes. Specify desired number of these moves. " ) ;
2018-04-24 11:02:08 +00:00
def - > max = 0 ;
def - > max = 20 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInts { 4 } ) ;
2018-04-24 11:02:08 +00:00
def = this - > add ( " filament_cooling_initial_speed " , coFloats ) ;
def - > label = L ( " Speed of the first cooling move " ) ;
2019-05-11 21:29:25 +00:00
def - > tooltip = L ( " Cooling moves are gradually accelerating beginning at this speed. " ) ;
2018-04-24 11:02:08 +00:00
def - > sidetext = L ( " mm/s " ) ;
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 2.2f } ) ;
2018-04-24 11:02:08 +00:00
2018-08-02 13:14:12 +00:00
def = this - > add ( " filament_minimal_purge_on_wipe_tower " , coFloats ) ;
def - > label = L ( " Minimal purge on wipe tower " ) ;
2018-08-06 14:31:51 +00:00
def - > tooltip = L ( " After a tool change, the exact position of the newly loaded filament inside "
" the nozzle may not be known, and the filament pressure is likely not yet stable. "
" Before purging the print head into an infill or a sacrificial object, Slic3r will always prime "
" this amount of material into the wipe tower to produce successive infill or sacrificial object extrusions reliably. " ) ;
2018-08-02 13:14:12 +00:00
def - > sidetext = L ( " mm³ " ) ;
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 15.f } ) ;
2018-08-02 13:14:12 +00:00
2018-04-24 11:02:08 +00:00
def = this - > add ( " filament_cooling_final_speed " , coFloats ) ;
def - > label = L ( " Speed of the last cooling move " ) ;
2019-05-11 21:29:25 +00:00
def - > tooltip = L ( " Cooling moves are gradually accelerating towards this speed. " ) ;
2018-04-24 11:02:08 +00:00
def - > sidetext = L ( " mm/s " ) ;
2018-03-12 14:41:25 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 3.4f } ) ;
2018-03-02 14:52:16 +00:00
2018-07-31 07:44:29 +00:00
def = this - > add ( " filament_load_time " , coFloats ) ;
def - > label = L ( " Filament load time " ) ;
def - > tooltip = L ( " Time for the printer firmware (or the Multi Material Unit 2.0) to load a new filament during a tool change (when executing the T code). This time is added to the total print time by the G-code time estimator. " ) ;
def - > sidetext = L ( " s " ) ;
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 0.0f } ) ;
2018-07-31 07:44:29 +00:00
2018-03-14 14:48:37 +00:00
def = this - > add ( " filament_ramming_parameters " , coStrings ) ;
def - > label = L ( " Ramming parameters " ) ;
2019-05-11 21:29:25 +00:00
def - > tooltip = L ( " This string is edited by RammingDialog and contains ramming specific parameters. " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionStrings { " 120 100 6.6 6.8 7.2 7.6 7.9 8.2 8.7 9.4 9.9 10.0| "
2019-08-16 14:17:37 +00:00
" 0.05 6.6 0.45 6.8 0.95 7.8 1.45 8.3 1.95 9.7 2.45 10 2.95 7.6 3.45 7.6 3.95 7.6 4.45 7.6 4.95 7.6 " } ) ;
2018-03-14 14:48:37 +00:00
2018-07-31 07:44:29 +00:00
def = this - > add ( " filament_unload_time " , coFloats ) ;
def - > label = L ( " Filament unload time " ) ;
def - > tooltip = L ( " Time for the printer firmware (or the Multi Material Unit 2.0) to unload a filament during a tool change (when executing the T code). This time is added to the total print time by the G-code time estimator. " ) ;
def - > sidetext = L ( " s " ) ;
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 0.0f } ) ;
2018-07-31 07:44:29 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " filament_diameter " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Diameter " ) ;
def - > tooltip = L ( " Enter your filament diameter here. Good precision is required, so use a caliper "
2018-02-15 16:30:33 +00:00
" and do multiple measurements along the filament, then compute the average. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2019-05-14 10:35:19 +00:00
def - > set_default_value ( new ConfigOptionFloats { 1.75 } ) ;
2017-01-16 05:56:01 +00:00
def = this - > add ( " filament_density " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Density " ) ;
def - > tooltip = L ( " Enter your filament density here. This is only for statistical information. "
2017-11-09 09:06:25 +00:00
" A decent way is to weigh a known length of filament and compute the ratio "
2018-02-15 16:30:33 +00:00
" of the length to volume. Better is to calculate the volume directly through displacement. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " g/cm³ " ) ;
2017-01-16 05:56:01 +00:00
def - > min = 0 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 0. } ) ;
2017-01-16 05:56:01 +00:00
2017-05-16 11:45:28 +00:00
def = this - > add ( " filament_type " , coStrings ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Filament type " ) ;
2018-08-17 13:42:46 +00:00
def - > tooltip = L ( " The filament material type for use in custom G-codes. " ) ;
2017-05-16 11:45:28 +00:00
def - > gui_type = " f_enum_open " ;
def - > gui_flags = " show_value " ;
def - > enum_values . push_back ( " PLA " ) ;
def - > enum_values . push_back ( " PET " ) ;
2020-02-04 13:43:58 +00:00
def - > enum_values . push_back ( " ABS " ) ;
def - > enum_values . push_back ( " ASA " ) ;
2017-05-16 11:45:28 +00:00
def - > enum_values . push_back ( " FLEX " ) ;
2019-05-17 09:46:46 +00:00
def - > enum_values . push_back ( " HIPS " ) ;
2017-05-16 11:45:28 +00:00
def - > enum_values . push_back ( " EDGE " ) ;
def - > enum_values . push_back ( " NGEN " ) ;
2019-05-17 09:46:46 +00:00
def - > enum_values . push_back ( " NYLON " ) ;
2017-05-16 11:45:28 +00:00
def - > enum_values . push_back ( " PVA " ) ;
2019-05-17 09:46:46 +00:00
def - > enum_values . push_back ( " PC " ) ;
def - > enum_values . push_back ( " PP " ) ;
def - > enum_values . push_back ( " PEI " ) ;
def - > enum_values . push_back ( " PEEK " ) ;
def - > enum_values . push_back ( " PEKK " ) ;
def - > enum_values . push_back ( " POM " ) ;
def - > enum_values . push_back ( " PSU " ) ;
def - > enum_values . push_back ( " PVDF " ) ;
def - > enum_values . push_back ( " SCAFF " ) ;
2019-01-25 15:57:19 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionStrings { " PLA " } ) ;
2017-05-16 11:45:28 +00:00
def = this - > add ( " filament_soluble " , coBools ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Soluble material " ) ;
def - > tooltip = L ( " Soluble material is most likely used for a soluble support. " ) ;
2019-01-25 15:57:19 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBools { false } ) ;
2017-05-16 11:45:28 +00:00
2017-01-16 05:56:01 +00:00
def = this - > add ( " filament_cost " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Cost " ) ;
def - > tooltip = L ( " Enter your filament cost per kg here. This is only for statistical information. " ) ;
def - > sidetext = L ( " money/kg " ) ;
2017-01-16 05:56:01 +00:00
def - > min = 0 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 0. } ) ;
2019-08-16 14:17:37 +00:00
2017-11-01 18:30:05 +00:00
def = this - > add ( " filament_settings_id " , coStrings ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionStrings { " " } ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2017-11-01 18:30:05 +00:00
2019-04-12 14:18:46 +00:00
def = this - > add ( " filament_vendor " , coString ) ;
def - > set_default_value ( new ConfigOptionString ( L ( " (Unknown) " ) ) ) ;
def - > cli = ConfigOptionDef : : nocli ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " fill_angle " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Fill angle " ) ;
def - > category = L ( " Infill " ) ;
def - > tooltip = L ( " Default base angle for infill orientation. Cross-hatching will be applied to this. "
2017-11-09 09:06:25 +00:00
" Bridges will be infilled using the best direction Slic3r can detect, so this setting "
2018-02-15 16:30:33 +00:00
" does not affect them. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " ° " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2017-07-20 11:38:10 +00:00
def - > max = 360 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 45 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " fill_density " , coPercent ) ;
def - > gui_type = " f_enum_open " ;
def - > gui_flags = " show_value " ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Fill density " ) ;
def - > category = L ( " Infill " ) ;
def - > tooltip = L ( " Density of internal infill, expressed in the range 0% - 100%. " ) ;
def - > sidetext = L ( " % " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
def - > max = 100 ;
def - > enum_values . push_back ( " 0 " ) ;
def - > enum_values . push_back ( " 5 " ) ;
def - > enum_values . push_back ( " 10 " ) ;
def - > enum_values . push_back ( " 15 " ) ;
def - > enum_values . push_back ( " 20 " ) ;
def - > enum_values . push_back ( " 25 " ) ;
def - > enum_values . push_back ( " 30 " ) ;
def - > enum_values . push_back ( " 40 " ) ;
def - > enum_values . push_back ( " 50 " ) ;
def - > enum_values . push_back ( " 60 " ) ;
def - > enum_values . push_back ( " 70 " ) ;
def - > enum_values . push_back ( " 80 " ) ;
def - > enum_values . push_back ( " 90 " ) ;
def - > enum_values . push_back ( " 100 " ) ;
def - > enum_labels . push_back ( " 0% " ) ;
def - > enum_labels . push_back ( " 5% " ) ;
def - > enum_labels . push_back ( " 10% " ) ;
def - > enum_labels . push_back ( " 15% " ) ;
def - > enum_labels . push_back ( " 20% " ) ;
def - > enum_labels . push_back ( " 25% " ) ;
def - > enum_labels . push_back ( " 30% " ) ;
def - > enum_labels . push_back ( " 40% " ) ;
def - > enum_labels . push_back ( " 50% " ) ;
def - > enum_labels . push_back ( " 60% " ) ;
def - > enum_labels . push_back ( " 70% " ) ;
def - > enum_labels . push_back ( " 80% " ) ;
def - > enum_labels . push_back ( " 90% " ) ;
def - > enum_labels . push_back ( " 100% " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionPercent ( 20 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " fill_pattern " , coEnum ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Fill pattern " ) ;
def - > category = L ( " Infill " ) ;
def - > tooltip = L ( " Fill pattern for general low-density infill. " ) ;
2017-10-17 14:01:18 +00:00
def - > enum_keys_map = & ConfigOptionEnum < InfillPattern > : : get_enum_values ( ) ;
2015-12-16 12:09:25 +00:00
def - > enum_values . push_back ( " rectilinear " ) ;
def - > enum_values . push_back ( " grid " ) ;
2016-10-21 14:53:42 +00:00
def - > enum_values . push_back ( " triangles " ) ;
2016-11-09 14:39:12 +00:00
def - > enum_values . push_back ( " stars " ) ;
2016-10-21 16:56:55 +00:00
def - > enum_values . push_back ( " cubic " ) ;
2015-12-16 12:09:25 +00:00
def - > enum_values . push_back ( " line " ) ;
def - > enum_values . push_back ( " concentric " ) ;
def - > enum_values . push_back ( " honeycomb " ) ;
def - > enum_values . push_back ( " 3dhoneycomb " ) ;
2018-02-22 08:56:05 +00:00
def - > enum_values . push_back ( " gyroid " ) ;
2015-12-16 12:09:25 +00:00
def - > enum_values . push_back ( " hilbertcurve " ) ;
def - > enum_values . push_back ( " archimedeanchords " ) ;
def - > enum_values . push_back ( " octagramspiral " ) ;
2018-06-20 12:20:48 +00:00
def - > enum_labels . push_back ( L ( " Rectilinear " ) ) ;
def - > enum_labels . push_back ( L ( " Grid " ) ) ;
def - > enum_labels . push_back ( L ( " Triangles " ) ) ;
def - > enum_labels . push_back ( L ( " Stars " ) ) ;
def - > enum_labels . push_back ( L ( " Cubic " ) ) ;
def - > enum_labels . push_back ( L ( " Line " ) ) ;
def - > enum_labels . push_back ( L ( " Concentric " ) ) ;
def - > enum_labels . push_back ( L ( " Honeycomb " ) ) ;
def - > enum_labels . push_back ( L ( " 3D Honeycomb " ) ) ;
def - > enum_labels . push_back ( L ( " Gyroid " ) ) ;
def - > enum_labels . push_back ( L ( " Hilbert Curve " ) ) ;
def - > enum_labels . push_back ( L ( " Archimedean Chords " ) ) ;
def - > enum_labels . push_back ( L ( " Octagram Spiral " ) ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionEnum < InfillPattern > ( ipStars ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " first_layer_acceleration " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " First layer " ) ;
def - > tooltip = L ( " This is the acceleration your printer will use for first layer. Set zero "
2018-02-15 16:30:33 +00:00
" to disable acceleration control for first layer. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm/s² " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2015-12-16 12:09:25 +00:00
2017-06-21 14:15:39 +00:00
def = this - > add ( " first_layer_bed_temperature " , coInts ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " First layer " ) ;
2020-04-13 15:55:38 +00:00
def - > full_label = L ( " First layer bed temperature " ) ;
2018-02-23 08:16:35 +00:00
def - > tooltip = L ( " Heated build plate temperature for the first layer. Set this to zero to disable "
2018-02-15 16:30:33 +00:00
" bed temperature control commands in the output. " ) ;
2020-04-13 15:55:38 +00:00
def - > sidetext = L ( " °C " ) ;
2015-12-16 12:09:25 +00:00
def - > max = 0 ;
def - > max = 300 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInts { 0 } ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " first_layer_extrusion_width " , coFloatOrPercent ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " First layer " ) ;
def - > category = L ( " Extrusion Width " ) ;
def - > tooltip = L ( " Set this to a non-zero value to set a manual extrusion width for first layer. "
2017-11-09 09:06:25 +00:00
" You can use this to force fatter extrudates for better adhesion. If expressed "
" as percentage (for example 120%) it will be computed over first layer height. "
2018-02-15 16:30:33 +00:00
" If set to zero, it will use the default extrusion width. " ) ;
2019-05-14 10:15:48 +00:00
def - > sidetext = L ( " mm or % " ) ;
2015-12-16 12:09:25 +00:00
def - > ratio_over = " first_layer_height " ;
2019-10-18 09:53:19 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloatOrPercent ( 200 , true ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " first_layer_height " , coFloatOrPercent ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " First layer height " ) ;
def - > category = L ( " Layers and Perimeters " ) ;
def - > tooltip = L ( " When printing with very low layer heights, you might still want to print a thicker "
2017-11-09 09:06:25 +00:00
" bottom layer to improve adhesion and tolerance for non perfect build plates. "
" This can be expressed as an absolute value or as a percentage (for example: 150%) "
2018-02-15 16:30:33 +00:00
" over the default layer height. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm or % " ) ;
2015-12-16 12:09:25 +00:00
def - > ratio_over = " layer_height " ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloatOrPercent ( 0.35 , false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " first_layer_speed " , coFloatOrPercent ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " First layer speed " ) ;
def - > tooltip = L ( " If expressed as absolute value in mm/s, this speed will be applied to all the print moves "
2017-11-09 09:06:25 +00:00
" of the first layer, regardless of their type. If expressed as a percentage "
2018-02-15 16:30:33 +00:00
" (for example: 40%) it will scale the default speeds. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm/s or % " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloatOrPercent ( 30 , false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " first_layer_temperature " , coInts ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " First layer " ) ;
2020-04-13 15:55:38 +00:00
def - > full_label = L ( " First layer extruder temperature " ) ;
2018-02-23 08:16:35 +00:00
def - > tooltip = L ( " Extruder temperature for first layer. If you want to control temperature manually "
2018-02-15 16:30:33 +00:00
" during print, set this to zero to disable temperature control commands in the output file. " ) ;
2020-04-13 15:55:38 +00:00
def - > sidetext = L ( " °C " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2017-12-12 12:43:36 +00:00
def - > max = max_temp ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInts { 200 } ) ;
2019-08-16 14:17:37 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " gap_fill_speed " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Gap fill " ) ;
def - > category = L ( " Speed " ) ;
def - > tooltip = L ( " Speed for filling small gaps using short zigzag moves. Keep this reasonably low "
2018-02-15 16:30:33 +00:00
" to avoid too much shaking and resonance issues. Set zero to disable gaps filling. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm/s " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2019-01-25 15:57:19 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 20 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " gcode_comments " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Verbose G-code " ) ;
def - > tooltip = L ( " Enable this to get a commented G-code file, with each line explained by a descriptive text. "
2017-11-09 09:06:25 +00:00
" If you print from SD card, the additional weight of the file could make your firmware "
2018-02-15 16:30:33 +00:00
" slow down. " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( 0 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " gcode_flavor " , coEnum ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " G-code flavor " ) ;
def - > tooltip = L ( " Some G/M-code commands, including temperature control and others, are not universal. "
2017-11-09 09:06:25 +00:00
" Set this option to your printer's firmware to get a compatible output. "
2019-08-27 09:39:51 +00:00
" The \" No extrusion \" flavor prevents PrusaSlicer from exporting any extrusion value at all. " ) ;
2017-10-17 14:01:18 +00:00
def - > enum_keys_map = & ConfigOptionEnum < GCodeFlavor > : : get_enum_values ( ) ;
2015-12-16 12:09:25 +00:00
def - > enum_values . push_back ( " reprap " ) ;
2016-07-16 14:52:11 +00:00
def - > enum_values . push_back ( " repetier " ) ;
2015-12-16 12:09:25 +00:00
def - > enum_values . push_back ( " teacup " ) ;
def - > enum_values . push_back ( " makerware " ) ;
2018-01-06 17:49:28 +00:00
def - > enum_values . push_back ( " marlin " ) ;
2015-12-16 12:09:25 +00:00
def - > enum_values . push_back ( " sailfish " ) ;
def - > enum_values . push_back ( " mach3 " ) ;
def - > enum_values . push_back ( " machinekit " ) ;
2016-07-16 14:52:11 +00:00
def - > enum_values . push_back ( " smoothie " ) ;
2015-12-16 12:09:25 +00:00
def - > enum_values . push_back ( " no-extrusion " ) ;
2018-01-06 17:49:28 +00:00
def - > enum_labels . push_back ( " RepRap/Sprinter " ) ;
2016-07-16 14:52:11 +00:00
def - > enum_labels . push_back ( " Repetier " ) ;
2015-12-16 12:09:25 +00:00
def - > enum_labels . push_back ( " Teacup " ) ;
def - > enum_labels . push_back ( " MakerWare (MakerBot) " ) ;
2018-01-06 17:49:28 +00:00
def - > enum_labels . push_back ( " Marlin " ) ;
2015-12-16 12:09:25 +00:00
def - > enum_labels . push_back ( " Sailfish (MakerBot) " ) ;
def - > enum_labels . push_back ( " Mach3/LinuxCNC " ) ;
def - > enum_labels . push_back ( " Machinekit " ) ;
2016-07-16 14:52:11 +00:00
def - > enum_labels . push_back ( " Smoothie " ) ;
2018-06-20 12:20:48 +00:00
def - > enum_labels . push_back ( L ( " No extrusion " ) ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionEnum < GCodeFlavor > ( gcfRepRap ) ) ;
2015-12-16 12:09:25 +00:00
2019-01-31 14:09:16 +00:00
def = this - > add ( " gcode_label_objects " , coBool ) ;
2019-05-04 00:07:07 +00:00
def - > label = L ( " Label objects " ) ;
def - > tooltip = L ( " Enable this to add comments into the G-Code labeling print moves with what object they belong to, "
2019-01-31 14:09:16 +00:00
" which is useful for the Octoprint CancelObject plugin. This settings is NOT compatible with "
2019-05-04 00:07:07 +00:00
" Single Extruder Multi Material setup and Wipe into Object / Wipe into Infill. " ) ;
2019-01-31 14:09:16 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( 0 ) ) ;
2019-01-31 14:09:16 +00:00
2018-12-14 19:09:10 +00:00
def = this - > add ( " high_current_on_filament_swap " , coBool ) ;
def - > label = L ( " High extruder current on filament swap " ) ;
def - > tooltip = L ( " It may be beneficial to increase the extruder motor current during the filament exchange "
" sequence to allow for rapid ramming feed rates and to overcome resistance when loading "
" a filament with an ugly shaped tip. " ) ;
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( 0 ) ) ;
2018-12-14 19:09:10 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " infill_acceleration " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Infill " ) ;
def - > tooltip = L ( " This is the acceleration your printer will use for infill. Set zero to disable "
2018-02-15 16:30:33 +00:00
" acceleration control for infill. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm/s² " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " infill_every_layers " , coInt ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Combine infill every " ) ;
def - > category = L ( " Infill " ) ;
def - > tooltip = L ( " This feature allows to combine infill and speed up your print by extruding thicker "
2018-02-15 16:30:33 +00:00
" infill layers while preserving thin perimeters, thus accuracy. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " layers " ) ;
def - > full_label = L ( " Combine infill every n layers " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 1 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 1 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " infill_extruder " , coInt ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Infill extruder " ) ;
def - > category = L ( " Extruders " ) ;
def - > tooltip = L ( " The extruder to use when printing infill. " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 1 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 1 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " infill_extrusion_width " , coFloatOrPercent ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Infill " ) ;
def - > category = L ( " Extrusion Width " ) ;
def - > tooltip = L ( " Set this to a non-zero value to set a manual extrusion width for infill. "
2017-11-09 09:48:06 +00:00
" If left zero, default extrusion width will be used if set, otherwise 1.125 x nozzle diameter will be used. "
2017-11-09 09:06:25 +00:00
" You may want to use fatter extrudates to speed up the infill and make your parts stronger. "
2018-02-15 16:30:33 +00:00
" If expressed as percentage (for example 90%) it will be computed over layer height. " ) ;
2019-05-14 10:15:48 +00:00
def - > sidetext = L ( " mm or % " ) ;
2019-10-18 09:53:19 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloatOrPercent ( 0 , false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " infill_first " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Infill before perimeters " ) ;
def - > tooltip = L ( " This option will switch the print order of perimeters and infill, making the latter first. " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " infill_only_where_needed " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Only infill where needed " ) ;
def - > category = L ( " Infill " ) ;
def - > tooltip = L ( " This option will limit infill to the areas actually needed for supporting ceilings "
2017-11-09 09:06:25 +00:00
" (it will act as internal support material). If enabled, slows down the G-code generation "
2018-02-15 16:30:33 +00:00
" due to the multiple checks involved. " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " infill_overlap " , coFloatOrPercent ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Infill/perimeters overlap " ) ;
def - > category = L ( " Advanced " ) ;
def - > tooltip = L ( " This setting applies an additional overlap between infill and perimeters for better bonding. "
2017-11-09 09:06:25 +00:00
" Theoretically this shouldn't be needed, but backlash might cause gaps. If expressed "
2018-02-15 16:30:33 +00:00
" as percentage (example: 15%) it is calculated over perimeter extrusion width. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm or % " ) ;
2015-12-16 12:09:25 +00:00
def - > ratio_over = " perimeter_extrusion_width " ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloatOrPercent ( 25 , true ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " infill_speed " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Infill " ) ;
def - > category = L ( " Speed " ) ;
def - > tooltip = L ( " Speed for printing the internal fill. Set to zero for auto. " ) ;
def - > sidetext = L ( " mm/s " ) ;
2018-09-17 13:12:13 +00:00
def - > aliases = { " print_feed_rate " , " infill_feed_rate " } ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2019-01-25 15:57:19 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 80 ) ) ;
2015-12-16 12:09:25 +00:00
2018-03-09 15:37:33 +00:00
def = this - > add ( " inherits " , coString ) ;
def - > label = L ( " Inherits profile " ) ;
def - > tooltip = L ( " Name of the profile, from which this profile inherits. " ) ;
def - > full_width = true ;
2019-04-13 21:46:52 +00:00
def - > height = 5 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2018-06-28 18:13:01 +00:00
// The following value is to be stored into the project file (AMF, 3MF, Config ...)
// and it contains a sum of "inherits" values over the print and filament profiles.
def = this - > add ( " inherits_cummulative " , coStrings ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionStrings ( ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2018-03-09 15:37:33 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " interface_shells " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Interface shells " ) ;
def - > tooltip = L ( " Force the generation of solid shells between adjacent materials/volumes. "
2017-11-09 09:06:25 +00:00
" Useful for multi-extruder prints with translucent materials or manual soluble "
2018-02-15 16:30:33 +00:00
" support material. " ) ;
2018-02-23 08:16:35 +00:00
def - > category = L ( " Layers and Perimeters " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2015-12-16 12:09:25 +00:00
2020-04-14 09:53:28 +00:00
def = this - > add ( " ironing " , coBool ) ;
def - > label = L ( " Enable ironing " ) ;
def - > tooltip = L ( " Enable ironing of the top layers with the hot print head for smooth surface " ) ;
def - > category = L ( " Ironing " ) ;
def - > mode = comAdvanced ;
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
def = this - > add ( " ironing_type " , coEnum ) ;
2020-05-10 16:07:40 +00:00
def - > label = L ( " Ironing Type " ) ;
2020-05-13 14:12:58 +00:00
def - > category = L ( " Ironing " ) ;
2020-05-10 16:07:40 +00:00
def - > tooltip = L ( " Ironing Type " ) ;
2020-04-14 09:53:28 +00:00
def - > enum_keys_map = & ConfigOptionEnum < IroningType > : : get_enum_values ( ) ;
def - > enum_values . push_back ( " top " ) ;
def - > enum_values . push_back ( " topmost " ) ;
def - > enum_values . push_back ( " solid " ) ;
def - > enum_labels . push_back ( " All top surfaces " ) ;
def - > enum_labels . push_back ( " Topmost surface only " ) ;
def - > enum_labels . push_back ( " All solid surfaces " ) ;
def - > mode = comAdvanced ;
def - > set_default_value ( new ConfigOptionEnum < IroningType > ( IroningType : : TopSurfaces ) ) ;
def = this - > add ( " ironing_flowrate " , coPercent ) ;
def - > label = L ( " Flow rate " ) ;
def - > category = L ( " Ironing " ) ;
def - > tooltip = L ( " Percent of a flow rate relative to object's normal layer height. " ) ;
def - > sidetext = L ( " % " ) ;
def - > ratio_over = " layer_height " ;
def - > min = 0 ;
def - > mode = comExpert ;
def - > set_default_value ( new ConfigOptionPercent ( 15 ) ) ;
def = this - > add ( " ironing_spacing " , coFloat ) ;
def - > label = L ( " Spacing between ironing passes " ) ;
2020-05-13 14:12:58 +00:00
def - > category = L ( " Ironing " ) ;
2020-07-20 11:31:39 +00:00
def - > tooltip = L ( " Distance between ironing lines " ) ;
2020-04-14 09:53:28 +00:00
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
def - > mode = comExpert ;
def - > set_default_value ( new ConfigOptionFloat ( 0.1 ) ) ;
def = this - > add ( " ironing_speed " , coFloat ) ;
def - > label = L ( " Ironing speed " ) ;
def - > category = L ( " Speed " ) ;
def - > tooltip = L ( " Ironing speed " ) ;
def - > sidetext = L ( " mm/s " ) ;
def - > min = 0 ;
def - > mode = comAdvanced ;
2020-04-28 15:19:11 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 15 ) ) ;
2020-04-14 09:53:28 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " layer_gcode " , coString ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " After layer change G-code " ) ;
def - > tooltip = L ( " This custom code is inserted at every layer change, right after the Z move "
2017-11-09 09:06:25 +00:00
" and before the extruder moves to the first layer point. Note that you can use "
2018-02-15 16:30:33 +00:00
" placeholder variables for all Slic3r settings as well as [layer_num] and [layer_z]. " ) ;
2019-03-13 18:17:26 +00:00
def - > cli = " after-layer-gcode|layer-gcode " ;
2015-12-16 12:09:25 +00:00
def - > multiline = true ;
def - > full_width = true ;
2019-04-13 21:46:52 +00:00
def - > height = 5 ;
2018-10-21 21:09:24 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2015-12-16 12:09:25 +00:00
2018-08-04 15:38:25 +00:00
def = this - > add ( " remaining_times " , coBool ) ;
def - > label = L ( " Supports remaining times " ) ;
2018-08-17 13:42:46 +00:00
def - > tooltip = L ( " Emit M73 P[percent printed] R[remaining time in minutes] at 1 minute "
2018-08-04 15:38:25 +00:00
" intervals into the G-code to let the firmware show accurate remaining time. "
" As of now only the Prusa i3 MK3 firmware recognizes M73. "
" Also the i3 MK3 firmware supports M73 Qxx Sxx for the silent mode. " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2018-08-04 15:38:25 +00:00
2019-08-16 14:17:37 +00:00
def = this - > add ( " silent_mode " , coBool ) ;
def - > label = L ( " Supports stealth mode " ) ;
def - > tooltip = L ( " The firmware supports stealth mode " ) ;
def - > mode = comExpert ;
def - > set_default_value ( new ConfigOptionBool ( true ) ) ;
{
struct AxisDefault {
std : : string name ;
std : : vector < double > max_feedrate ;
std : : vector < double > max_acceleration ;
std : : vector < double > max_jerk ;
} ;
std : : vector < AxisDefault > axes {
// name, max_feedrate, max_acceleration, max_jerk
{ " x " , { 500. , 200. } , { 9000. , 1000. } , { 10. , 10. } } ,
{ " y " , { 500. , 200. } , { 9000. , 1000. } , { 10. , 10. } } ,
{ " z " , { 12. , 12. } , { 500. , 200. } , { 0.2 , 0.4 } } ,
{ " e " , { 120. , 120. } , { 10000. , 5000. } , { 2.5 , 2.5 } }
} ;
for ( const AxisDefault & axis : axes ) {
std : : string axis_upper = boost : : to_upper_copy < std : : string > ( axis . name ) ;
// Add the machine feedrate limits for XYZE axes. (M203)
def = this - > add ( " machine_max_feedrate_ " + axis . name , coFloats ) ;
def - > full_label = ( boost : : format ( " Maximum feedrate %1% " ) % axis_upper ) . str ( ) ;
( void ) L ( " Maximum feedrate X " ) ;
( void ) L ( " Maximum feedrate Y " ) ;
( void ) L ( " Maximum feedrate Z " ) ;
( void ) L ( " Maximum feedrate E " ) ;
def - > category = L ( " Machine limits " ) ;
def - > tooltip = ( boost : : format ( " Maximum feedrate of the %1% axis " ) % axis_upper ) . str ( ) ;
( void ) L ( " Maximum feedrate of the X axis " ) ;
( void ) L ( " Maximum feedrate of the Y axis " ) ;
( void ) L ( " Maximum feedrate of the Z axis " ) ;
( void ) L ( " Maximum feedrate of the E axis " ) ;
def - > sidetext = L ( " mm/s " ) ;
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-08-16 14:17:37 +00:00
def - > set_default_value ( new ConfigOptionFloats ( axis . max_feedrate ) ) ;
// Add the machine acceleration limits for XYZE axes (M201)
def = this - > add ( " machine_max_acceleration_ " + axis . name , coFloats ) ;
def - > full_label = ( boost : : format ( " Maximum acceleration %1% " ) % axis_upper ) . str ( ) ;
( void ) L ( " Maximum acceleration X " ) ;
( void ) L ( " Maximum acceleration Y " ) ;
( void ) L ( " Maximum acceleration Z " ) ;
( void ) L ( " Maximum acceleration E " ) ;
def - > category = L ( " Machine limits " ) ;
def - > tooltip = ( boost : : format ( " Maximum acceleration of the %1% axis " ) % axis_upper ) . str ( ) ;
( void ) L ( " Maximum acceleration of the X axis " ) ;
( void ) L ( " Maximum acceleration of the Y axis " ) ;
( void ) L ( " Maximum acceleration of the Z axis " ) ;
( void ) L ( " Maximum acceleration of the E axis " ) ;
def - > sidetext = L ( " mm/s² " ) ;
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-08-16 14:17:37 +00:00
def - > set_default_value ( new ConfigOptionFloats ( axis . max_acceleration ) ) ;
// Add the machine jerk limits for XYZE axes (M205)
def = this - > add ( " machine_max_jerk_ " + axis . name , coFloats ) ;
def - > full_label = ( boost : : format ( " Maximum jerk %1% " ) % axis_upper ) . str ( ) ;
( void ) L ( " Maximum jerk X " ) ;
( void ) L ( " Maximum jerk Y " ) ;
( void ) L ( " Maximum jerk Z " ) ;
( void ) L ( " Maximum jerk E " ) ;
def - > category = L ( " Machine limits " ) ;
def - > tooltip = ( boost : : format ( " Maximum jerk of the %1% axis " ) % axis_upper ) . str ( ) ;
( void ) L ( " Maximum jerk of the X axis " ) ;
( void ) L ( " Maximum jerk of the Y axis " ) ;
( void ) L ( " Maximum jerk of the Z axis " ) ;
( void ) L ( " Maximum jerk of the E axis " ) ;
def - > sidetext = L ( " mm/s " ) ;
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-08-16 14:17:37 +00:00
def - > set_default_value ( new ConfigOptionFloats ( axis . max_jerk ) ) ;
}
}
2018-06-20 11:57:37 +00:00
// M205 S... [mm/sec]
def = this - > add ( " machine_min_extruding_rate " , coFloats ) ;
2018-06-21 14:15:56 +00:00
def - > full_label = L ( " Minimum feedrate when extruding " ) ;
2018-06-20 11:57:37 +00:00
def - > category = L ( " Machine limits " ) ;
2019-05-09 12:15:56 +00:00
def - > tooltip = L ( " Minimum feedrate when extruding (M205 S) " ) ;
2018-06-20 11:57:37 +00:00
def - > sidetext = L ( " mm/s " ) ;
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-08-16 14:17:37 +00:00
def - > set_default_value ( new ConfigOptionFloats { 0. , 0. } ) ;
2018-06-20 11:57:37 +00:00
// M205 T... [mm/sec]
def = this - > add ( " machine_min_travel_rate " , coFloats ) ;
2018-06-21 14:15:56 +00:00
def - > full_label = L ( " Minimum travel feedrate " ) ;
2018-06-20 11:57:37 +00:00
def - > category = L ( " Machine limits " ) ;
2019-05-09 12:15:56 +00:00
def - > tooltip = L ( " Minimum travel feedrate (M205 T) " ) ;
2018-06-20 11:57:37 +00:00
def - > sidetext = L ( " mm/s " ) ;
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-08-16 14:17:37 +00:00
def - > set_default_value ( new ConfigOptionFloats { 0. , 0. } ) ;
2018-06-20 11:57:37 +00:00
// M204 S... [mm/sec^2]
def = this - > add ( " machine_max_acceleration_extruding " , coFloats ) ;
2018-06-21 14:15:56 +00:00
def - > full_label = L ( " Maximum acceleration when extruding " ) ;
2018-06-20 11:57:37 +00:00
def - > category = L ( " Machine limits " ) ;
2019-05-09 12:15:56 +00:00
def - > tooltip = L ( " Maximum acceleration when extruding (M204 S) " ) ;
2018-06-20 11:57:37 +00:00
def - > sidetext = L ( " mm/s² " ) ;
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 1500. , 1250. } ) ;
2018-06-20 11:57:37 +00:00
// M204 T... [mm/sec^2]
def = this - > add ( " machine_max_acceleration_retracting " , coFloats ) ;
2018-06-21 14:15:56 +00:00
def - > full_label = L ( " Maximum acceleration when retracting " ) ;
2018-06-20 11:57:37 +00:00
def - > category = L ( " Machine limits " ) ;
2019-05-09 12:15:56 +00:00
def - > tooltip = L ( " Maximum acceleration when retracting (M204 T) " ) ;
2018-06-20 11:57:37 +00:00
def - > sidetext = L ( " mm/s² " ) ;
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 1500. , 1250. } ) ;
2018-06-20 11:57:37 +00:00
2017-06-21 14:15:39 +00:00
def = this - > add ( " max_fan_speed " , coInts ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Max " ) ;
def - > tooltip = L ( " This setting represents the maximum speed of your fan. " ) ;
def - > sidetext = L ( " % " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
def - > max = 100 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInts { 100 } ) ;
2015-12-16 12:09:25 +00:00
2017-02-07 17:46:02 +00:00
def = this - > add ( " max_layer_height " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Max " ) ;
def - > tooltip = L ( " This is the highest printable layer height for this extruder, used to cap "
2017-11-09 09:06:25 +00:00
" the variable layer height and support layer height. Maximum recommended layer height "
" is 75% of the extrusion width to achieve reasonable inter-layer adhesion. "
2018-02-15 16:30:33 +00:00
" If set to 0, layer height is limited to 75% of the nozzle diameter. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm " ) ;
2017-02-07 17:46:02 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 0. } ) ;
2017-02-07 17:46:02 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " max_print_speed " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Max print speed " ) ;
def - > tooltip = L ( " When setting other speed settings to 0 Slic3r will autocalculate the optimal speed "
2017-11-09 09:06:25 +00:00
" in order to keep constant extruder pressure. This experimental setting is used "
2018-02-15 16:30:33 +00:00
" to set the highest print speed you want to allow. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm/s " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 1 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 80 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " max_volumetric_speed " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Max volumetric speed " ) ;
def - > tooltip = L ( " This experimental setting is used to set the maximum volumetric speed your "
2018-02-15 16:30:33 +00:00
" extruder supports. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm³/s " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2015-12-16 12:09:25 +00:00
2019-01-29 17:07:45 +00:00
# ifdef HAS_PRESSURE_EQUALIZER
2016-09-13 13:02:28 +00:00
def = this - > add ( " max_volumetric_extrusion_rate_slope_positive " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Max volumetric slope positive " ) ;
def - > tooltip = L ( " This experimental setting is used to limit the speed of change in extrusion rate. "
2018-02-19 14:32:22 +00:00
" A value of 1.8 mm³/s² ensures, that a change from the extrusion rate "
" of 1.8 mm³/s (0.45mm extrusion width, 0.2mm extrusion height, feedrate 20 mm/s) "
" to 5.4 mm³/s (feedrate 60 mm/s) will take at least 2 seconds. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm³/s² " ) ;
2016-09-13 13:02:28 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2016-09-13 13:02:28 +00:00
def = this - > add ( " max_volumetric_extrusion_rate_slope_negative " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Max volumetric slope negative " ) ;
def - > tooltip = L ( " This experimental setting is used to limit the speed of change in extrusion rate. "
2018-02-19 14:32:22 +00:00
" A value of 1.8 mm³/s² ensures, that a change from the extrusion rate "
" of 1.8 mm³/s (0.45mm extrusion width, 0.2mm extrusion height, feedrate 20 mm/s) "
" to 5.4 mm³/s (feedrate 60 mm/s) will take at least 2 seconds. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm³/s² " ) ;
2016-09-13 13:02:28 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2019-01-29 17:07:45 +00:00
# endif /* HAS_PRESSURE_EQUALIZER */
2016-09-13 13:02:28 +00:00
2017-06-21 14:15:39 +00:00
def = this - > add ( " min_fan_speed " , coInts ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Min " ) ;
def - > tooltip = L ( " This setting represents the minimum PWM your fan needs to work. " ) ;
def - > sidetext = L ( " % " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
def - > max = 100 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInts { 35 } ) ;
2015-12-16 12:09:25 +00:00
2017-02-07 17:46:02 +00:00
def = this - > add ( " min_layer_height " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Min " ) ;
def - > tooltip = L ( " This is the lowest printable layer height for this extruder and limits "
2018-02-15 16:30:33 +00:00
" the resolution for variable layer height. Typical values are between 0.05 mm and 0.1 mm. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm " ) ;
2017-02-07 17:46:02 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 0.07 } ) ;
2017-02-07 17:46:02 +00:00
2017-06-21 14:15:39 +00:00
def = this - > add ( " min_print_speed " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Min print speed " ) ;
def - > tooltip = L ( " Slic3r will not scale speed down below this speed. " ) ;
def - > sidetext = L ( " mm/s " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 10. } ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " min_skirt_length " , coFloat ) ;
2018-06-04 10:13:07 +00:00
def - > label = L ( " Minimal filament extrusion length " ) ;
2018-02-23 08:16:35 +00:00
def - > tooltip = L ( " Generate no less than the number of skirt loops required to consume "
2017-11-09 09:06:25 +00:00
" the specified amount of filament on the bottom layer. For multi-extruder machines, "
2018-02-15 16:30:33 +00:00
" this minimum applies to each extruder. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " notes " , coString ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Configuration notes " ) ;
def - > tooltip = L ( " You can put here your personal notes. This text will be added to the G-code "
2018-02-15 16:30:33 +00:00
" header comments. " ) ;
2015-12-16 12:09:25 +00:00
def - > multiline = true ;
def - > full_width = true ;
2019-04-13 21:46:52 +00:00
def - > height = 13 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " nozzle_diameter " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Nozzle diameter " ) ;
def - > tooltip = L ( " This is the diameter of your extruder nozzle (for example: 0.5, 0.35 etc.) " ) ;
def - > sidetext = L ( " mm " ) ;
2019-05-14 10:35:19 +00:00
def - > set_default_value ( new ConfigOptionFloats { 0.4 } ) ;
2014-06-11 20:04:19 +00:00
2018-07-08 12:32:48 +00:00
def = this - > add ( " host_type " , coEnum ) ;
def - > label = L ( " Host Type " ) ;
def - > tooltip = L ( " Slic3r can upload G-code files to a printer host. This field must contain "
" the kind of the host. " ) ;
def - > enum_keys_map = & ConfigOptionEnum < PrintHostType > : : get_enum_values ( ) ;
def - > enum_values . push_back ( " octoprint " ) ;
def - > enum_values . push_back ( " duet " ) ;
2019-05-07 17:51:14 +00:00
def - > enum_values . push_back ( " flashair " ) ;
2019-12-28 17:41:48 +00:00
def - > enum_values . push_back ( " astrobox " ) ;
2018-07-08 12:32:48 +00:00
def - > enum_labels . push_back ( " OctoPrint " ) ;
def - > enum_labels . push_back ( " Duet " ) ;
2019-05-07 17:51:14 +00:00
def - > enum_labels . push_back ( " FlashAir " ) ;
2020-01-20 15:57:40 +00:00
def - > enum_labels . push_back ( " AstroBox " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionEnum < PrintHostType > ( htOctoPrint ) ) ;
2018-07-08 12:32:48 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " only_retract_when_crossing_perimeters " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Only retract when crossing perimeters " ) ;
def - > tooltip = L ( " Disables retraction when the travel path does not exceed the upper layer's perimeters "
2018-02-15 16:30:33 +00:00
" (and thus any ooze will be probably invisible). " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( true ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " ooze_prevention " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Enable " ) ;
def - > tooltip = L ( " This option will drop the temperature of the inactive extruders to prevent oozing. "
2017-11-09 09:06:25 +00:00
" It will enable a tall skirt automatically and move extruders outside such "
2018-02-15 16:30:33 +00:00
" skirt when changing temperatures. " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " output_filename_format " , coString ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Output filename format " ) ;
def - > tooltip = L ( " You can use all configuration options as variables inside this template. "
2017-11-09 09:06:25 +00:00
" For example: [layer_height], [fill_density] etc. You can also use [timestamp], "
" [year], [month], [day], [hour], [minute], [second], [version], [input_filename], "
2018-02-15 16:30:33 +00:00
" [input_filename_base]. " ) ;
2015-12-16 12:09:25 +00:00
def - > full_width = true ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-16 13:55:26 +00:00
def - > set_default_value ( new ConfigOptionString ( " [input_filename_base].gcode " ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " overhangs " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Detect bridging perimeters " ) ;
def - > category = L ( " Layers and Perimeters " ) ;
def - > tooltip = L ( " Experimental option to adjust flow for overhangs (bridge flow will be used), "
2018-02-15 16:30:33 +00:00
" to apply bridge speed to them and enable fan. " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( true ) ) ;
2015-12-16 12:09:25 +00:00
2018-03-01 15:15:00 +00:00
def = this - > add ( " parking_pos_retraction " , coFloat ) ;
2018-03-09 14:10:15 +00:00
def - > label = L ( " Filament parking position " ) ;
2018-04-12 14:13:59 +00:00
def - > tooltip = L ( " Distance of the extruder tip from the position where the filament is parked "
2019-05-11 21:29:25 +00:00
" when unloaded. This should match the value in printer firmware. " ) ;
2018-03-09 14:10:15 +00:00
def - > sidetext = L ( " mm " ) ;
2018-03-01 15:15:00 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 92.f ) ) ;
2018-03-01 15:15:00 +00:00
2018-04-16 12:26:57 +00:00
def = this - > add ( " extra_loading_move " , coFloat ) ;
def - > label = L ( " Extra loading distance " ) ;
def - > tooltip = L ( " When set to zero, the distance the filament is moved from parking position during load "
" is exactly the same as it was moved back during unload. When positive, it is loaded further, "
2019-05-11 21:29:25 +00:00
" if negative, the loading move is shorter than unloading. " ) ;
2018-04-16 12:26:57 +00:00
def - > sidetext = L ( " mm " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( - 2.f ) ) ;
2018-04-16 12:26:57 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " perimeter_acceleration " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Perimeters " ) ;
def - > tooltip = L ( " This is the acceleration your printer will use for perimeters. "
2017-11-09 09:06:25 +00:00
" A high value like 9000 usually gives good results if your hardware is up to the job. "
2018-02-15 16:30:33 +00:00
" Set zero to disable acceleration control for perimeters. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm/s² " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " perimeter_extruder " , coInt ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Perimeter extruder " ) ;
def - > category = L ( " Extruders " ) ;
def - > tooltip = L ( " The extruder to use when printing perimeters and brim. First extruder is 1. " ) ;
2018-09-17 13:12:13 +00:00
def - > aliases = { " perimeters_extruder " } ;
2015-12-16 12:09:25 +00:00
def - > min = 1 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 1 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " perimeter_extrusion_width " , coFloatOrPercent ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Perimeters " ) ;
def - > category = L ( " Extrusion Width " ) ;
def - > tooltip = L ( " Set this to a non-zero value to set a manual extrusion width for perimeters. "
2017-11-09 09:06:25 +00:00
" You may want to use thinner extrudates to get more accurate surfaces. "
2017-11-09 09:48:06 +00:00
" If left zero, default extrusion width will be used if set, otherwise 1.125 x nozzle diameter will be used. "
2018-02-15 16:30:33 +00:00
" If expressed as percentage (for example 200%) it will be computed over layer height. " ) ;
2019-05-14 10:15:48 +00:00
def - > sidetext = L ( " mm or % " ) ;
2018-09-17 13:12:13 +00:00
def - > aliases = { " perimeters_extrusion_width " } ;
2019-10-18 09:53:19 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloatOrPercent ( 0 , false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " perimeter_speed " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Perimeters " ) ;
def - > category = L ( " Speed " ) ;
def - > tooltip = L ( " Speed for perimeters (contours, aka vertical shells). Set to zero for auto. " ) ;
def - > sidetext = L ( " mm/s " ) ;
2018-09-17 13:12:13 +00:00
def - > aliases = { " perimeter_feed_rate " } ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2019-01-25 15:57:19 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 60 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " perimeters " , coInt ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Perimeters " ) ;
def - > category = L ( " Layers and Perimeters " ) ;
def - > tooltip = L ( " This option sets the number of perimeters to generate for each layer. "
2017-11-09 09:06:25 +00:00
" Note that Slic3r may increase this number automatically when it detects "
" sloping surfaces which benefit from a higher number of perimeters "
2018-02-15 16:30:33 +00:00
" if the Extra Perimeters option is enabled. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " (minimum) " ) ;
2018-09-17 13:12:13 +00:00
def - > aliases = { " perimeter_offsets " } ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2019-03-21 13:56:20 +00:00
def - > max = 10000 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 3 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " post_process " , coStrings ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Post-processing scripts " ) ;
def - > tooltip = L ( " If you want to process the output G-code through custom scripts, "
2017-11-09 09:06:25 +00:00
" just list their absolute paths here. Separate multiple scripts with a semicolon. "
" Scripts will be passed the absolute path to the G-code file as the first argument, "
2018-02-15 16:30:33 +00:00
" and they can access the Slic3r config settings by reading environment variables. " ) ;
2015-12-16 12:09:25 +00:00
def - > gui_flags = " serialized " ;
def - > multiline = true ;
def - > full_width = true ;
2019-08-16 14:17:37 +00:00
def - > height = 6 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-08-16 14:17:37 +00:00
def - > set_default_value ( new ConfigOptionStrings ( ) ) ;
2015-12-16 12:09:25 +00:00
2018-03-09 15:37:33 +00:00
def = this - > add ( " printer_model " , coString ) ;
def - > label = L ( " Printer type " ) ;
def - > tooltip = L ( " Type of the printer. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2015-12-16 12:09:25 +00:00
2017-05-05 09:59:51 +00:00
def = this - > add ( " printer_notes " , coString ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Printer notes " ) ;
def - > tooltip = L ( " You can put your notes regarding the printer here. " ) ;
2017-05-05 09:59:51 +00:00
def - > multiline = true ;
def - > full_width = true ;
2019-04-13 21:46:52 +00:00
def - > height = 13 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2017-05-05 09:59:51 +00:00
2018-03-09 15:37:33 +00:00
def = this - > add ( " printer_vendor " , coString ) ;
def - > label = L ( " Printer vendor " ) ;
def - > tooltip = L ( " Name of the printer vendor. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2018-03-09 15:37:33 +00:00
def = this - > add ( " printer_variant " , coString ) ;
def - > label = L ( " Printer variant " ) ;
def - > tooltip = L ( " Name of the printer variant. For example, the printer variants may be differentiated by a nozzle diameter. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2018-03-09 15:37:33 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " print_settings_id " , coString ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2019-08-16 14:17:37 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " printer_settings_id " , coString ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " raft_layers " , coInt ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Raft layers " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " The object will be raised by this number of layers, and support material "
2018-02-15 16:30:33 +00:00
" will be generated under it. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " layers " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 0 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " resolution " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Resolution " ) ;
def - > tooltip = L ( " Minimum detail resolution, used to simplify the input file for speeding up "
2017-11-09 09:06:25 +00:00
" the slicing job and reducing memory usage. High-resolution models often carry "
" more detail than printers can render. Set to zero to disable any simplification "
2018-02-15 16:30:33 +00:00
" and use full resolution from input. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " retract_before_travel " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Minimum travel after retraction " ) ;
def - > tooltip = L ( " Retraction is not triggered when travel moves are shorter than this length. " ) ;
def - > sidetext = L ( " mm " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 2. } ) ;
2017-05-19 17:24:21 +00:00
def = this - > add ( " retract_before_wipe " , coPercents ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Retract amount before wipe " ) ;
def - > tooltip = L ( " With bowden extruders, it may be wise to do some amount of quick retract "
2018-02-15 16:30:33 +00:00
" before doing the wipe movement. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " % " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionPercents { 0. } ) ;
2019-08-16 14:17:37 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " retract_layer_change " , coBools ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Retract on layer change " ) ;
def - > tooltip = L ( " This flag enforces a retraction whenever a Z move is done. " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBools { false } ) ;
2014-06-11 20:04:19 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " retract_length " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Length " ) ;
def - > full_label = L ( " Retraction Length " ) ;
def - > tooltip = L ( " When retraction is triggered, filament is pulled back by the specified amount "
2018-02-15 16:30:33 +00:00
" (the length is measured on raw filament, before it enters the extruder). " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm (zero to disable) " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 2. } ) ;
2014-06-11 20:04:19 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " retract_length_toolchange " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Length " ) ;
def - > full_label = L ( " Retraction Length (Toolchange) " ) ;
def - > tooltip = L ( " When retraction is triggered before changing tool, filament is pulled back "
2017-11-09 09:06:25 +00:00
" by the specified amount (the length is measured on raw filament, before it enters "
2018-02-15 16:30:33 +00:00
" the extruder). " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm (zero to disable) " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 10. } ) ;
2014-06-11 20:04:19 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " retract_lift " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Lift Z " ) ;
def - > tooltip = L ( " If you set this to a positive value, Z is quickly raised every time a retraction "
2017-11-09 09:06:25 +00:00
" is triggered. When using multiple extruders, only the setting for the first extruder "
2018-02-15 16:30:33 +00:00
" will be considered. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 0. } ) ;
2014-06-11 20:04:19 +00:00
2015-12-18 17:36:39 +00:00
def = this - > add ( " retract_lift_above " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Above Z " ) ;
def - > full_label = L ( " Only lift Z above " ) ;
def - > tooltip = L ( " If you set this to a positive value, Z lift will only take place above the specified "
2018-02-15 16:30:33 +00:00
" absolute Z. You can tune this setting for skipping lift on the first layers. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 0. } ) ;
2015-12-18 17:36:39 +00:00
def = this - > add ( " retract_lift_below " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Below Z " ) ;
def - > full_label = L ( " Only lift Z below " ) ;
def - > tooltip = L ( " If you set this to a positive value, Z lift will only take place below "
2017-11-09 09:06:25 +00:00
" the specified absolute Z. You can tune this setting for limiting lift "
2018-02-15 16:30:33 +00:00
" to the first layers. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 0. } ) ;
2015-12-18 17:36:39 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " retract_restart_extra " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Extra length on restart " ) ;
def - > tooltip = L ( " When the retraction is compensated after the travel move, the extruder will push "
2018-02-15 16:30:33 +00:00
" this additional amount of filament. This setting is rarely needed. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 0. } ) ;
2014-06-11 20:04:19 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " retract_restart_extra_toolchange " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Extra length on restart " ) ;
def - > tooltip = L ( " When the retraction is compensated after changing tool, the extruder will push "
2018-02-15 16:30:33 +00:00
" this additional amount of filament. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 0. } ) ;
2014-06-11 20:04:19 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " retract_speed " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Retraction Speed " ) ;
def - > full_label = L ( " Retraction Speed " ) ;
def - > tooltip = L ( " The speed for retractions (it only applies to the extruder motor). " ) ;
def - > sidetext = L ( " mm/s " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 40. } ) ;
2014-06-11 20:04:19 +00:00
2017-05-19 17:24:21 +00:00
def = this - > add ( " deretract_speed " , coFloats ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Deretraction Speed " ) ;
def - > full_label = L ( " Deretraction Speed " ) ;
def - > tooltip = L ( " The speed for loading of a filament into extruder after retraction "
2018-02-15 16:30:33 +00:00
" (it only applies to the extruder motor). If left to zero, the retraction speed is used. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm/s " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 0. } ) ;
2017-05-19 17:24:21 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " seam_position " , coEnum ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Seam position " ) ;
def - > category = L ( " Layers and Perimeters " ) ;
def - > tooltip = L ( " Position of perimeters starting points. " ) ;
2017-10-17 14:01:18 +00:00
def - > enum_keys_map = & ConfigOptionEnum < SeamPosition > : : get_enum_values ( ) ;
2015-12-16 12:09:25 +00:00
def - > enum_values . push_back ( " random " ) ;
def - > enum_values . push_back ( " nearest " ) ;
def - > enum_values . push_back ( " aligned " ) ;
2017-02-07 17:46:02 +00:00
def - > enum_values . push_back ( " rear " ) ;
2018-06-20 12:20:48 +00:00
def - > enum_labels . push_back ( L ( " Random " ) ) ;
def - > enum_labels . push_back ( L ( " Nearest " ) ) ;
def - > enum_labels . push_back ( L ( " Aligned " ) ) ;
2019-08-16 14:17:37 +00:00
def - > enum_labels . push_back ( L ( " Rear " ) ) ;
2019-01-25 15:57:19 +00:00
def - > mode = comSimple ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionEnum < SeamPosition > ( spAligned ) ) ;
2015-12-16 12:09:25 +00:00
2016-09-13 11:30:00 +00:00
#if 0
def = this - > add ( " seam_preferred_direction " , coFloat ) ;
// def->gui_type = "slider";
2018-02-23 08:16:35 +00:00
def - > label = L ( " Direction " ) ;
def - > sidetext = L ( " ° " ) ;
def - > full_label = L ( " Preferred direction of the seam " ) ;
def - > tooltip = L ( " Seam preferred direction " ) ;
2016-09-13 11:30:00 +00:00
def - > min = 0 ;
def - > max = 360 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2016-09-13 11:30:00 +00:00
def = this - > add ( " seam_preferred_direction_jitter " , coFloat ) ;
// def->gui_type = "slider";
2018-02-23 08:16:35 +00:00
def - > label = L ( " Jitter " ) ;
def - > sidetext = L ( " ° " ) ;
def - > full_label = L ( " Seam preferred direction jitter " ) ;
def - > tooltip = L ( " Preferred direction of the seam - jitter " ) ;
2016-09-13 11:30:00 +00:00
def - > min = 0 ;
def - > max = 360 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 30 ) ) ;
2016-09-13 11:30:00 +00:00
# endif
2015-12-16 12:09:25 +00:00
def = this - > add ( " serial_port " , coString ) ;
def - > gui_type = " select_open " ;
def - > label = " " ;
2018-02-23 08:16:35 +00:00
def - > full_label = L ( " Serial port " ) ;
def - > tooltip = L ( " USB/serial port for printer connection. " ) ;
2019-04-13 21:46:52 +00:00
def - > width = 20 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " serial_speed " , coInt ) ;
def - > gui_type = " i_enum_open " ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Speed " ) ;
def - > full_label = L ( " Serial port speed " ) ;
def - > tooltip = L ( " Speed (baud) of USB/serial port for printer connection. " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 1 ;
def - > max = 300000 ;
def - > enum_values . push_back ( " 115200 " ) ;
def - > enum_values . push_back ( " 250000 " ) ;
2019-01-25 15:57:19 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 250000 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " skirt_distance " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Distance from object " ) ;
def - > tooltip = L ( " Distance between skirt and object(s). Set this to zero to attach the skirt "
2018-02-15 16:30:33 +00:00
" to the object(s) and get a brim for better adhesion. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 6 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " skirt_height " , coInt ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Skirt height " ) ;
def - > tooltip = L ( " Height of skirt expressed in layers. Set this to a tall value to use skirt "
2018-02-15 16:30:33 +00:00
" as a shield against drafts. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " layers " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 1 ) ) ;
2015-12-16 12:09:25 +00:00
2020-03-14 06:46:39 +00:00
def = this - > add ( " draft_shield " , coBool ) ;
def - > label = L ( " Draft shield " ) ;
def - > tooltip = L ( " If enabled, the skirt will be as tall as a highest printed object. "
" This is useful to protect an ABS or ASA print from warping and detaching from print bed due to wind draft. " ) ;
2020-03-11 09:43:59 +00:00
def - > mode = comAdvanced ;
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " skirts " , coInt ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Loops (minimum) " ) ;
def - > full_label = L ( " Skirt Loops " ) ;
def - > tooltip = L ( " Number of loops for the skirt. If the Minimum Extrusion Length option is set, "
2017-11-09 09:06:25 +00:00
" the number of loops might be greater than the one configured here. Set this to zero "
2018-02-15 16:30:33 +00:00
" to disable skirt completely. " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 1 ) ) ;
2019-08-16 14:17:37 +00:00
2017-06-21 14:15:39 +00:00
def = this - > add ( " slowdown_below_layer_time " , coInts ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Slow down if layer print time is below " ) ;
def - > tooltip = L ( " If layer print time is estimated below this number of seconds, print moves "
2018-02-15 16:30:33 +00:00
" speed will be scaled down to extend duration to this value. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " approximate seconds " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
def - > max = 1000 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInts { 5 } ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " small_perimeter_speed " , coFloatOrPercent ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Small perimeters " ) ;
def - > category = L ( " Speed " ) ;
def - > tooltip = L ( " This separate setting will affect the speed of perimeters having radius <= 6.5mm "
2017-11-09 09:06:25 +00:00
" (usually holes). If expressed as percentage (for example: 80%) it will be calculated "
2018-02-15 16:30:33 +00:00
" on the perimeters speed setting above. Set to zero for auto. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm/s or % " ) ;
2015-12-16 12:09:25 +00:00
def - > ratio_over = " perimeter_speed " ;
def - > min = 0 ;
2019-01-25 15:57:19 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloatOrPercent ( 15 , false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " solid_infill_below_area " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Solid infill threshold area " ) ;
def - > category = L ( " Infill " ) ;
def - > tooltip = L ( " Force solid infill for regions having a smaller area than the specified threshold. " ) ;
def - > sidetext = L ( " mm² " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 70 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " solid_infill_extruder " , coInt ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Solid infill extruder " ) ;
def - > category = L ( " Extruders " ) ;
def - > tooltip = L ( " The extruder to use when printing solid infill. " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 1 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 1 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " solid_infill_every_layers " , coInt ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Solid infill every " ) ;
def - > category = L ( " Infill " ) ;
def - > tooltip = L ( " This feature allows to force a solid layer every given number of layers. "
2017-11-09 09:06:25 +00:00
" Zero to disable. You can set this to any value (for example 9999); "
" Slic3r will automatically choose the maximum possible number of layers "
2018-02-15 16:30:33 +00:00
" to combine according to nozzle diameter and layer height. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " layers " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 0 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " solid_infill_extrusion_width " , coFloatOrPercent ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Solid infill " ) ;
def - > category = L ( " Extrusion Width " ) ;
def - > tooltip = L ( " Set this to a non-zero value to set a manual extrusion width for infill for solid surfaces. "
2017-11-09 09:48:06 +00:00
" If left zero, default extrusion width will be used if set, otherwise 1.125 x nozzle diameter will be used. "
2018-02-15 16:30:33 +00:00
" If expressed as percentage (for example 90%) it will be computed over layer height. " ) ;
2019-05-14 10:15:48 +00:00
def - > sidetext = L ( " mm or % " ) ;
2019-10-18 09:53:19 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloatOrPercent ( 0 , false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " solid_infill_speed " , coFloatOrPercent ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Solid infill " ) ;
def - > category = L ( " Speed " ) ;
def - > tooltip = L ( " Speed for printing solid regions (top/bottom/internal horizontal shells). "
2017-11-09 09:06:25 +00:00
" This can be expressed as a percentage (for example: 80%) over the default "
2018-02-15 16:30:33 +00:00
" infill speed above. Set to zero for auto. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm/s or % " ) ;
2015-12-16 12:09:25 +00:00
def - > ratio_over = " infill_speed " ;
2018-09-17 13:12:13 +00:00
def - > aliases = { " solid_infill_feed_rate " } ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2019-01-25 15:57:19 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloatOrPercent ( 20 , false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " solid_layers " , coInt ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Solid layers " ) ;
def - > tooltip = L ( " Number of solid layers to generate on top and bottom surfaces. " ) ;
2015-12-16 12:09:25 +00:00
def - > shortcut . push_back ( " top_solid_layers " ) ;
def - > shortcut . push_back ( " bottom_solid_layers " ) ;
def - > min = 0 ;
2020-02-05 15:53:26 +00:00
def = this - > add ( " solid_min_thickness " , coFloat ) ;
def - > label = L ( " Minimum thickness of a top / bottom shell " ) ;
def - > tooltip = L ( " Minimum thickness of a top / bottom shell " ) ;
def - > shortcut . push_back ( " top_solid_min_thickness " ) ;
def - > shortcut . push_back ( " bottom_solid_min_thickness " ) ;
def - > min = 0 ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " spiral_vase " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Spiral vase " ) ;
def - > tooltip = L ( " This feature will raise Z gradually while printing a single-walled object "
2017-11-09 09:06:25 +00:00
" in order to remove any visible seam. This option requires a single perimeter, "
" no infill, no top solid layers and no support material. You can still set "
" any number of bottom solid layers as well as skirt/brim loops. "
2018-02-15 16:30:33 +00:00
" It won't work when printing more than an object. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " standby_temperature_delta " , coInt ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Temperature variation " ) ;
def - > tooltip = L ( " Temperature difference to be applied when an extruder is not active. "
2018-02-15 16:30:33 +00:00
" Enables a full-height \" sacrificial \" skirt on which the nozzles are periodically wiped. " ) ;
2019-08-16 14:17:37 +00:00
def - > sidetext = " ∆°C " ;
2017-12-12 12:43:36 +00:00
def - > min = - max_temp ;
def - > max = max_temp ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( - 5 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " start_gcode " , coString ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Start G-code " ) ;
def - > tooltip = L ( " This start procedure is inserted at the beginning, after bed has reached "
2017-11-09 09:06:25 +00:00
" the target temperature and extruder just started heating, and before extruder "
2019-08-27 09:39:51 +00:00
" has finished heating. If PrusaSlicer detects M104 or M190 in your custom codes, "
2017-11-09 09:06:25 +00:00
" such commands will not be prepended automatically so you're free to customize "
" the order of heating commands and other custom actions. Note that you can use "
2019-08-27 09:39:51 +00:00
" placeholder variables for all PrusaSlicer settings, so you can put "
2018-02-15 16:30:33 +00:00
" a \" M109 S[first_layer_temperature] \" command wherever you want. " ) ;
2015-12-16 12:09:25 +00:00
def - > multiline = true ;
def - > full_width = true ;
2019-04-13 21:46:52 +00:00
def - > height = 12 ;
2018-10-21 21:09:24 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( " G28 ; home all axes \n G1 Z5 F5000 ; lift nozzle \n " ) ) ;
2015-12-16 12:09:25 +00:00
2017-06-05 09:30:57 +00:00
def = this - > add ( " start_filament_gcode " , coStrings ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Start G-code " ) ;
2019-07-15 09:49:30 +00:00
def - > tooltip = L ( " This start procedure is inserted at the beginning, after any printer start gcode (and "
" after any toolchange to this filament in case of multi-material printers). "
2019-08-27 09:39:51 +00:00
" This is used to override settings for a specific filament. If PrusaSlicer detects "
2017-11-09 09:06:25 +00:00
" M104, M109, M140 or M190 in your custom codes, such commands will "
" not be prepended automatically so you're free to customize the order "
" of heating commands and other custom actions. Note that you can use placeholder variables "
2019-08-27 09:39:51 +00:00
" for all PrusaSlicer settings, so you can put a \" M109 S[first_layer_temperature] \" command "
2017-11-09 09:06:25 +00:00
" wherever you want. If you have multiple extruders, the gcode is processed "
2018-02-15 16:30:33 +00:00
" in extruder order. " ) ;
2017-06-05 09:30:57 +00:00
def - > multiline = true ;
def - > full_width = true ;
2019-04-13 21:46:52 +00:00
def - > height = 12 ;
2018-10-21 21:09:24 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionStrings { " ; Filament gcode \n " } ) ;
2017-06-05 09:30:57 +00:00
2020-06-03 08:42:47 +00:00
def = this - > add ( " color_change_gcode " , coString ) ;
def - > label = L ( " Color change G-code " ) ;
def - > tooltip = L ( " This G-code will be used as a code for the color change " ) ;
def - > multiline = true ;
def - > full_width = true ;
def - > height = 12 ;
def - > mode = comExpert ;
def - > set_default_value ( new ConfigOptionString ( " M600 " ) ) ;
def = this - > add ( " pause_print_gcode " , coString ) ;
def - > label = L ( " Pause Print G-code " ) ;
def - > tooltip = L ( " This G-code will be used as a code for the pause print " ) ;
def - > multiline = true ;
def - > full_width = true ;
def - > height = 12 ;
def - > mode = comExpert ;
def - > set_default_value ( new ConfigOptionString ( " M601 " ) ) ;
def = this - > add ( " template_custom_gcode " , coString ) ;
def - > label = L ( " Custom G-code " ) ;
def - > tooltip = L ( " This G-code will be used as a custom code " ) ;
def - > multiline = true ;
def - > full_width = true ;
def - > height = 12 ;
def - > mode = comExpert ;
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2017-05-16 11:45:28 +00:00
def = this - > add ( " single_extruder_multi_material " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Single Extruder Multi Material " ) ;
def - > tooltip = L ( " The printer multiplexes filaments into a single hot end. " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-08-16 14:17:37 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2017-05-16 11:45:28 +00:00
2018-07-27 20:19:46 +00:00
def = this - > add ( " single_extruder_multi_material_priming " , coBool ) ;
def - > label = L ( " Prime all printing extruders " ) ;
def - > tooltip = L ( " If enabled, all printing extruders will be primed at the front edge of the print bed at the start of the print. " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( true ) ) ;
2018-07-27 20:19:46 +00:00
2019-09-19 14:30:01 +00:00
def = this - > add ( " wipe_tower_no_sparse_layers " , coBool ) ;
2019-11-14 09:05:02 +00:00
def - > label = L ( " No sparse layers (EXPERIMENTAL) " ) ;
2019-09-19 14:30:01 +00:00
def - > tooltip = L ( " If enabled, the wipe tower will not be printed on layers with no toolchanges. "
" On layers with a toolchange, extruder will travel downward to print the wipe tower. "
" User is responsible for ensuring there is no collision with the print. " ) ;
def - > mode = comAdvanced ;
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " support_material " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Generate support material " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " Enable support material generation. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2015-12-16 12:09:25 +00:00
2018-09-17 13:12:13 +00:00
def = this - > add ( " support_material_auto " , coBool ) ;
def - > label = L ( " Auto generated supports " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " If checked, supports will be generated automatically based on the overhang threshold value. " \
" If unchecked, supports will be generated inside the \" Support Enforcer \" volumes only. " ) ;
2019-01-25 15:57:19 +00:00
def - > mode = comSimple ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( true ) ) ;
2018-09-17 13:12:13 +00:00
2017-01-05 08:12:24 +00:00
def = this - > add ( " support_material_xy_spacing " , coFloatOrPercent ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " XY separation between an object and its support " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " XY separation between an object and its support. If expressed as percentage "
2018-02-15 16:30:33 +00:00
" (for example 50%), it will be calculated over external perimeter width. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm or % " ) ;
2017-01-05 08:12:24 +00:00
def - > ratio_over = " external_perimeter_extrusion_width " ;
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2017-01-05 08:12:24 +00:00
// Default is half the external perimeter width.
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloatOrPercent ( 50 , true ) ) ;
2016-03-20 03:30:02 +00:00
2017-07-20 11:38:10 +00:00
def = this - > add ( " support_material_angle " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Pattern angle " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " Use this setting to rotate the support material pattern on the horizontal plane. " ) ;
def - > sidetext = L ( " ° " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
def - > max = 359 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2015-12-16 12:09:25 +00:00
2016-10-04 11:54:10 +00:00
def = this - > add ( " support_material_buildplate_only " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Support on build plate only " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " Only create support if it lies on a build plate. Don't create support on a print. " ) ;
2019-01-25 15:57:19 +00:00
def - > mode = comSimple ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2016-10-04 11:54:10 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " support_material_contact_distance " , coFloat ) ;
def - > gui_type = " f_enum_open " ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Contact Z distance " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " The vertical distance between object and support material interface. "
2017-11-09 09:06:25 +00:00
" Setting this to 0 will also prevent Slic3r from using bridge flow and speed "
2018-02-15 16:30:33 +00:00
" for the first object layer. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm " ) ;
2018-09-17 13:12:13 +00:00
// def->min = 0;
2015-12-16 12:09:25 +00:00
def - > enum_values . push_back ( " 0 " ) ;
def - > enum_values . push_back ( " 0.2 " ) ;
2019-08-16 14:17:37 +00:00
def - > enum_labels . push_back ( L ( " 0 (soluble) " ) ) ;
def - > enum_labels . push_back ( L ( " 0.2 (detachable) " ) ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0.2 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " support_material_enforce_layers " , coInt ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Enforce support for the first " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " Generate support material for the specified number of layers counting from bottom, "
2017-11-09 09:06:25 +00:00
" regardless of whether normal support material is enabled or not and regardless "
" of any angle threshold. This is useful for getting more adhesion of objects "
2018-02-15 16:30:33 +00:00
" having a very thin or poor footprint on the build plate. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " layers " ) ;
def - > full_label = L ( " Enforce support for the first n layers " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 0 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " support_material_extruder " , coInt ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Support material/raft/skirt extruder " ) ;
def - > category = L ( " Extruders " ) ;
def - > tooltip = L ( " The extruder to use when printing support material, raft and skirt "
2018-02-15 16:30:33 +00:00
" (1+, 0 to use the current extruder to minimize tool changes). " ) ;
2017-01-30 18:56:46 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 1 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " support_material_extrusion_width " , coFloatOrPercent ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Support material " ) ;
def - > category = L ( " Extrusion Width " ) ;
def - > tooltip = L ( " Set this to a non-zero value to set a manual extrusion width for support material. "
2017-11-09 09:48:06 +00:00
" If left zero, default extrusion width will be used if set, otherwise nozzle diameter will be used. "
2018-02-15 16:30:33 +00:00
" If expressed as percentage (for example 90%) it will be computed over layer height. " ) ;
2019-05-14 10:15:48 +00:00
def - > sidetext = L ( " mm or % " ) ;
2019-10-18 09:53:19 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloatOrPercent ( 0 , false ) ) ;
2015-12-16 12:09:25 +00:00
2016-11-30 16:33:55 +00:00
def = this - > add ( " support_material_interface_contact_loops " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Interface loops " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " Cover the top contact layer of the supports with loops. Disabled by default. " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2016-11-30 16:33:55 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " support_material_interface_extruder " , coInt ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Support material/raft interface extruder " ) ;
def - > category = L ( " Extruders " ) ;
def - > tooltip = L ( " The extruder to use when printing support material interface "
2018-02-15 16:30:33 +00:00
" (1+, 0 to use the current extruder to minimize tool changes). This affects raft too. " ) ;
2017-01-30 18:56:46 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 1 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " support_material_interface_layers " , coInt ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Interface layers " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " Number of interface layers to insert between the object(s) and support material. " ) ;
def - > sidetext = L ( " layers " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 3 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " support_material_interface_spacing " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Interface pattern spacing " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " Spacing between interface lines. Set zero to get a solid interface. " ) ;
def - > sidetext = L ( " mm " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " support_material_interface_speed " , coFloatOrPercent ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Support material interface " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " Speed for printing support material interface layers. If expressed as percentage "
2018-02-15 16:30:33 +00:00
" (for example 50%) it will be calculated over support material speed. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm/s or % " ) ;
2015-12-16 12:09:25 +00:00
def - > ratio_over = " support_material_speed " ;
def - > min = 0 ;
2019-01-25 15:57:19 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloatOrPercent ( 100 , true ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " support_material_pattern " , coEnum ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Pattern " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " Pattern used to generate support material. " ) ;
2017-10-17 14:01:18 +00:00
def - > enum_keys_map = & ConfigOptionEnum < SupportMaterialPattern > : : get_enum_values ( ) ;
2015-12-16 12:09:25 +00:00
def - > enum_values . push_back ( " rectilinear " ) ;
def - > enum_values . push_back ( " rectilinear-grid " ) ;
def - > enum_values . push_back ( " honeycomb " ) ;
2019-08-16 14:17:37 +00:00
def - > enum_labels . push_back ( L ( " Rectilinear " ) ) ;
2018-06-20 12:20:48 +00:00
def - > enum_labels . push_back ( L ( " Rectilinear grid " ) ) ;
def - > enum_labels . push_back ( L ( " Honeycomb " ) ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionEnum < SupportMaterialPattern > ( smpRectilinear ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " support_material_spacing " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Pattern spacing " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " Spacing between support material lines. " ) ;
def - > sidetext = L ( " mm " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 2.5 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " support_material_speed " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Support material " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " Speed for printing support material. " ) ;
def - > sidetext = L ( " mm/s " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2019-01-25 15:57:19 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 60 ) ) ;
2015-12-16 12:09:25 +00:00
2016-11-30 15:04:15 +00:00
def = this - > add ( " support_material_synchronize_layers " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Synchronize with object layers " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " Synchronize support layers with the object print layers. This is useful "
2018-02-15 16:30:33 +00:00
" with multi-material printers, where the extruder switch is expensive. " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2016-11-30 15:04:15 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " support_material_threshold " , coInt ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Overhang threshold " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " Support material will not be generated for overhangs whose slope angle "
2018-02-19 14:32:22 +00:00
" (90° = vertical) is above the given threshold. In other words, this value "
2017-11-09 09:06:25 +00:00
" represent the most horizontal slope (measured from the horizontal plane) "
" that you can print without support material. Set to zero for automatic detection "
2018-02-15 16:30:33 +00:00
" (recommended). " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " ° " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
def - > max = 90 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 0 ) ) ;
2015-12-16 12:09:25 +00:00
2016-10-04 12:38:13 +00:00
def = this - > add ( " support_material_with_sheath " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " With sheath around the support " ) ;
def - > category = L ( " Support material " ) ;
def - > tooltip = L ( " Add a sheath (a single perimeter line) around the base support. This makes "
2018-02-15 16:30:33 +00:00
" the support more reliable, but also more difficult to remove. " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( true ) ) ;
2016-10-04 12:38:13 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " temperature " , coInts ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Other layers " ) ;
def - > tooltip = L ( " Extruder temperature for layers after the first one. Set this to zero to disable "
2018-02-15 16:30:33 +00:00
" temperature control commands in the output. " ) ;
2020-04-13 15:55:38 +00:00
def - > sidetext = L ( " °C " ) ;
def - > full_label = L ( " Extruder temperature " ) ;
2018-04-05 14:10:44 +00:00
def - > min = 0 ;
2017-12-12 12:43:36 +00:00
def - > max = max_temp ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInts { 200 } ) ;
2019-08-16 14:17:37 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " thin_walls " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Detect thin walls " ) ;
def - > category = L ( " Layers and Perimeters " ) ;
def - > tooltip = L ( " Detect single-width walls (parts where two extrusions don't fit and we need "
2018-02-15 16:30:33 +00:00
" to collapse them into a single trace). " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( true ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " threads " , coInt ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Threads " ) ;
def - > tooltip = L ( " Threads are used to parallelize long-running tasks. Optimal threads number "
2018-02-15 16:30:33 +00:00
" is slightly above the number of available cores/processors. " ) ;
2015-12-16 12:09:25 +00:00
def - > readonly = true ;
def - > min = 1 ;
2016-11-27 14:25:22 +00:00
{
2017-10-17 14:01:18 +00:00
int threads = ( unsigned int ) boost : : thread : : hardware_concurrency ( ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( threads > 0 ? threads : 2 ) ) ;
2019-09-04 14:05:32 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2016-11-27 14:25:22 +00:00
}
2019-08-16 14:17:37 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " toolchange_gcode " , coString ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Tool change G-code " ) ;
2019-09-09 14:39:26 +00:00
def - > tooltip = L ( " This custom code is inserted before every toolchange. Placeholder variables for all PrusaSlicer settings "
" as well as {previous_extruder} and {next_extruder} can be used. When a tool-changing command "
" which changes to the correct extruder is included (such as T{next_extruder}), PrusaSlicer will emit no other such command. "
" It is therefore possible to script custom behaviour both before and after the toolchange. " ) ;
2015-12-16 12:09:25 +00:00
def - > multiline = true ;
def - > full_width = true ;
2019-04-13 21:46:52 +00:00
def - > height = 5 ;
2018-10-21 21:09:24 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " top_infill_extrusion_width " , coFloatOrPercent ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Top solid infill " ) ;
def - > category = L ( " Extrusion Width " ) ;
def - > tooltip = L ( " Set this to a non-zero value to set a manual extrusion width for infill for top surfaces. "
2017-11-09 09:48:06 +00:00
" You may want to use thinner extrudates to fill all narrow regions and get a smoother finish. "
" If left zero, default extrusion width will be used if set, otherwise nozzle diameter will be used. "
2018-02-15 16:30:33 +00:00
" If expressed as percentage (for example 90%) it will be computed over layer height. " ) ;
2019-05-14 10:15:48 +00:00
def - > sidetext = L ( " mm or % " ) ;
2019-10-18 09:53:19 +00:00
def - > min = 0 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloatOrPercent ( 0 , false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " top_solid_infill_speed " , coFloatOrPercent ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Top solid infill " ) ;
def - > category = L ( " Speed " ) ;
def - > tooltip = L ( " Speed for printing top solid layers (it only applies to the uppermost "
2017-11-09 09:06:25 +00:00
" external layers and not to their internal solid layers). You may want "
" to slow down this to get a nicer surface finish. This can be expressed "
" as a percentage (for example: 80%) over the solid infill speed above. "
2018-02-15 16:30:33 +00:00
" Set to zero for auto. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm/s or % " ) ;
2015-12-16 12:09:25 +00:00
def - > ratio_over = " solid_infill_speed " ;
def - > min = 0 ;
2019-01-25 15:57:19 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloatOrPercent ( 15 , false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " top_solid_layers " , coInt ) ;
2019-05-04 00:07:07 +00:00
//TRN To be shown in Print Settings "Top solid layers"
2018-02-23 08:16:35 +00:00
def - > label = L ( " Top " ) ;
def - > category = L ( " Layers and Perimeters " ) ;
def - > tooltip = L ( " Number of solid layers to generate on top surfaces. " ) ;
def - > full_label = L ( " Top solid layers " ) ;
2015-12-16 12:09:25 +00:00
def - > min = 0 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 3 ) ) ;
2015-12-16 12:09:25 +00:00
2020-02-05 15:53:26 +00:00
def = this - > add ( " top_solid_min_thickness " , coFloat ) ;
//TRN To be shown in Print Settings "Top solid layers"
def - > label = L ( " Top " ) ;
def - > category = L ( " Layers and Perimeters " ) ;
def - > tooltip = L ( " The number of top solid layers is increased above top_solid_layers if necessary to satisfy "
" minimum thickness of top shell. "
" This is useful to prevent pillowing effect when printing with variable layer height. " ) ;
def - > full_label = L ( " Minimum top shell thickness " ) ;
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
def - > set_default_value ( new ConfigOptionFloat ( 0. ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " travel_speed " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Travel " ) ;
def - > tooltip = L ( " Speed for travel moves (jumps between distant extrusion points). " ) ;
def - > sidetext = L ( " mm/s " ) ;
2018-09-17 13:12:13 +00:00
def - > aliases = { " travel_feed_rate " } ;
2015-12-16 12:09:25 +00:00
def - > min = 1 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 130 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " use_firmware_retraction " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Use firmware retraction " ) ;
def - > tooltip = L ( " This experimental setting uses G10 and G11 commands to have the firmware "
2018-02-15 16:30:33 +00:00
" handle the retraction. This is only supported in recent Marlin. " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " use_relative_e_distances " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Use relative E distances " ) ;
def - > tooltip = L ( " If your firmware requires relative E values, check this, "
2018-02-15 16:30:33 +00:00
" otherwise leave it unchecked. Most firmwares use absolute values. " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " use_volumetric_e " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Use volumetric E " ) ;
def - > tooltip = L ( " This experimental setting uses outputs the E values in cubic millimeters "
2017-11-09 09:06:25 +00:00
" instead of linear millimeters. If your firmware doesn't already know "
" filament diameter(s), you can put commands like 'M200 D[filament_diameter_0] T0' "
" in your start G-code in order to turn volumetric mode on and use the filament "
" diameter associated to the filament selected in Slic3r. This is only supported "
2018-02-15 16:30:33 +00:00
" in recent Marlin. " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2015-12-16 12:09:25 +00:00
2016-07-16 14:52:11 +00:00
def = this - > add ( " variable_layer_height " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Enable variable layer height feature " ) ;
def - > tooltip = L ( " Some printers or printer setups may have difficulties printing "
2018-02-15 16:30:33 +00:00
" with a variable layer height. Enabled by default. " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( true ) ) ;
2016-07-16 14:52:11 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " wipe " , coBools ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Wipe while retracting " ) ;
def - > tooltip = L ( " This flag will move the nozzle while retracting to minimize the possible blob "
2018-02-15 16:30:33 +00:00
" on leaky extruders. " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBools { false } ) ;
2014-06-11 20:04:19 +00:00
2017-05-16 11:45:28 +00:00
def = this - > add ( " wipe_tower " , coBool ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Enable " ) ;
def - > tooltip = L ( " Multi material printers may need to prime or purge extruders on tool changes. "
2018-02-15 16:30:33 +00:00
" Extrude the excess material into the wipe tower. " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2017-05-16 11:45:28 +00:00
2018-03-16 12:58:58 +00:00
def = this - > add ( " wiping_volumes_extruders " , coFloats ) ;
2018-03-28 13:37:10 +00:00
def - > label = L ( " Purging volumes - load/unload volumes " ) ;
2018-03-16 12:58:58 +00:00
def - > tooltip = L ( " This vector saves required volumes to change from/to each tool used on the "
" wipe tower. These values are used to simplify creation of the full purging "
2019-05-11 21:29:25 +00:00
" volumes below. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 70.f , 70.f , 70.f , 70.f , 70.f , 70.f , 70.f , 70.f , 70.f , 70.f } ) ;
2018-03-16 12:58:58 +00:00
def = this - > add ( " wiping_volumes_matrix " , coFloats ) ;
2018-03-28 13:37:10 +00:00
def - > label = L ( " Purging volumes - matrix " ) ;
2018-03-16 12:58:58 +00:00
def - > tooltip = L ( " This matrix describes volumes (in cubic milimetres) required to purge the "
2019-05-11 21:29:25 +00:00
" new filament on the wipe tower for any given pair of tools. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats { 0.f , 140.f , 140.f , 140.f , 140.f ,
140.f , 0.f , 140.f , 140.f , 140.f ,
140.f , 140.f , 0.f , 140.f , 140.f ,
140.f , 140.f , 140.f , 0.f , 140.f ,
140.f , 140.f , 140.f , 140.f , 0.f } ) ;
2018-02-28 15:04:56 +00:00
2017-05-16 11:45:28 +00:00
def = this - > add ( " wipe_tower_x " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Position X " ) ;
def - > tooltip = L ( " X coordinate of the left front corner of a wipe tower " ) ;
def - > sidetext = L ( " mm " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 180. ) ) ;
2017-05-16 11:45:28 +00:00
def = this - > add ( " wipe_tower_y " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Position Y " ) ;
def - > tooltip = L ( " Y coordinate of the left front corner of a wipe tower " ) ;
def - > sidetext = L ( " mm " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 140. ) ) ;
2017-05-16 11:45:28 +00:00
def = this - > add ( " wipe_tower_width " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Width " ) ;
def - > tooltip = L ( " Width of a wipe tower " ) ;
def - > sidetext = L ( " mm " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 60. ) ) ;
2017-05-16 11:45:28 +00:00
2017-11-30 11:08:22 +00:00
def = this - > add ( " wipe_tower_rotation_angle " , coFloat ) ;
2018-03-09 14:10:15 +00:00
def - > label = L ( " Wipe tower rotation angle " ) ;
2019-05-11 21:29:25 +00:00
def - > tooltip = L ( " Wipe tower rotation angle with respect to x-axis. " ) ;
2019-05-04 00:07:07 +00:00
def - > sidetext = L ( " ° " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0. ) ) ;
2018-05-25 14:11:55 +00:00
def = this - > add ( " wipe_into_infill " , coBool ) ;
2019-07-29 14:56:00 +00:00
def - > category = L ( " Wipe options " ) ;
2018-08-25 20:09:55 +00:00
def - > label = L ( " Wipe into this object's infill " ) ;
2018-08-06 14:37:41 +00:00
def - > tooltip = L ( " Purging after toolchange will done inside this object's infills. "
2018-05-25 14:11:55 +00:00
" This lowers the amount of waste but may result in longer print time "
" due to additional travel moves. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2018-05-25 14:11:55 +00:00
2018-06-06 16:24:42 +00:00
def = this - > add ( " wipe_into_objects " , coBool ) ;
2019-07-29 14:56:00 +00:00
def - > category = L ( " Wipe options " ) ;
2018-08-25 20:09:55 +00:00
def - > label = L ( " Wipe into this object " ) ;
2018-08-06 14:37:41 +00:00
def - > tooltip = L ( " Object will be used to purge the nozzle after a toolchange to save material "
2018-06-06 16:24:42 +00:00
" that would otherwise end up in the wipe tower and decrease print time. "
2018-07-09 11:44:41 +00:00
" Colours of the objects will be mixed as a result. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2018-06-06 16:24:42 +00:00
2018-03-12 14:41:25 +00:00
def = this - > add ( " wipe_tower_bridging " , coFloat ) ;
def - > label = L ( " Maximal bridging distance " ) ;
2019-05-11 21:29:25 +00:00
def - > tooltip = L ( " Maximal distance between supports on sparse infill sections. " ) ;
2018-03-12 14:41:25 +00:00
def - > sidetext = L ( " mm " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 10. ) ) ;
2017-11-30 11:08:22 +00:00
2015-12-16 12:09:25 +00:00
def = this - > add ( " xy_size_compensation " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " XY Size Compensation " ) ;
def - > category = L ( " Advanced " ) ;
def - > tooltip = L ( " The object will be grown/shrunk in the XY plane by the configured value "
2017-11-09 09:06:25 +00:00
" (negative = inwards, positive = outwards). This might be useful "
2018-02-15 16:30:33 +00:00
" for fine-tuning hole sizes. " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm " ) ;
2018-10-19 11:55:29 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2015-12-16 12:09:25 +00:00
def = this - > add ( " z_offset " , coFloat ) ;
2018-02-23 08:16:35 +00:00
def - > label = L ( " Z offset " ) ;
def - > tooltip = L ( " This value will be added (or subtracted) from all the Z coordinates "
2017-11-09 09:06:25 +00:00
" in the output G-code. It is used to compensate for bad Z endstop position: "
" for example, if your endstop zero actually leaves the nozzle 0.3mm far "
2018-02-15 16:30:33 +00:00
" from the print bed, set this to -0.3 (or fix your endstop). " ) ;
2018-02-23 08:16:35 +00:00
def - > sidetext = L ( " mm " ) ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
WIP: Nullable configuration value concept, implemented for
ConfigOptionFloatsNullable, ConfigOptionIntsNullable,
ConfigOptionPercentsNullable, ConfigOptionBoolsNullable.
retract override values were added to the Filament profile:
vector of floats: "retract_length", "retract_lift", "retract_lift_above",
"retract_lift_below", "retract_speed", "deretract_speed",
"retract_restart_extra", "retract_before_travel",
vector of bools: "retract_layer_change", "wipe"
vector of percents: "retract_before_wipe"
2019-07-23 12:15:42 +00:00
// Declare retract values for filament profile, overriding the printer's extruder profile.
for ( const char * opt_key : {
2019-08-16 14:17:37 +00:00
// floats
" retract_length " , " retract_lift " , " retract_lift_above " , " retract_lift_below " , " retract_speed " , " deretract_speed " , " retract_restart_extra " , " retract_before_travel " ,
// bools
" retract_layer_change " , " wipe " ,
// percents
" retract_before_wipe " } ) {
auto it_opt = options . find ( opt_key ) ;
assert ( it_opt ! = options . end ( ) ) ;
def = this - > add_nullable ( std : : string ( " filament_ " ) + opt_key , it_opt - > second . type ) ;
def - > label = it_opt - > second . label ;
def - > full_label = it_opt - > second . full_label ;
def - > tooltip = it_opt - > second . tooltip ;
def - > sidetext = it_opt - > second . sidetext ;
def - > mode = it_opt - > second . mode ;
switch ( def - > type ) {
case coFloats : def - > set_default_value ( new ConfigOptionFloatsNullable ( static_cast < const ConfigOptionFloats * > ( it_opt - > second . default_value . get ( ) ) - > values ) ) ; break ;
case coPercents : def - > set_default_value ( new ConfigOptionPercentsNullable ( static_cast < const ConfigOptionPercents * > ( it_opt - > second . default_value . get ( ) ) - > values ) ) ; break ;
case coBools : def - > set_default_value ( new ConfigOptionBoolsNullable ( static_cast < const ConfigOptionBools * > ( it_opt - > second . default_value . get ( ) ) - > values ) ) ; break ;
default : assert ( false ) ;
}
WIP: Nullable configuration value concept, implemented for
ConfigOptionFloatsNullable, ConfigOptionIntsNullable,
ConfigOptionPercentsNullable, ConfigOptionBoolsNullable.
retract override values were added to the Filament profile:
vector of floats: "retract_length", "retract_lift", "retract_lift_above",
"retract_lift_below", "retract_speed", "deretract_speed",
"retract_restart_extra", "retract_before_travel",
vector of bools: "retract_layer_change", "wipe"
vector of percents: "retract_before_wipe"
2019-07-23 12:15:42 +00:00
}
2019-03-13 18:17:26 +00:00
}
2019-10-15 14:31:20 +00:00
void PrintConfigDef : : init_extruder_option_keys ( )
2019-07-25 12:39:19 +00:00
{
2019-10-15 14:31:20 +00:00
// ConfigOptionFloats, ConfigOptionPercents, ConfigOptionBools, ConfigOptionStrings
m_extruder_option_keys = {
" nozzle_diameter " , " min_layer_height " , " max_layer_height " , " extruder_offset " ,
" retract_length " , " retract_lift " , " retract_lift_above " , " retract_lift_below " , " retract_speed " , " deretract_speed " ,
" retract_before_wipe " , " retract_restart_extra " , " retract_before_travel " , " wipe " ,
" retract_layer_change " , " retract_length_toolchange " , " retract_restart_extra_toolchange " , " extruder_colour " ,
" default_filament_profile "
} ;
2019-08-16 14:17:37 +00:00
m_extruder_retract_keys = {
" deretract_speed " ,
" retract_before_travel " ,
" retract_before_wipe " ,
" retract_layer_change " ,
" retract_length " ,
" retract_lift " ,
" retract_lift_above " ,
" retract_lift_below " ,
" retract_restart_extra " ,
" retract_speed " ,
" wipe "
} ;
assert ( std : : is_sorted ( m_extruder_retract_keys . begin ( ) , m_extruder_retract_keys . end ( ) ) ) ;
2019-03-13 18:17:26 +00:00
}
void PrintConfigDef : : init_sla_params ( )
{
ConfigOptionDef * def ;
// SLA Printer settings
2018-07-03 15:05:09 +00:00
2018-07-31 13:09:57 +00:00
def = this - > add ( " display_width " , coFloat ) ;
def - > label = L ( " Display width " ) ;
def - > tooltip = L ( " Width of the display " ) ;
def - > min = 1 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 120. ) ) ;
2018-07-31 13:09:57 +00:00
def = this - > add ( " display_height " , coFloat ) ;
def - > label = L ( " Display height " ) ;
def - > tooltip = L ( " Height of the display " ) ;
def - > min = 1 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 68. ) ) ;
2018-07-31 13:09:57 +00:00
def = this - > add ( " display_pixels_x " , coInt ) ;
2018-08-08 15:47:59 +00:00
def - > full_label = L ( " Number of pixels in " ) ;
def - > label = ( " X " ) ;
2018-07-31 13:09:57 +00:00
def - > tooltip = L ( " Number of pixels in X " ) ;
2019-08-19 10:58:59 +00:00
def - > min = 100 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 2560 ) ) ;
2018-07-31 13:09:57 +00:00
def = this - > add ( " display_pixels_y " , coInt ) ;
2018-08-08 15:47:59 +00:00
def - > label = ( " Y " ) ;
2018-07-31 13:09:57 +00:00
def - > tooltip = L ( " Number of pixels in Y " ) ;
2019-08-19 10:58:59 +00:00
def - > min = 100 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 1440 ) ) ;
2018-07-31 13:09:57 +00:00
2019-05-18 14:56:46 +00:00
def = this - > add ( " display_mirror_x " , coBool ) ;
2019-05-18 21:21:59 +00:00
def - > full_label = L ( " Display horizontal mirroring " ) ;
def - > label = L ( " Mirror horizontally " ) ;
def - > tooltip = L ( " Enable horizontal mirroring of output images " ) ;
def - > mode = comExpert ;
2019-05-18 20:45:24 +00:00
def - > set_default_value ( new ConfigOptionBool ( true ) ) ;
2019-05-18 14:56:46 +00:00
def = this - > add ( " display_mirror_y " , coBool ) ;
2019-05-18 21:21:59 +00:00
def - > full_label = L ( " Display vertical mirroring " ) ;
def - > label = L ( " Mirror vertically " ) ;
def - > tooltip = L ( " Enable vertical mirroring of output images " ) ;
def - > mode = comExpert ;
2019-05-18 20:45:24 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2019-05-18 14:56:46 +00:00
2018-12-13 11:42:45 +00:00
def = this - > add ( " display_orientation " , coEnum ) ;
def - > label = L ( " Display orientation " ) ;
2018-12-21 11:46:04 +00:00
def - > tooltip = L ( " Set the actual LCD display orientation inside the SLA printer. "
" Portrait mode will flip the meaning of display width and height parameters "
" and the output images will be rotated by 90 degrees. " ) ;
2018-12-13 11:42:45 +00:00
def - > enum_keys_map = & ConfigOptionEnum < SLADisplayOrientation > : : get_enum_values ( ) ;
2018-12-14 16:19:17 +00:00
def - > enum_values . push_back ( " landscape " ) ;
def - > enum_values . push_back ( " portrait " ) ;
def - > enum_labels . push_back ( L ( " Landscape " ) ) ;
def - > enum_labels . push_back ( L ( " Portrait " ) ) ;
2019-03-11 13:55:28 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionEnum < SLADisplayOrientation > ( sladoPortrait ) ) ;
2018-12-12 10:36:02 +00:00
2019-02-18 15:04:55 +00:00
def = this - > add ( " fast_tilt_time " , coFloat ) ;
def - > label = L ( " Fast " ) ;
def - > full_label = L ( " Fast tilt " ) ;
def - > tooltip = L ( " Time of the fast tilt " ) ;
def - > sidetext = L ( " s " ) ;
def - > min = 0 ;
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 5. ) ) ;
2019-02-18 15:04:55 +00:00
def = this - > add ( " slow_tilt_time " , coFloat ) ;
def - > label = L ( " Slow " ) ;
def - > full_label = L ( " Slow tilt " ) ;
def - > tooltip = L ( " Time of the slow tilt " ) ;
def - > sidetext = L ( " s " ) ;
def - > min = 0 ;
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 8. ) ) ;
2019-02-18 15:04:55 +00:00
def = this - > add ( " area_fill " , coFloat ) ;
def - > label = L ( " Area fill " ) ;
def - > tooltip = L ( " The percentage of the bed area. \n If the print area exceeds the specified value, \n then a slow tilt will be used, otherwise - a fast tilt " ) ;
def - > sidetext = L ( " % " ) ;
def - > min = 0 ;
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 50. ) ) ;
2019-02-18 15:04:55 +00:00
2019-04-09 11:42:32 +00:00
def = this - > add ( " relative_correction " , coFloats ) ;
def - > label = L ( " Printer scaling correction " ) ;
2018-08-03 14:20:39 +00:00
def - > full_label = L ( " Printer scaling correction " ) ;
2018-07-31 13:09:57 +00:00
def - > tooltip = L ( " Printer scaling correction " ) ;
def - > min = 0 ;
2019-04-09 11:42:32 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats ( { 1. , 1. } ) ) ;
2019-08-16 14:17:37 +00:00
2019-04-09 11:42:32 +00:00
def = this - > add ( " absolute_correction " , coFloat ) ;
def - > label = L ( " Printer absolute correction " ) ;
def - > full_label = L ( " Printer absolute correction " ) ;
def - > tooltip = L ( " Will inflate or deflate the sliced 2D polygons according "
" to the sign of the correction. " ) ;
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0.0 ) ) ;
2020-02-06 13:09:48 +00:00
2020-02-06 15:28:02 +00:00
def = this - > add ( " elefant_foot_min_width " , coFloat ) ;
2020-02-19 12:48:10 +00:00
def - > label = L ( " Elephant foot minimum width " ) ;
2020-02-06 15:28:02 +00:00
def - > category = L ( " Advanced " ) ;
2020-02-19 12:48:10 +00:00
def - > tooltip = L ( " Minimum width of features to maintain when doing elephant foot compensation. " ) ;
2020-02-06 15:28:02 +00:00
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
def - > mode = comAdvanced ;
def - > set_default_value ( new ConfigOptionFloat ( 0.2 ) ) ;
2019-08-16 14:17:37 +00:00
2019-04-09 11:42:32 +00:00
def = this - > add ( " gamma_correction " , coFloat ) ;
def - > label = L ( " Printer gamma correction " ) ;
def - > full_label = L ( " Printer gamma correction " ) ;
2019-04-09 12:52:29 +00:00
def - > tooltip = L ( " This will apply a gamma correction to the rasterized 2D "
" polygons. A gamma value of zero means thresholding with "
" the threshold in the middle. This behaviour eliminates "
" antialiasing without losing holes in polygons. " ) ;
2019-04-09 11:42:32 +00:00
def - > min = 0 ;
2019-10-01 12:44:07 +00:00
def - > max = 1 ;
2019-04-09 11:42:32 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 1.0 ) ) ;
2019-08-16 14:17:37 +00:00
2018-07-31 13:09:57 +00:00
// SLA Material settings.
2019-08-02 14:15:27 +00:00
def = this - > add ( " material_type " , coString ) ;
def - > label = L ( " SLA material type " ) ;
def - > tooltip = L ( " SLA material type " ) ;
def - > gui_type = " f_enum_open " ; // TODO: ???
def - > gui_flags = " show_value " ;
def - > enum_values . push_back ( " Tough " ) ;
def - > enum_values . push_back ( " Flexible " ) ;
def - > enum_values . push_back ( " Casting " ) ;
def - > enum_values . push_back ( " Dental " ) ;
def - > enum_values . push_back ( " Heat-resistant " ) ;
def - > set_default_value ( new ConfigOptionString ( " Tough " ) ) ;
2018-07-31 13:09:57 +00:00
def = this - > add ( " initial_layer_height " , coFloat ) ;
def - > label = L ( " Initial layer height " ) ;
def - > tooltip = L ( " Initial layer height " ) ;
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0.3 ) ) ;
2018-07-31 13:09:57 +00:00
2019-09-26 14:33:55 +00:00
def = this - > add ( " bottle_volume " , coFloat ) ;
def - > label = L ( " Bottle volume " ) ;
def - > tooltip = L ( " Bottle volume " ) ;
def - > sidetext = L ( " ml " ) ;
def - > min = 50 ;
2019-09-27 10:08:08 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 1000.0 ) ) ;
2019-09-26 14:33:55 +00:00
def = this - > add ( " bottle_weight " , coFloat ) ;
def - > label = L ( " Bottle weight " ) ;
def - > tooltip = L ( " Bottle weight " ) ;
def - > sidetext = L ( " kg " ) ;
def - > min = 0 ;
def - > set_default_value ( new ConfigOptionFloat ( 1.0 ) ) ;
def = this - > add ( " material_density " , coFloat ) ;
def - > label = L ( " Density " ) ;
def - > tooltip = L ( " Density " ) ;
def - > sidetext = L ( " g/ml " ) ;
def - > min = 0 ;
2019-09-27 10:08:08 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 1.0 ) ) ;
2019-09-26 14:33:55 +00:00
def = this - > add ( " bottle_cost " , coFloat ) ;
def - > label = L ( " Cost " ) ;
def - > tooltip = L ( " Cost " ) ;
def - > sidetext = L ( " money/bottle " ) ;
def - > min = 0 ;
def - > set_default_value ( new ConfigOptionFloat ( 0.0 ) ) ;
2019-02-18 15:04:55 +00:00
def = this - > add ( " faded_layers " , coInt ) ;
def - > label = L ( " Faded layers " ) ;
def - > tooltip = L ( " Number of the layers needed for the exposure time fade from initial exposure time to the exposure time " ) ;
def - > min = 3 ;
def - > max = 20 ;
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 10 ) ) ;
2019-02-18 15:04:55 +00:00
2019-08-20 15:24:48 +00:00
def = this - > add ( " min_exposure_time " , coFloat ) ;
2019-08-20 13:49:32 +00:00
def - > label = L ( " Minimum exposure time " ) ;
def - > tooltip = L ( " Minimum exposure time " ) ;
def - > sidetext = L ( " s " ) ;
def - > min = 0 ;
def - > mode = comExpert ;
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2019-08-20 15:24:48 +00:00
def = this - > add ( " max_exposure_time " , coFloat ) ;
2019-08-20 13:49:32 +00:00
def - > label = L ( " Maximum exposure time " ) ;
def - > tooltip = L ( " Maximum exposure time " ) ;
def - > sidetext = L ( " s " ) ;
def - > min = 0 ;
def - > mode = comExpert ;
def - > set_default_value ( new ConfigOptionFloat ( 100 ) ) ;
2018-07-31 13:09:57 +00:00
def = this - > add ( " exposure_time " , coFloat ) ;
def - > label = L ( " Exposure time " ) ;
def - > tooltip = L ( " Exposure time " ) ;
def - > sidetext = L ( " s " ) ;
def - > min = 0 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 10 ) ) ;
2018-07-31 13:09:57 +00:00
2019-08-20 15:24:48 +00:00
def = this - > add ( " min_initial_exposure_time " , coFloat ) ;
2019-08-20 13:49:32 +00:00
def - > label = L ( " Minimum initial exposure time " ) ;
def - > tooltip = L ( " Minimum initial exposure time " ) ;
def - > sidetext = L ( " s " ) ;
def - > min = 0 ;
def - > mode = comExpert ;
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2019-08-20 15:24:48 +00:00
def = this - > add ( " max_initial_exposure_time " , coFloat ) ;
2019-08-20 13:49:32 +00:00
def - > label = L ( " Maximum initial exposure time " ) ;
def - > tooltip = L ( " Maximum initial exposure time " ) ;
def - > sidetext = L ( " s " ) ;
def - > min = 0 ;
def - > mode = comExpert ;
def - > set_default_value ( new ConfigOptionFloat ( 150 ) ) ;
2018-07-31 13:09:57 +00:00
def = this - > add ( " initial_exposure_time " , coFloat ) ;
def - > label = L ( " Initial exposure time " ) ;
def - > tooltip = L ( " Initial exposure time " ) ;
def - > sidetext = L ( " s " ) ;
def - > min = 0 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 15 ) ) ;
2018-07-31 13:09:57 +00:00
2019-04-03 15:34:46 +00:00
def = this - > add ( " material_correction " , coFloats ) ;
def - > full_label = L ( " Correction for expansion " ) ;
def - > tooltip = L ( " Correction for expansion " ) ;
2018-07-31 13:09:57 +00:00
def - > min = 0 ;
2019-04-03 15:34:46 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloats ( { 1. , 1. } ) ) ;
2018-07-31 13:09:57 +00:00
2018-08-01 09:09:51 +00:00
def = this - > add ( " material_notes " , coString ) ;
def - > label = L ( " SLA print material notes " ) ;
def - > tooltip = L ( " You can put your notes regarding the SLA print material here. " ) ;
def - > multiline = true ;
def - > full_width = true ;
2019-04-13 21:46:52 +00:00
def - > height = 13 ;
2018-10-25 12:55:03 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2018-08-01 09:09:51 +00:00
2019-04-12 14:18:46 +00:00
def = this - > add ( " material_vendor " , coString ) ;
def - > set_default_value ( new ConfigOptionString ( L ( " (Unknown) " ) ) ) ;
def - > cli = ConfigOptionDef : : nocli ;
2018-07-31 13:09:57 +00:00
def = this - > add ( " default_sla_material_profile " , coString ) ;
def - > label = L ( " Default SLA material profile " ) ;
def - > tooltip = L ( " Default print profile associated with the current printer profile. "
" On selection of the current printer profile, this print profile will be activated. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2018-08-06 15:01:41 +00:00
def = this - > add ( " sla_material_settings_id " , coString ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2018-11-16 16:36:23 +00:00
def = this - > add ( " default_sla_print_profile " , coString ) ;
def - > label = L ( " Default SLA material profile " ) ;
def - > tooltip = L ( " Default print profile associated with the current printer profile. "
" On selection of the current printer profile, this print profile will be activated. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2018-11-16 16:36:23 +00:00
def = this - > add ( " sla_print_settings_id " , coString ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( " " ) ) ;
2019-03-13 18:17:26 +00:00
def - > cli = ConfigOptionDef : : nocli ;
2018-11-16 16:36:23 +00:00
2018-11-22 17:02:05 +00:00
def = this - > add ( " supports_enable " , coBool ) ;
def - > label = L ( " Generate supports " ) ;
def - > category = L ( " Supports " ) ;
def - > tooltip = L ( " Generate supports for the models " ) ;
2019-03-11 13:55:28 +00:00
def - > mode = comSimple ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( true ) ) ;
2018-11-22 17:02:05 +00:00
2018-11-23 12:03:07 +00:00
def = this - > add ( " support_head_front_diameter " , coFloat ) ;
2020-07-08 09:31:01 +00:00
def - > label = L ( " Pinhead front diameter " ) ;
2018-11-22 09:33:16 +00:00
def - > category = L ( " Supports " ) ;
2018-11-23 12:03:07 +00:00
def - > tooltip = L ( " Diameter of the pointing side of the head " ) ;
2018-11-16 16:36:23 +00:00
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
2019-03-11 15:27:54 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0.4 ) ) ;
2018-11-16 16:36:23 +00:00
def = this - > add ( " support_head_penetration " , coFloat ) ;
2020-07-08 09:31:01 +00:00
def - > label = L ( " Head penetration " ) ;
2018-11-22 09:33:16 +00:00
def - > category = L ( " Supports " ) ;
2018-11-16 16:36:23 +00:00
def - > tooltip = L ( " How much the pinhead has to penetrate the model surface " ) ;
def - > sidetext = L ( " mm " ) ;
2019-03-11 13:55:28 +00:00
def - > mode = comAdvanced ;
2018-11-16 16:36:23 +00:00
def - > min = 0 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0.2 ) ) ;
2018-11-16 16:36:23 +00:00
def = this - > add ( " support_head_width " , coFloat ) ;
2020-07-08 09:31:01 +00:00
def - > label = L ( " Pinhead width " ) ;
2018-11-22 09:33:16 +00:00
def - > category = L ( " Supports " ) ;
2018-11-16 16:36:23 +00:00
def - > tooltip = L ( " Width from the back sphere center to the front sphere center " ) ;
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
2019-03-11 13:55:28 +00:00
def - > max = 20 ;
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 1.0 ) ) ;
2018-11-16 16:36:23 +00:00
2018-11-23 12:03:07 +00:00
def = this - > add ( " support_pillar_diameter " , coFloat ) ;
2020-07-08 09:31:01 +00:00
def - > label = L ( " Pillar diameter " ) ;
2018-11-22 09:33:16 +00:00
def - > category = L ( " Supports " ) ;
2018-11-23 12:03:07 +00:00
def - > tooltip = L ( " Diameter in mm of the support pillars " ) ;
2018-11-16 16:36:23 +00:00
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
2019-03-11 13:55:28 +00:00
def - > max = 15 ;
def - > mode = comSimple ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 1.0 ) ) ;
2020-07-08 09:31:01 +00:00
def = this - > add ( " support_small_pillar_diameter_percent " , coPercent ) ;
def - > label = L ( " Small pillar diameter percent " ) ;
def - > category = L ( " Supports " ) ;
def - > tooltip = L ( " The percentage of smaller pillars compared to the normal pillar diameter "
" which are used in problematic areas where a normal pilla cannot fit. " ) ;
def - > sidetext = L ( " % " ) ;
def - > min = 1 ;
def - > max = 100 ;
def - > mode = comExpert ;
def - > set_default_value ( new ConfigOptionPercent ( 50 ) ) ;
2020-03-02 11:43:00 +00:00
def = this - > add ( " support_max_bridges_on_pillar " , coInt ) ;
def - > label = L ( " Max bridges on a pillar " ) ;
def - > tooltip = L (
" Maximum number of bridges that can be placed on a pillar. Bridges "
" hold support point pinheads and connect to pillars as small branches. " ) ;
def - > min = 0 ;
def - > max = 50 ;
def - > mode = comExpert ;
def - > set_default_value ( new ConfigOptionInt ( 3 ) ) ;
2018-11-23 10:51:45 +00:00
2019-01-09 11:21:43 +00:00
def = this - > add ( " support_pillar_connection_mode " , coEnum ) ;
2020-07-08 09:31:01 +00:00
def - > label = L ( " Pillar connection mode " ) ;
2019-05-09 13:39:15 +00:00
def - > tooltip = L ( " Controls the bridge type between two neighboring pillars. "
2019-01-09 11:21:43 +00:00
" Can be zig-zag, cross (double zig-zag) or dynamic which "
" will automatically switch between the first two depending "
" on the distance of the two pillars. " ) ;
def - > enum_keys_map = & ConfigOptionEnum < SLAPillarConnectionMode > : : get_enum_values ( ) ;
def - > enum_values . push_back ( " zigzag " ) ;
def - > enum_values . push_back ( " cross " ) ;
def - > enum_values . push_back ( " dynamic " ) ;
def - > enum_labels . push_back ( L ( " Zig-Zag " ) ) ;
def - > enum_labels . push_back ( L ( " Cross " ) ) ;
def - > enum_labels . push_back ( L ( " Dynamic " ) ) ;
2019-03-11 13:55:28 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionEnum < SLAPillarConnectionMode > ( slapcmDynamic ) ) ;
2019-01-09 11:21:43 +00:00
2019-02-05 10:16:03 +00:00
def = this - > add ( " support_buildplate_only " , coBool ) ;
def - > label = L ( " Support on build plate only " ) ;
def - > category = L ( " Supports " ) ;
def - > tooltip = L ( " Only create support if it lies on a build plate. Don't create support on a print. " ) ;
def - > mode = comSimple ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2019-02-05 10:16:03 +00:00
2018-11-23 10:51:45 +00:00
def = this - > add ( " support_pillar_widening_factor " , coFloat ) ;
def - > label = L ( " Pillar widening factor " ) ;
def - > category = L ( " Supports " ) ;
def - > tooltip = L ( " Merging bridges or pillars into another pillars can "
" increase the radius. Zero means no increase, one means "
" full increase. " ) ;
def - > min = 0 ;
2018-11-23 12:03:07 +00:00
def - > max = 1 ;
2019-03-11 13:55:28 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0.0 ) ) ;
2018-11-16 16:36:23 +00:00
2018-11-23 12:03:07 +00:00
def = this - > add ( " support_base_diameter " , coFloat ) ;
def - > label = L ( " Support base diameter " ) ;
2018-11-22 09:33:16 +00:00
def - > category = L ( " Supports " ) ;
2018-11-23 12:03:07 +00:00
def - > tooltip = L ( " Diameter in mm of the pillar base " ) ;
2018-11-16 16:36:23 +00:00
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
2019-03-11 13:55:28 +00:00
def - > max = 30 ;
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 4.0 ) ) ;
2018-11-16 16:36:23 +00:00
def = this - > add ( " support_base_height " , coFloat ) ;
def - > label = L ( " Support base height " ) ;
2018-11-22 09:33:16 +00:00
def - > category = L ( " Supports " ) ;
2018-11-16 16:36:23 +00:00
def - > tooltip = L ( " The height of the pillar base cone " ) ;
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
2019-03-11 13:55:28 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 1.0 ) ) ;
2019-08-16 14:17:37 +00:00
2019-06-11 15:57:39 +00:00
def = this - > add ( " support_base_safety_distance " , coFloat ) ;
def - > label = L ( " Support base safety distance " ) ;
def - > category = L ( " Supports " ) ;
def - > tooltip = L (
" The minimum distance of the pillar base from the model in mm. "
" Makes sense in zero elevation mode where a gap according "
" to this parameter is inserted between the model and the pad. " ) ;
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
def - > max = 10 ;
def - > mode = comExpert ;
2019-06-12 11:15:42 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 1 ) ) ;
2018-11-16 16:36:23 +00:00
def = this - > add ( " support_critical_angle " , coFloat ) ;
def - > label = L ( " Critical angle " ) ;
2018-11-22 09:33:16 +00:00
def - > category = L ( " Supports " ) ;
2018-11-16 16:36:23 +00:00
def - > tooltip = L ( " The default angle for connecting support sticks and junctions. " ) ;
def - > sidetext = L ( " ° " ) ;
def - > min = 0 ;
2019-03-11 13:55:28 +00:00
def - > max = 90 ;
2019-03-11 15:27:54 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 45 ) ) ;
2018-11-16 16:36:23 +00:00
def = this - > add ( " support_max_bridge_length " , coFloat ) ;
def - > label = L ( " Max bridge length " ) ;
2018-11-22 09:33:16 +00:00
def - > category = L ( " Supports " ) ;
2018-11-16 16:36:23 +00:00
def - > tooltip = L ( " The max length of a bridge " ) ;
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
2019-03-11 15:27:54 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 15.0 ) ) ;
2018-11-19 16:58:08 +00:00
2019-03-08 10:39:34 +00:00
def = this - > add ( " support_max_pillar_link_distance " , coFloat ) ;
def - > label = L ( " Max pillar linking distance " ) ;
def - > category = L ( " Supports " ) ;
2019-03-11 13:55:28 +00:00
def - > tooltip = L ( " The max distance of two pillars to get linked with each other. "
" A zero value will prohibit pillar cascading. " ) ;
2019-03-08 10:39:34 +00:00
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ; // 0 means no linking
2019-03-11 15:27:54 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 10.0 ) ) ;
2019-03-08 10:39:34 +00:00
2018-11-19 16:58:08 +00:00
def = this - > add ( " support_object_elevation " , coFloat ) ;
def - > label = L ( " Object elevation " ) ;
2018-11-22 09:33:16 +00:00
def - > category = L ( " Supports " ) ;
2019-06-11 15:57:39 +00:00
def - > tooltip = L ( " How much the supports should lift up the supported object. "
2019-08-28 09:32:49 +00:00
" If \" Pad around object \" is enabled, this value is ignored. " ) ;
2018-11-19 16:58:08 +00:00
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
2019-03-11 13:55:28 +00:00
def - > max = 150 ; // This is the max height of print on SL1
2019-03-11 15:27:54 +00:00
def - > mode = comAdvanced ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 5.0 ) ) ;
2018-11-16 16:36:23 +00:00
2019-02-19 15:34:52 +00:00
def = this - > add ( " support_points_density_relative " , coInt ) ;
def - > label = L ( " Support points density " ) ;
2018-12-07 13:10:16 +00:00
def - > category = L ( " Supports " ) ;
2019-02-19 15:34:52 +00:00
def - > tooltip = L ( " This is a relative measure of support points density. " ) ;
def - > sidetext = L ( " % " ) ;
2018-12-07 13:10:16 +00:00
def - > min = 0 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionInt ( 100 ) ) ;
2018-12-07 13:10:16 +00:00
2019-02-19 15:34:52 +00:00
def = this - > add ( " support_points_minimal_distance " , coFloat ) ;
def - > label = L ( " Minimal distance of the support points " ) ;
2018-12-07 13:10:16 +00:00
def - > category = L ( " Supports " ) ;
2019-02-19 15:34:52 +00:00
def - > tooltip = L ( " No support points will be placed closer than this threshold. " ) ;
2018-12-07 13:10:16 +00:00
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 1.f ) ) ;
2018-12-07 13:10:16 +00:00
2018-11-20 15:12:04 +00:00
def = this - > add ( " pad_enable " , coBool ) ;
def - > label = L ( " Use pad " ) ;
2018-11-22 09:33:16 +00:00
def - > category = L ( " Pad " ) ;
2018-11-20 15:12:04 +00:00
def - > tooltip = L ( " Add a pad underneath the supported model " ) ;
2019-03-11 13:55:28 +00:00
def - > mode = comSimple ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( true ) ) ;
2018-11-20 15:12:04 +00:00
2018-11-16 16:36:23 +00:00
def = this - > add ( " pad_wall_thickness " , coFloat ) ;
def - > label = L ( " Pad wall thickness " ) ;
2018-11-22 09:33:16 +00:00
def - > category = L ( " Pad " ) ;
2019-03-11 13:55:28 +00:00
def - > tooltip = L ( " The thickness of the pad and its optional cavity walls. " ) ;
2018-11-16 16:36:23 +00:00
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
2019-03-11 13:55:28 +00:00
def - > max = 30 ;
def - > mode = comSimple ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 2.0 ) ) ;
2018-11-16 16:36:23 +00:00
def = this - > add ( " pad_wall_height " , coFloat ) ;
def - > label = L ( " Pad wall height " ) ;
2019-04-11 13:45:14 +00:00
def - > tooltip = L ( " Defines the pad cavity depth. Set to zero to disable the cavity. "
" Be careful when enabling this feature, as some resins may "
" produce an extreme suction effect inside the cavity, "
2019-05-09 13:44:53 +00:00
" which makes peeling the print off the vat foil difficult. " ) ;
2018-11-22 09:33:16 +00:00
def - > category = L ( " Pad " ) ;
2019-01-21 11:34:28 +00:00
// def->tooltip = L("");
2018-11-16 16:36:23 +00:00
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
2019-03-11 13:55:28 +00:00
def - > max = 30 ;
2019-04-11 13:45:14 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0. ) ) ;
2019-09-24 13:15:49 +00:00
def = this - > add ( " pad_brim_size " , coFloat ) ;
def - > label = L ( " Pad brim size " ) ;
def - > tooltip = L ( " How far should the pad extend around the contained geometry " ) ;
def - > category = L ( " Pad " ) ;
// def->tooltip = L("");
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
def - > max = 30 ;
def - > mode = comAdvanced ;
def - > set_default_value ( new ConfigOptionFloat ( 1.6 ) ) ;
2018-11-16 16:36:23 +00:00
def = this - > add ( " pad_max_merge_distance " , coFloat ) ;
def - > label = L ( " Max merge distance " ) ;
2018-11-22 09:33:16 +00:00
def - > category = L ( " Pad " ) ;
2019-03-11 13:55:28 +00:00
def - > tooltip = L ( " Some objects can get along with a few smaller pads "
" instead of a single big one. This parameter defines "
" how far the center of two smaller pads should be. If they "
" are closer, they will get merged into one pad. " ) ;
2018-11-16 16:36:23 +00:00
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
2019-03-11 13:55:28 +00:00
def - > mode = comExpert ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 50.0 ) ) ;
2018-11-16 16:36:23 +00:00
2019-03-11 13:55:28 +00:00
// This is disabled on the UI. I hope it will never be enabled.
2019-08-06 14:51:32 +00:00
// def = this->add("pad_edge_radius", coFloat);
// def->label = L("Pad edge radius");
// def->category = L("Pad");
//// def->tooltip = L("");
// def->sidetext = L("mm");
// def->min = 0;
// def->mode = comAdvanced;
// def->set_default_value(new ConfigOptionFloat(1.0));
2019-02-25 11:06:38 +00:00
2019-02-25 15:04:46 +00:00
def = this - > add ( " pad_wall_slope " , coFloat ) ;
def - > label = L ( " Pad wall slope " ) ;
2019-02-25 11:06:38 +00:00
def - > category = L ( " Pad " ) ;
2019-02-25 15:04:46 +00:00
def - > tooltip = L ( " The slope of the pad wall relative to the bed plane. "
2019-02-25 11:06:38 +00:00
" 90 degrees means straight walls. " ) ;
2019-05-09 18:25:24 +00:00
def - > sidetext = L ( " ° " ) ;
2019-02-25 15:04:46 +00:00
def - > min = 45 ;
2019-02-25 11:06:38 +00:00
def - > max = 90 ;
2019-03-11 13:55:28 +00:00
def - > mode = comAdvanced ;
2020-02-18 14:39:30 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 90.0 ) ) ;
2019-08-16 14:17:37 +00:00
2019-08-28 09:32:49 +00:00
def = this - > add ( " pad_around_object " , coBool ) ;
2019-08-06 14:51:32 +00:00
def - > label = L ( " Pad around object " ) ;
def - > category = L ( " Pad " ) ;
def - > tooltip = L ( " Create pad around object and ignore the support elevation " ) ;
def - > mode = comSimple ;
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2019-09-24 13:15:49 +00:00
def = this - > add ( " pad_around_object_everywhere " , coBool ) ;
def - > label = L ( " Pad around object everywhere " ) ;
def - > category = L ( " Pad " ) ;
def - > tooltip = L ( " Force pad around object everywhere " ) ;
def - > mode = comSimple ;
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2019-08-06 14:51:32 +00:00
2019-06-12 11:15:42 +00:00
def = this - > add ( " pad_object_gap " , coFloat ) ;
def - > label = L ( " Pad object gap " ) ;
def - > category = L ( " Pad " ) ;
def - > tooltip = L ( " The gap between the object bottom and the generated "
" pad in zero elevation mode. " ) ;
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
def - > max = 10 ;
def - > mode = comExpert ;
def - > set_default_value ( new ConfigOptionFloat ( 1 ) ) ;
2019-08-16 14:17:37 +00:00
2019-06-11 15:57:39 +00:00
def = this - > add ( " pad_object_connector_stride " , coFloat ) ;
def - > label = L ( " Pad object connector stride " ) ;
def - > category = L ( " Pad " ) ;
2019-08-27 10:19:44 +00:00
def - > tooltip = L ( " Distance between two connector sticks which connect the object and the generated pad. " ) ;
2019-06-11 15:57:39 +00:00
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
def - > mode = comExpert ;
def - > set_default_value ( new ConfigOptionFloat ( 10 ) ) ;
2019-08-16 14:17:37 +00:00
2019-06-11 15:57:39 +00:00
def = this - > add ( " pad_object_connector_width " , coFloat ) ;
def - > label = L ( " Pad object connector width " ) ;
def - > category = L ( " Pad " ) ;
2019-08-27 10:22:34 +00:00
def - > tooltip = L ( " Width of the connector sticks which connect the object and the generated pad. " ) ;
2019-06-11 15:57:39 +00:00
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
def - > mode = comExpert ;
2019-06-12 11:15:42 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0.5 ) ) ;
2019-08-16 14:17:37 +00:00
2019-06-11 15:57:39 +00:00
def = this - > add ( " pad_object_connector_penetration " , coFloat ) ;
def - > label = L ( " Pad object connector penetration " ) ;
def - > category = L ( " Pad " ) ;
def - > tooltip = L (
" How much should the tiny connectors penetrate into the model body. " ) ;
def - > sidetext = L ( " mm " ) ;
def - > min = 0 ;
def - > mode = comExpert ;
def - > set_default_value ( new ConfigOptionFloat ( 0.3 ) ) ;
2019-11-06 12:38:43 +00:00
def = this - > add ( " hollowing_enable " , coBool ) ;
def - > label = L ( " Enable hollowing " ) ;
def - > category = L ( " Hollowing " ) ;
def - > tooltip = L ( " Hollow out a model to have an empty interior " ) ;
def - > mode = comSimple ;
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
def = this - > add ( " hollowing_min_thickness " , coFloat ) ;
2020-02-13 13:58:17 +00:00
def - > label = L ( " Wall thickness " ) ;
2019-11-06 12:38:43 +00:00
def - > category = L ( " Hollowing " ) ;
def - > tooltip = L ( " Minimum wall thickness of a hollowed model. " ) ;
def - > sidetext = L ( " mm " ) ;
def - > min = 1 ;
2020-01-14 09:33:10 +00:00
def - > max = 10 ;
2019-11-06 12:38:43 +00:00
def - > mode = comSimple ;
2020-01-14 09:33:10 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 3. ) ) ;
2019-11-07 08:34:34 +00:00
2019-11-08 08:21:30 +00:00
def = this - > add ( " hollowing_quality " , coFloat ) ;
2020-02-13 13:58:17 +00:00
def - > label = L ( " Accuracy " ) ;
2019-11-07 08:34:34 +00:00
def - > category = L ( " Hollowing " ) ;
def - > tooltip = L ( " Performance vs accuracy of calculation. Lower values may produce unwanted artifacts. " ) ;
def - > min = 0 ;
def - > max = 1 ;
def - > mode = comExpert ;
def - > set_default_value ( new ConfigOptionFloat ( 0.5 ) ) ;
2019-11-08 15:51:43 +00:00
def = this - > add ( " hollowing_closing_distance " , coFloat ) ;
2020-02-13 13:58:17 +00:00
def - > label = L ( " Closing distance " ) ;
2019-11-07 08:34:34 +00:00
def - > category = L ( " Hollowing " ) ;
2020-02-13 13:58:17 +00:00
def - > tooltip = L (
" Hollowing is done in two steps: first, an imaginary interior is "
" calculated deeper (offset plus the closing distance) in the object and "
" then it's inflated back to the specified offset. A greater closing "
" distance makes the interior more rounded. At zero, the interior will "
" resemble the exterior the most. " ) ;
def - > sidetext = L ( " mm " ) ;
2019-11-07 08:34:34 +00:00
def - > min = 0 ;
2020-01-14 09:33:10 +00:00
def - > max = 10 ;
2019-11-07 08:34:34 +00:00
def - > mode = comExpert ;
2019-11-08 15:51:43 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 2.0 ) ) ;
2018-07-31 13:09:57 +00:00
}
2017-10-17 14:01:18 +00:00
void PrintConfigDef : : handle_legacy ( t_config_option_key & opt_key , std : : string & value )
2017-09-18 07:56:48 +00:00
{
// handle legacy options
if ( opt_key = = " extrusion_width_ratio " | | opt_key = = " bottom_layer_speed_ratio "
| | opt_key = = " first_layer_height_ratio " ) {
boost : : replace_first ( opt_key , " _ratio " , " " ) ;
if ( opt_key = = " bottom_layer_speed " ) opt_key = " first_layer_speed " ;
try {
float v = boost : : lexical_cast < float > ( value ) ;
2019-08-16 14:17:37 +00:00
if ( v ! = 0 )
2017-09-18 07:56:48 +00:00
value = boost : : lexical_cast < std : : string > ( v * 100 ) + " % " ;
} catch ( boost : : bad_lexical_cast & ) {
value = " 0 " ;
}
} else if ( opt_key = = " gcode_flavor " & & value = = " makerbot " ) {
value = " makerware " ;
} else if ( opt_key = = " fill_density " & & value . find ( " % " ) = = std : : string : : npos ) {
try {
// fill_density was turned into a percent value
float v = boost : : lexical_cast < float > ( value ) ;
value = boost : : lexical_cast < std : : string > ( v * 100 ) + " % " ;
} catch ( boost : : bad_lexical_cast & ) { }
} else if ( opt_key = = " randomize_start " & & value = = " 1 " ) {
opt_key = " seam_position " ;
value = " random " ;
} else if ( opt_key = = " bed_size " & & ! value . empty ( ) ) {
opt_key = " bed_shape " ;
ConfigOptionPoint p ;
p . deserialize ( value ) ;
std : : ostringstream oss ;
2018-08-17 13:53:43 +00:00
oss < < " 0x0, " < < p . value ( 0 ) < < " x0, " < < p . value ( 0 ) < < " x " < < p . value ( 1 ) < < " ,0x " < < p . value ( 1 ) ;
2017-09-18 07:56:48 +00:00
value = oss . str ( ) ;
} else if ( ( opt_key = = " perimeter_acceleration " & & value = = " 25 " )
| | ( opt_key = = " infill_acceleration " & & value = = " 50 " ) ) {
/* For historical reasons, the world's full of configs having these very low values;
to avoid unexpected behavior we need to ignore them . Banning these two hard - coded
values is a dirty hack and will need to be removed sometime in the future , but it
will avoid lots of complaints for now . */
value = " 0 " ;
2018-03-14 19:08:34 +00:00
} else if ( opt_key = = " support_material_pattern " & & value = = " pillars " ) {
// Slic3r PE does not support the pillars. They never worked well.
value = " rectilinear " ;
2020-03-14 06:46:39 +00:00
} else if ( opt_key = = " skirt_height " & & value = = " -1 " ) {
// PrusaSlicer no more accepts skirt_height == -1 to print a draft shield to the top of the highest object.
// A new "draft_shield" boolean config value is used instead.
opt_key = " draft_shield " ;
value = " 1 " ;
2018-08-20 18:19:22 +00:00
} else if ( opt_key = = " octoprint_host " ) {
opt_key = " print_host " ;
} else if ( opt_key = = " octoprint_cafile " ) {
opt_key = " printhost_cafile " ;
} else if ( opt_key = = " octoprint_apikey " ) {
opt_key = " printhost_apikey " ;
2017-09-18 07:56:48 +00:00
}
2019-08-16 14:17:37 +00:00
2017-10-27 16:52:35 +00:00
// Ignore the following obsolete configuration keys:
static std : : set < std : : string > ignore = {
" duplicate_x " , " duplicate_y " , " gcode_arcs " , " multiply_x " , " multiply_y " ,
2019-08-16 14:17:37 +00:00
" support_material_tool " , " acceleration " , " adjust_overhang_flow " ,
2017-10-27 16:52:35 +00:00
" standby_temperature " , " scale " , " rotate " , " duplicate " , " duplicate_grid " ,
2019-08-16 14:17:37 +00:00
" start_perimeters_at_concave_points " , " start_perimeters_at_non_overhang " , " randomize_start " ,
" seal_position " , " vibration_limit " , " bed_size " ,
2018-04-13 11:43:53 +00:00
" print_center " , " g0 " , " threads " , " pressure_advance " , " wipe_tower_per_color_wipe "
2019-01-29 17:07:45 +00:00
# ifndef HAS_PRESSURE_EQUALIZER
, " max_volumetric_extrusion_rate_slope_positive " , " max_volumetric_extrusion_rate_slope_negative "
# endif /* HAS_PRESSURE_EQUALIZER */
2017-10-27 16:52:35 +00:00
} ;
2018-04-13 11:43:53 +00:00
2017-10-27 16:52:35 +00:00
if ( ignore . find ( opt_key ) ! = ignore . end ( ) ) {
2017-09-18 07:56:48 +00:00
opt_key = " " ;
return ;
}
2019-08-16 14:17:37 +00:00
2017-10-17 14:01:18 +00:00
if ( ! print_config_def . has ( opt_key ) ) {
2017-09-18 07:56:48 +00:00
opt_key = " " ;
return ;
}
}
2018-09-20 14:48:13 +00:00
const PrintConfigDef print_config_def ;
2017-10-17 14:01:18 +00:00
2019-10-16 09:16:50 +00:00
DynamicPrintConfig DynamicPrintConfig : : full_print_config ( )
{
return DynamicPrintConfig ( ( const PrintRegionConfig & ) FullPrintConfig : : defaults ( ) ) ;
}
DynamicPrintConfig : : DynamicPrintConfig ( const StaticPrintConfig & rhs ) : DynamicConfig ( rhs , rhs . keys_ref ( ) )
2017-10-27 16:52:35 +00:00
{
}
DynamicPrintConfig * DynamicPrintConfig : : new_from_defaults_keys ( const std : : vector < std : : string > & keys )
{
auto * out = new DynamicPrintConfig ( ) ;
out - > apply_only ( FullPrintConfig : : defaults ( ) , keys ) ;
return out ;
}
2020-04-23 16:17:37 +00:00
double min_object_distance ( const ConfigBase & cfg )
{
double ret = 0. ;
if ( printer_technology ( cfg ) = = ptSLA ) ret = 6. ;
else {
auto ecr_opt = cfg . option < ConfigOptionFloat > ( " extruder_clearance_radius " ) ;
auto dd_opt = cfg . option < ConfigOptionFloat > ( " duplicate_distance " ) ;
auto co_opt = cfg . option < ConfigOptionBool > ( " complete_objects " ) ;
if ( ! ecr_opt | | ! dd_opt | | ! co_opt ) ret = 0. ;
else {
// min object distance is max(duplicate_distance, clearance_radius)
ret = ( co_opt - > value & & ecr_opt - > value > dd_opt - > value ) ?
ecr_opt - > value : dd_opt - > value ;
}
}
return ret ;
}
PrinterTechnology printer_technology ( const ConfigBase & cfg )
{
const ConfigOptionEnum < PrinterTechnology > * opt = cfg . option < ConfigOptionEnum < PrinterTechnology > > ( " printer_technology " ) ;
if ( opt ) return opt - > value ;
const ConfigOptionBool * export_opt = cfg . option < ConfigOptionBool > ( " export_sla " ) ;
if ( export_opt & & export_opt - > getBool ( ) ) return ptSLA ;
export_opt = cfg . option < ConfigOptionBool > ( " export_gcode " ) ;
if ( export_opt & & export_opt - > getBool ( ) ) return ptFFF ;
return ptUnknown ;
}
2017-10-17 14:01:18 +00:00
void DynamicPrintConfig : : normalize ( )
{
if ( this - > has ( " extruder " ) ) {
int extruder = this - > option ( " extruder " ) - > getInt ( ) ;
this - > erase ( " extruder " ) ;
if ( extruder ! = 0 ) {
if ( ! this - > has ( " infill_extruder " ) )
this - > option ( " infill_extruder " , true ) - > setInt ( extruder ) ;
if ( ! this - > has ( " perimeter_extruder " ) )
this - > option ( " perimeter_extruder " , true ) - > setInt ( extruder ) ;
// Don't propagate the current extruder to support.
// For non-soluble supports, the default "0" extruder means to use the active extruder,
// for soluble supports one certainly does not want to set the extruder to non-soluble.
// if (!this->has("support_material_extruder"))
// this->option("support_material_extruder", true)->setInt(extruder);
// if (!this->has("support_material_interface_extruder"))
// this->option("support_material_interface_extruder", true)->setInt(extruder);
}
}
2019-08-16 14:17:37 +00:00
2017-10-17 14:01:18 +00:00
if ( ! this - > has ( " solid_infill_extruder " ) & & this - > has ( " infill_extruder " ) )
this - > option ( " solid_infill_extruder " , true ) - > setInt ( this - > option ( " infill_extruder " ) - > getInt ( ) ) ;
2019-08-16 14:17:37 +00:00
2017-10-17 14:01:18 +00:00
if ( this - > has ( " spiral_vase " ) & & this - > opt < ConfigOptionBool > ( " spiral_vase " , true ) - > value ) {
{
// this should be actually done only on the spiral layers instead of all
ConfigOptionBools * opt = this - > opt < ConfigOptionBools > ( " retract_layer_change " , true ) ;
opt - > values . assign ( opt - > values . size ( ) , false ) ; // set all values to false
}
{
this - > opt < ConfigOptionInt > ( " perimeters " , true ) - > value = 1 ;
this - > opt < ConfigOptionInt > ( " top_solid_layers " , true ) - > value = 0 ;
2019-09-10 17:09:37 +00:00
this - > opt < ConfigOptionPercent > ( " fill_density " , true ) - > value = 0 ;
2017-10-17 14:01:18 +00:00
}
}
}
2019-10-15 14:31:20 +00:00
void DynamicPrintConfig : : set_num_extruders ( unsigned int num_extruders )
{
const auto & defaults = FullPrintConfig : : defaults ( ) ;
for ( const std : : string & key : print_config_def . extruder_option_keys ( ) ) {
if ( key = = " default_filament_profile " )
continue ;
auto * opt = this - > option ( key , false ) ;
assert ( opt ! = nullptr ) ;
assert ( opt - > is_vector ( ) ) ;
if ( opt ! = nullptr & & opt - > is_vector ( ) )
static_cast < ConfigOptionVectorBase * > ( opt ) - > resize ( num_extruders , defaults . option ( key ) ) ;
}
}
2017-10-17 14:01:18 +00:00
std : : string DynamicPrintConfig : : validate ( )
2015-12-02 17:29:33 +00:00
{
2017-10-17 14:01:18 +00:00
// Full print config is initialized from the defaults.
2019-08-16 14:17:37 +00:00
const ConfigOption * opt = this - > option ( " printer_technology " , false ) ;
auto printer_technology = ( opt = = nullptr ) ? ptFFF : static_cast < PrinterTechnology > ( dynamic_cast < const ConfigOptionEnumGeneric * > ( opt ) - > value ) ;
2018-11-08 19:18:40 +00:00
switch ( printer_technology ) {
case ptFFF :
{
FullPrintConfig fpc ;
fpc . apply ( * this , true ) ;
// Verify this print options through the FullPrintConfig.
return fpc . validate ( ) ;
}
default :
//FIXME no validation on SLA data?
return std : : string ( ) ;
}
2017-10-17 14:01:18 +00:00
}
2019-05-09 12:15:56 +00:00
//FIXME localize this function.
2017-10-17 14:01:18 +00:00
std : : string FullPrintConfig : : validate ( )
{
// --layer-height
if ( this - > get_abs_value ( " layer_height " ) < = 0 )
return " Invalid value for --layer-height " ;
if ( fabs ( fmod ( this - > get_abs_value ( " layer_height " ) , SCALING_FACTOR ) ) > 1e-4 )
return " --layer-height must be a multiple of print resolution " ;
// --first-layer-height
if ( this - > get_abs_value ( " first_layer_height " ) < = 0 )
return " Invalid value for --first-layer-height " ;
// --filament-diameter
for ( double fd : this - > filament_diameter . values )
if ( fd < 1 )
return " Invalid value for --filament-diameter " ;
// --nozzle-diameter
for ( double nd : this - > nozzle_diameter . values )
2017-10-27 14:11:06 +00:00
if ( nd < 0.005 )
2017-10-17 14:01:18 +00:00
return " Invalid value for --nozzle-diameter " ;
2019-08-16 14:17:37 +00:00
2017-10-17 14:01:18 +00:00
// --perimeters
if ( this - > perimeters . value < 0 )
return " Invalid value for --perimeters " ;
// --solid-layers
if ( this - > top_solid_layers < 0 )
return " Invalid value for --top-solid-layers " ;
if ( this - > bottom_solid_layers < 0 )
return " Invalid value for --bottom-solid-layers " ;
2019-08-16 14:17:37 +00:00
if ( this - > use_firmware_retraction . value & &
2017-10-17 14:01:18 +00:00
this - > gcode_flavor . value ! = gcfSmoothie & &
this - > gcode_flavor . value ! = gcfRepRap & &
2018-01-06 17:49:28 +00:00
this - > gcode_flavor . value ! = gcfMarlin & &
2017-10-17 14:01:18 +00:00
this - > gcode_flavor . value ! = gcfMachinekit & &
this - > gcode_flavor . value ! = gcfRepetier )
return " --use-firmware-retraction is only supported by Marlin, Smoothie, Repetier and Machinekit firmware " ;
if ( this - > use_firmware_retraction . value )
2019-03-13 14:44:50 +00:00
for ( unsigned char wipe : this - > wipe . values )
2017-10-17 14:01:18 +00:00
if ( wipe )
return " --use-firmware-retraction is not compatible with --wipe " ;
2019-08-16 14:17:37 +00:00
2017-10-17 14:01:18 +00:00
// --gcode-flavor
if ( ! print_config_def . get ( " gcode_flavor " ) - > has_enum_value ( this - > gcode_flavor . serialize ( ) ) )
return " Invalid value for --gcode-flavor " ;
2019-08-16 14:17:37 +00:00
2017-10-17 14:01:18 +00:00
// --fill-pattern
if ( ! print_config_def . get ( " fill_pattern " ) - > has_enum_value ( this - > fill_pattern . serialize ( ) ) )
return " Invalid value for --fill-pattern " ;
2019-08-16 14:17:37 +00:00
2019-02-22 14:25:35 +00:00
// --top-fill-pattern
if ( ! print_config_def . get ( " top_fill_pattern " ) - > has_enum_value ( this - > top_fill_pattern . serialize ( ) ) )
return " Invalid value for --top-fill-pattern " ;
// --bottom-fill-pattern
if ( ! print_config_def . get ( " bottom_fill_pattern " ) - > has_enum_value ( this - > bottom_fill_pattern . serialize ( ) ) )
return " Invalid value for --bottom-fill-pattern " ;
2017-10-17 14:01:18 +00:00
// --fill-density
if ( fabs ( this - > fill_density . value - 100. ) < EPSILON & &
2019-02-22 14:25:35 +00:00
! print_config_def . get ( " top_fill_pattern " ) - > has_enum_value ( this - > fill_pattern . serialize ( ) ) )
2017-10-17 14:01:18 +00:00
return " The selected fill pattern is not supposed to work at 100% density " ;
2019-08-16 14:17:37 +00:00
2017-10-17 14:01:18 +00:00
// --infill-every-layers
if ( this - > infill_every_layers < 1 )
return " Invalid value for --infill-every-layers " ;
// --skirt-height
2020-03-14 06:46:39 +00:00
if ( this - > skirt_height < 0 )
2017-10-17 14:01:18 +00:00
return " Invalid value for --skirt-height " ;
2019-08-16 14:17:37 +00:00
2017-10-17 14:01:18 +00:00
// --bridge-flow-ratio
if ( this - > bridge_flow_ratio < = 0 )
return " Invalid value for --bridge-flow-ratio " ;
2019-08-16 14:17:37 +00:00
2017-10-17 14:01:18 +00:00
// extruder clearance
if ( this - > extruder_clearance_radius < = 0 )
return " Invalid value for --extruder-clearance-radius " ;
if ( this - > extruder_clearance_height < = 0 )
return " Invalid value for --extruder-clearance-height " ;
// --extrusion-multiplier
2019-03-13 14:44:50 +00:00
for ( double em : this - > extrusion_multiplier . values )
2017-10-17 14:01:18 +00:00
if ( em < = 0 )
return " Invalid value for --extrusion-multiplier " ;
// --default-acceleration
if ( ( this - > perimeter_acceleration ! = 0. | | this - > infill_acceleration ! = 0. | | this - > bridge_acceleration ! = 0. | | this - > first_layer_acceleration ! = 0. ) & &
this - > default_acceleration = = 0. )
return " Invalid zero value for --default-acceleration when using other acceleration settings " ;
// --spiral-vase
if ( this - > spiral_vase ) {
// Note that we might want to have more than one perimeter on the bottom
// solid layers.
if ( this - > perimeters > 1 )
return " Can't make more than one perimeter when spiral vase mode is enabled " ;
else if ( this - > perimeters < 1 )
return " Can't make less than one perimeter when spiral vase mode is enabled " ;
if ( this - > fill_density > 0 )
return " Spiral vase mode can only print hollow objects, so you need to set Fill density to 0 " ;
if ( this - > top_solid_layers > 0 )
return " Spiral vase mode is not compatible with top solid layers " ;
if ( this - > support_material | | this - > support_material_enforce_layers > 0 )
return " Spiral vase mode is not compatible with support material " ;
}
2019-08-16 14:17:37 +00:00
2017-10-17 14:01:18 +00:00
// extrusion widths
{
double max_nozzle_diameter = 0. ;
for ( double dmr : this - > nozzle_diameter . values )
max_nozzle_diameter = std : : max ( max_nozzle_diameter , dmr ) ;
const char * widths [ ] = { " external_perimeter " , " perimeter " , " infill " , " solid_infill " , " top_infill " , " support_material " , " first_layer " } ;
for ( size_t i = 0 ; i < sizeof ( widths ) / sizeof ( widths [ i ] ) ; + + i ) {
std : : string key ( widths [ i ] ) ;
key + = " _extrusion_width " ;
if ( this - > get_abs_value ( key , max_nozzle_diameter ) > 10. * max_nozzle_diameter )
return std : : string ( " Invalid extrusion width (too large): " ) + key ;
}
}
// Out of range validation of numeric values.
for ( const std : : string & opt_key : this - > keys ( ) ) {
const ConfigOption * opt = this - > optptr ( opt_key ) ;
assert ( opt ! = nullptr ) ;
const ConfigOptionDef * optdef = print_config_def . get ( opt_key ) ;
assert ( optdef ! = nullptr ) ;
bool out_of_range = false ;
switch ( opt - > type ( ) ) {
case coFloat :
case coPercent :
case coFloatOrPercent :
{
auto * fopt = static_cast < const ConfigOptionFloat * > ( opt ) ;
out_of_range = fopt - > value < optdef - > min | | fopt - > value > optdef - > max ;
break ;
}
case coFloats :
case coPercents :
WIP: Nullable configuration value concept, implemented for
ConfigOptionFloatsNullable, ConfigOptionIntsNullable,
ConfigOptionPercentsNullable, ConfigOptionBoolsNullable.
retract override values were added to the Filament profile:
vector of floats: "retract_length", "retract_lift", "retract_lift_above",
"retract_lift_below", "retract_speed", "deretract_speed",
"retract_restart_extra", "retract_before_travel",
vector of bools: "retract_layer_change", "wipe"
vector of percents: "retract_before_wipe"
2019-07-23 12:15:42 +00:00
for ( double v : static_cast < const ConfigOptionVector < double > * > ( opt ) - > values )
2017-10-17 14:01:18 +00:00
if ( v < optdef - > min | | v > optdef - > max ) {
out_of_range = true ;
break ;
}
break ;
case coInt :
{
auto * iopt = static_cast < const ConfigOptionInt * > ( opt ) ;
out_of_range = iopt - > value < optdef - > min | | iopt - > value > optdef - > max ;
break ;
}
case coInts :
WIP: Nullable configuration value concept, implemented for
ConfigOptionFloatsNullable, ConfigOptionIntsNullable,
ConfigOptionPercentsNullable, ConfigOptionBoolsNullable.
retract override values were added to the Filament profile:
vector of floats: "retract_length", "retract_lift", "retract_lift_above",
"retract_lift_below", "retract_speed", "deretract_speed",
"retract_restart_extra", "retract_before_travel",
vector of bools: "retract_layer_change", "wipe"
vector of percents: "retract_before_wipe"
2019-07-23 12:15:42 +00:00
for ( int v : static_cast < const ConfigOptionVector < int > * > ( opt ) - > values )
2017-10-17 14:01:18 +00:00
if ( v < optdef - > min | | v > optdef - > max ) {
out_of_range = true ;
break ;
}
break ;
default : ;
}
if ( out_of_range )
return std : : string ( " Value out of range: " + opt_key ) ;
}
2019-08-16 14:17:37 +00:00
2017-10-17 14:01:18 +00:00
// The configuration is valid.
return " " ;
}
// Declare the static caches for each StaticPrintConfig derived class.
2017-10-17 15:37:03 +00:00
StaticPrintConfig : : StaticCache < class Slic3r : : PrintObjectConfig > PrintObjectConfig : : s_cache_PrintObjectConfig ;
StaticPrintConfig : : StaticCache < class Slic3r : : PrintRegionConfig > PrintRegionConfig : : s_cache_PrintRegionConfig ;
2018-06-20 11:57:37 +00:00
StaticPrintConfig : : StaticCache < class Slic3r : : MachineEnvelopeConfig > MachineEnvelopeConfig : : s_cache_MachineEnvelopeConfig ;
2017-10-17 15:37:03 +00:00
StaticPrintConfig : : StaticCache < class Slic3r : : GCodeConfig > GCodeConfig : : s_cache_GCodeConfig ;
StaticPrintConfig : : StaticCache < class Slic3r : : PrintConfig > PrintConfig : : s_cache_PrintConfig ;
StaticPrintConfig : : StaticCache < class Slic3r : : HostConfig > HostConfig : : s_cache_HostConfig ;
StaticPrintConfig : : StaticCache < class Slic3r : : FullPrintConfig > FullPrintConfig : : s_cache_FullPrintConfig ;
2017-10-17 14:01:18 +00:00
2018-11-09 11:02:42 +00:00
StaticPrintConfig : : StaticCache < class Slic3r : : SLAMaterialConfig > SLAMaterialConfig : : s_cache_SLAMaterialConfig ;
2018-12-03 12:14:28 +00:00
StaticPrintConfig : : StaticCache < class Slic3r : : SLAPrintConfig > SLAPrintConfig : : s_cache_SLAPrintConfig ;
2018-11-09 11:02:42 +00:00
StaticPrintConfig : : StaticCache < class Slic3r : : SLAPrintObjectConfig > SLAPrintObjectConfig : : s_cache_SLAPrintObjectConfig ;
StaticPrintConfig : : StaticCache < class Slic3r : : SLAPrinterConfig > SLAPrinterConfig : : s_cache_SLAPrinterConfig ;
StaticPrintConfig : : StaticCache < class Slic3r : : SLAFullPrintConfig > SLAFullPrintConfig : : s_cache_SLAFullPrintConfig ;
2018-09-20 14:48:13 +00:00
2019-03-13 14:44:50 +00:00
CLIActionsConfigDef : : CLIActionsConfigDef ( )
2018-09-20 14:48:13 +00:00
{
2019-03-13 14:44:50 +00:00
ConfigOptionDef * def ;
2019-08-16 14:17:37 +00:00
2019-03-13 14:44:50 +00:00
// Actions:
def = this - > add ( " export_obj " , coBool ) ;
2019-04-18 12:45:13 +00:00
def - > label = L ( " Export OBJ " ) ;
2019-03-13 14:44:50 +00:00
def - > tooltip = L ( " Export the model(s) as OBJ. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2019-08-16 14:17:37 +00:00
2019-03-13 14:44:50 +00:00
/*
def = this - > add ( " export_svg " , coBool ) ;
def - > label = L ( " Export SVG " ) ;
def - > tooltip = L ( " Slice the model and export solid slices as SVG. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2019-03-13 14:44:50 +00:00
*/
2019-08-16 14:17:37 +00:00
2019-03-13 14:44:50 +00:00
def = this - > add ( " export_sla " , coBool ) ;
def - > label = L ( " Export SLA " ) ;
def - > tooltip = L ( " Slice the model and export SLA printing layers as PNG. " ) ;
def - > cli = " export-sla|sla " ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2018-09-21 09:40:32 +00:00
2018-09-20 14:48:13 +00:00
def = this - > add ( " export_3mf " , coBool ) ;
def - > label = L ( " Export 3MF " ) ;
2019-03-13 14:44:50 +00:00
def - > tooltip = L ( " Export the model(s) as 3MF. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2018-09-20 14:48:13 +00:00
2019-03-13 14:44:50 +00:00
def = this - > add ( " export_amf " , coBool ) ;
def - > label = L ( " Export AMF " ) ;
def - > tooltip = L ( " Export the model(s) as AMF. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2019-03-13 14:44:50 +00:00
def = this - > add ( " export_stl " , coBool ) ;
def - > label = L ( " Export STL " ) ;
def - > tooltip = L ( " Export the model(s) as STL. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2019-03-13 14:44:50 +00:00
def = this - > add ( " export_gcode " , coBool ) ;
def - > label = L ( " Export G-code " ) ;
def - > tooltip = L ( " Slice the model and export toolpaths as G-code. " ) ;
def - > cli = " export-gcode|gcode|g " ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2018-09-20 14:48:13 +00:00
2019-03-13 18:17:26 +00:00
def = this - > add ( " slice " , coBool ) ;
def - > label = L ( " Slice " ) ;
def - > tooltip = L ( " Slice the model as FFF or SLA based on the printer_technology configuration value. " ) ;
def - > cli = " slice|s " ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2019-03-13 18:17:26 +00:00
2018-09-20 14:48:13 +00:00
def = this - > add ( " help " , coBool ) ;
def - > label = L ( " Help " ) ;
def - > tooltip = L ( " Show this help. " ) ;
2019-03-13 14:44:50 +00:00
def - > cli = " help|h " ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2018-09-20 14:48:13 +00:00
2019-03-13 18:17:26 +00:00
def = this - > add ( " help_fff " , coBool ) ;
def - > label = L ( " Help (FFF options) " ) ;
def - > tooltip = L ( " Show the full list of print/G-code configuration options. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2019-03-13 18:17:26 +00:00
def = this - > add ( " help_sla " , coBool ) ;
def - > label = L ( " Help (SLA options) " ) ;
def - > tooltip = L ( " Show the full list of SLA print configuration options. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2019-08-16 14:17:37 +00:00
2018-09-20 14:48:13 +00:00
def = this - > add ( " info " , coBool ) ;
def - > label = L ( " Output Model Info " ) ;
def - > tooltip = L ( " Write information about the model to the console. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionBool ( false ) ) ;
2019-08-16 14:17:37 +00:00
2019-03-13 14:44:50 +00:00
def = this - > add ( " save " , coString ) ;
def - > label = L ( " Save config file " ) ;
def - > tooltip = L ( " Save configuration to the specified file. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionString ( ) ) ;
2019-03-13 14:44:50 +00:00
}
2018-09-21 09:40:32 +00:00
2019-03-13 14:44:50 +00:00
CLITransformConfigDef : : CLITransformConfigDef ( )
{
ConfigOptionDef * def ;
2019-08-16 14:17:37 +00:00
2019-03-13 14:44:50 +00:00
// Transform options:
def = this - > add ( " align_xy " , coPoint ) ;
def - > label = L ( " Align XY " ) ;
def - > tooltip = L ( " Align the model to the given point. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionPoint ( Vec2d ( 100 , 100 ) ) ) ;
2019-08-16 14:17:37 +00:00
2019-03-13 14:44:50 +00:00
def = this - > add ( " cut " , coFloat ) ;
def - > label = L ( " Cut " ) ;
def - > tooltip = L ( " Cut model at the given Z. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2019-08-16 14:17:37 +00:00
2019-03-13 14:44:50 +00:00
/*
def = this - > add ( " cut_grid " , coFloat ) ;
def - > label = L ( " Cut " ) ;
def - > tooltip = L ( " Cut model in the XY plane into tiles of the specified max size. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionPoint ( ) ) ;
2019-08-16 14:17:37 +00:00
2019-03-13 14:44:50 +00:00
def = this - > add ( " cut_x " , coFloat ) ;
def - > label = L ( " Cut " ) ;
def - > tooltip = L ( " Cut model at the given X. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2019-08-16 14:17:37 +00:00
2019-03-13 14:44:50 +00:00
def = this - > add ( " cut_y " , coFloat ) ;
def - > label = L ( " Cut " ) ;
def - > tooltip = L ( " Cut model at the given Y. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2019-03-13 14:44:50 +00:00
*/
2019-08-16 14:17:37 +00:00
2019-03-13 14:44:50 +00:00
def = this - > add ( " center " , coPoint ) ;
def - > label = L ( " Center " ) ;
def - > tooltip = L ( " Center the print around the given center. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionPoint ( Vec2d ( 100 , 100 ) ) ) ;
2019-03-13 14:44:50 +00:00
def = this - > add ( " dont_arrange " , coBool ) ;
def - > label = L ( " Don't arrange " ) ;
def - > tooltip = L ( " Do not rearrange the given models before merging and keep their original XY coordinates. " ) ;
2019-08-16 14:17:37 +00:00
2019-03-13 14:44:50 +00:00
def = this - > add ( " duplicate " , coInt ) ;
def - > label = L ( " Duplicate " ) ;
def - > tooltip = L ( " Multiply copies by this factor. " ) ;
def - > min = 1 ;
2019-08-16 14:17:37 +00:00
2019-03-13 14:44:50 +00:00
def = this - > add ( " duplicate_grid " , coPoint ) ;
def - > label = L ( " Duplicate by grid " ) ;
def - > tooltip = L ( " Multiply copies by creating a grid. " ) ;
def = this - > add ( " merge " , coBool ) ;
def - > label = L ( " Merge " ) ;
def - > tooltip = L ( " Arrange the supplied models in a plate and merge them in a single model in order to perform actions once. " ) ;
def - > cli = " merge|m " ;
def = this - > add ( " repair " , coBool ) ;
def - > label = L ( " Repair " ) ;
def - > tooltip = L ( " Try to repair any non-manifold meshes (this option is implicitly added whenever we need to slice the model to perform the requested action). " ) ;
2019-08-16 14:17:37 +00:00
2018-09-20 14:48:13 +00:00
def = this - > add ( " rotate " , coFloat ) ;
def - > label = L ( " Rotate " ) ;
2019-03-13 14:44:50 +00:00
def - > tooltip = L ( " Rotation angle around the Z axis in degrees. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2019-08-16 14:17:37 +00:00
2018-09-20 14:48:13 +00:00
def = this - > add ( " rotate_x " , coFloat ) ;
def - > label = L ( " Rotate around X " ) ;
2019-03-13 14:44:50 +00:00
def - > tooltip = L ( " Rotation angle around the X axis in degrees. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2019-08-16 14:17:37 +00:00
2018-09-20 14:48:13 +00:00
def = this - > add ( " rotate_y " , coFloat ) ;
def - > label = L ( " Rotate around Y " ) ;
2019-03-13 14:44:50 +00:00
def - > tooltip = L ( " Rotation angle around the Y axis in degrees. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloat ( 0 ) ) ;
2019-08-16 14:17:37 +00:00
2019-03-13 14:44:50 +00:00
def = this - > add ( " scale " , coFloatOrPercent ) ;
2018-09-20 14:48:13 +00:00
def - > label = L ( " Scale " ) ;
2019-03-13 14:44:50 +00:00
def - > tooltip = L ( " Scaling factor or percentage. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionFloatOrPercent ( 1 , false ) ) ;
2018-09-20 14:48:13 +00:00
2019-03-13 14:44:50 +00:00
def = this - > add ( " split " , coBool ) ;
def - > label = L ( " Split " ) ;
def - > tooltip = L ( " Detect unconnected parts in the given model(s) and split them into separate objects. " ) ;
2019-08-16 14:17:37 +00:00
2018-09-20 14:48:13 +00:00
def = this - > add ( " scale_to_fit " , coPoint3 ) ;
def - > label = L ( " Scale to Fit " ) ;
def - > tooltip = L ( " Scale to fit the given volume. " ) ;
2019-05-03 16:01:39 +00:00
def - > set_default_value ( new ConfigOptionPoint3 ( Vec3d ( 0 , 0 , 0 ) ) ) ;
2019-03-13 14:44:50 +00:00
}
CLIMiscConfigDef : : CLIMiscConfigDef ( )
{
ConfigOptionDef * def ;
2019-08-16 14:17:37 +00:00
2019-03-13 14:44:50 +00:00
def = this - > add ( " ignore_nonexistent_config " , coBool ) ;
def - > label = L ( " Ignore non-existent config files " ) ;
def - > tooltip = L ( " Do not fail if a file supplied to --load does not exist. " ) ;
2019-08-16 14:17:37 +00:00
2019-03-13 14:44:50 +00:00
def = this - > add ( " load " , coStrings ) ;
def - > label = L ( " Load config file " ) ;
def - > tooltip = L ( " Load configuration from the specified file. It can be used more than once to load options from multiple files. " ) ;
2019-08-16 14:17:37 +00:00
2019-03-13 14:44:50 +00:00
def = this - > add ( " output " , coString ) ;
def - > label = L ( " Output File " ) ;
def - > tooltip = L ( " The file where the output will be written (if not specified, it will be based on the input file). " ) ;
def - > cli = " output|o " ;
2019-08-16 14:17:37 +00:00
/*
2019-03-13 14:44:50 +00:00
def = this - > add ( " autosave " , coString ) ;
def - > label = L ( " Autosave " ) ;
def - > tooltip = L ( " Automatically export current configuration to the specified file. " ) ;
2018-09-20 14:48:13 +00:00
*/
2019-08-16 14:17:37 +00:00
2019-03-13 14:44:50 +00:00
def = this - > add ( " datadir " , coString ) ;
def - > label = L ( " Data directory " ) ;
def - > tooltip = L ( " Load and store settings at the given directory. This is useful for maintaining different profiles or including configurations from a network storage. " ) ;
2018-09-20 14:48:13 +00:00
2019-03-13 14:44:50 +00:00
def = this - > add ( " loglevel " , coInt ) ;
def - > label = L ( " Logging level " ) ;
2020-01-06 11:07:23 +00:00
def - > tooltip = L ( " Sets logging sensitivity. 0:fatal, 1:error, 2:warning, 3:info, 4:debug, 5:trace \n "
" For example. loglevel=2 logs fatal, error and warning level messages. " ) ;
2019-03-13 14:44:50 +00:00
def - > min = 0 ;
2019-04-12 09:43:29 +00:00
2019-08-16 14:17:37 +00:00
# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(SLIC3R_GUI)
2019-04-12 09:43:29 +00:00
def = this - > add ( " sw_renderer " , coBool ) ;
def - > label = L ( " Render with a software renderer " ) ;
def - > tooltip = L ( " Render with a software renderer. The bundled MESA software renderer is loaded instead of the default OpenGL driver. " ) ;
def - > min = 0 ;
# endif /* _MSC_VER */
2018-09-20 14:48:13 +00:00
}
2019-03-13 14:44:50 +00:00
const CLIActionsConfigDef cli_actions_config_def ;
const CLITransformConfigDef cli_transform_config_def ;
const CLIMiscConfigDef cli_misc_config_def ;
2018-09-20 14:48:13 +00:00
DynamicPrintAndCLIConfig : : PrintAndCLIConfigDef DynamicPrintAndCLIConfig : : s_def ;
2019-01-03 12:25:56 +00:00
void DynamicPrintAndCLIConfig : : handle_legacy ( t_config_option_key & opt_key , std : : string & value ) const
{
2019-08-16 14:17:37 +00:00
if ( cli_actions_config_def . options . find ( opt_key ) = = cli_actions_config_def . options . end ( ) & &
cli_transform_config_def . options . find ( opt_key ) = = cli_transform_config_def . options . end ( ) & &
cli_misc_config_def . options . find ( opt_key ) = = cli_misc_config_def . options . end ( ) ) {
PrintConfigDef : : handle_legacy ( opt_key , value ) ;
}
2018-09-20 14:48:13 +00:00
}
2020-03-27 08:58:08 +00:00
static Points to_points ( const std : : vector < Vec2d > & dpts )
{
Points pts ; pts . reserve ( dpts . size ( ) ) ;
for ( auto & v : dpts )
pts . emplace_back ( coord_t ( scale_ ( v . x ( ) ) ) , coord_t ( scale_ ( v . y ( ) ) ) ) ;
return pts ;
2013-12-21 15:15:41 +00:00
}
2019-06-26 11:26:49 +00:00
2020-03-27 08:58:08 +00:00
Points get_bed_shape ( const DynamicPrintConfig & config )
{
const auto * bed_shape_opt = config . opt < ConfigOptionPoints > ( " bed_shape " ) ;
if ( ! bed_shape_opt ) {
// Here, it is certain that the bed shape is missing, so an infinite one
// has to be used, but still, the center of bed can be queried
if ( auto center_opt = config . opt < ConfigOptionPoint > ( " center " ) )
return { scaled ( center_opt - > value ) } ;
return { } ;
}
return to_points ( bed_shape_opt - > values ) ;
2013-12-21 15:15:41 +00:00
}
2019-06-26 11:26:49 +00:00
2020-03-27 08:58:08 +00:00
Points get_bed_shape ( const PrintConfig & cfg )
{
return to_points ( cfg . bed_shape . values ) ;
2013-12-21 15:15:41 +00:00
}
2019-06-26 11:26:49 +00:00
2020-03-27 08:58:08 +00:00
Points get_bed_shape ( const SLAPrinterConfig & cfg ) { return to_points ( cfg . bed_shape . values ) ; }
} // namespace Slic3r
2019-07-04 20:09:14 +00:00
# include <cereal/types/polymorphic.hpp>
2019-06-26 11:26:49 +00:00
CEREAL_REGISTER_TYPE ( Slic3r : : DynamicPrintConfig )
2019-08-16 14:17:37 +00:00
CEREAL_REGISTER_POLYMORPHIC_RELATION ( Slic3r : : DynamicConfig , Slic3r : : DynamicPrintConfig )