1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
|
// #include "libslic3r/GCodeSender.hpp"
#include "ConfigManipulation.hpp"
#include "I18N.hpp"
#include "GUI_App.hpp"
#include "PresetBundle.hpp"
#include <wx/msgdlg.h>
namespace Slic3r {
namespace GUI {
void ConfigManipulation::apply(DynamicPrintConfig* config, DynamicPrintConfig* new_config)
{
bool modified = false;
for (auto opt_key : config->diff(*new_config)) {
config->set_key_value(opt_key, new_config->option(opt_key)->clone());
modified = true;
}
if (modified && load_config != nullptr)
load_config();
}
void ConfigManipulation::toggle_field(const std::string& opt_key, const bool toggle, int opt_index/* = -1*/)
{
if (local_config) {
if (local_config->option(opt_key) == nullptr)
return;
}
Field* field = get_field(opt_key, opt_index);
if (field==nullptr) return;
field->toggle(toggle);
}
void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, const bool is_global_config)
{
// #ys_FIXME_to_delete
//! Temporary workaround for the correct updates of the TextCtrl (like "layer_height"):
// KillFocus() for the wxSpinCtrl use CallAfter function. So,
// to except the duplicate call of the update() after dialog->ShowModal(),
// let check if this process is already started.
if (is_msg_dlg_already_exist)
return;
// layer_height shouldn't be equal to zero
if (config->opt_float("layer_height") < EPSILON)
{
const wxString msg_text = _(L("Zero layer height is not valid.\n\nThe layer height will be reset to 0.01."));
wxMessageDialog dialog(nullptr, msg_text, _(L("Layer height")), wxICON_WARNING | wxOK);
DynamicPrintConfig new_conf = *config;
is_msg_dlg_already_exist = true;
dialog.ShowModal();
new_conf.set_key_value("layer_height", new ConfigOptionFloat(0.01));
apply(config, &new_conf);
is_msg_dlg_already_exist = false;
}
if (fabs(config->option<ConfigOptionFloatOrPercent>("first_layer_height")->value - 0) < EPSILON)
{
const wxString msg_text = _(L("Zero first layer height is not valid.\n\nThe first layer height will be reset to 0.01."));
wxMessageDialog dialog(nullptr, msg_text, _(L("First layer height")), wxICON_WARNING | wxOK);
DynamicPrintConfig new_conf = *config;
is_msg_dlg_already_exist = true;
dialog.ShowModal();
new_conf.set_key_value("first_layer_height", new ConfigOptionFloatOrPercent(0.01, false));
apply(config, &new_conf);
is_msg_dlg_already_exist = false;
}
double fill_density = config->option<ConfigOptionPercent>("fill_density")->value;
if (config->opt_bool("spiral_vase") && !(
config->opt_int("perimeters") == 1
&& config->opt_int("top_solid_layers") == 0
&& fill_density == 0
&& config->opt_bool("support_material") == false
&& config->opt_int("support_material_enforce_layers") == 0
&& config->opt_bool("exact_last_layer_height") == false
&& config->opt_bool("ensure_vertical_shell_thickness") == false
&& config->opt_bool("infill_dense") == false
&& config->opt_bool("extra_perimeters") == false
)) {
wxString msg_text = _(L("The Spiral Vase mode requires:\n"
"- one perimeter\n"
"- no top solid layers\n"
"- 0% fill density\n"
"- no support material\n"
"- Ensure vertical shell thickness enabled\n"
"- unchecked 'exact last layer height'\n"
"- unchecked 'dense infill'\n"
"- unchecked 'extra perimeters'"));
if (is_global_config)
msg_text += "\n\n" + _(L("Shall I adjust those settings in order to enable Spiral Vase?"));
wxMessageDialog dialog(nullptr, msg_text, _(L("Spiral Vase")),
wxICON_WARNING | (is_global_config ? wxYES | wxNO : wxOK));
DynamicPrintConfig new_conf = *config;
auto answer = dialog.ShowModal();
if (!is_global_config || answer == wxID_YES) {
new_conf.set_key_value("perimeters", new ConfigOptionInt(1));
new_conf.set_key_value("top_solid_layers", new ConfigOptionInt(0));
new_conf.set_key_value("fill_density", new ConfigOptionPercent(0));
new_conf.set_key_value("support_material", new ConfigOptionBool(false));
new_conf.set_key_value("support_material_enforce_layers", new ConfigOptionInt(0));
new_conf.set_key_value("exact_last_layer_height", new ConfigOptionBool(false));
new_conf.set_key_value("ensure_vertical_shell_thickness", new ConfigOptionBool(false));
new_conf.set_key_value("infill_dense", new ConfigOptionBool(false));
new_conf.set_key_value("extra_perimeters", new ConfigOptionBool(false));
fill_density = 0;
}
else {
new_conf.set_key_value("spiral_vase", new ConfigOptionBool(false));
}
apply(config, &new_conf);
if (cb_value_change)
cb_value_change("fill_density", fill_density);
}
if (config->opt_bool("wipe_tower") && config->opt_bool("support_material") &&
((ConfigOptionEnumGeneric*)config->option("support_material_contact_distance_type"))->value != zdNone &&
(config->opt_int("support_material_extruder") != 0 || config->opt_int("support_material_interface_extruder") != 0)) {
wxString msg_text = _(L("The Wipe Tower currently supports the non-soluble supports only\n"
"if they are printed with the current extruder without triggering a tool change.\n"
"(both support_material_extruder and support_material_interface_extruder need to be set to 0)."));
if (is_global_config)
msg_text += "\n\n" + _(L("Shall I adjust those settings in order to enable the Wipe Tower?"));
wxMessageDialog dialog (nullptr, msg_text, _(L("Wipe Tower")),
wxICON_WARNING | (is_global_config ? wxYES | wxNO : wxOK));
DynamicPrintConfig new_conf = *config;
auto answer = dialog.ShowModal();
if (!is_global_config || answer == wxID_YES) {
new_conf.set_key_value("support_material_extruder", new ConfigOptionInt(0));
new_conf.set_key_value("support_material_interface_extruder", new ConfigOptionInt(0));
}
else
new_conf.set_key_value("wipe_tower", new ConfigOptionBool(false));
apply(config, &new_conf);
}
if (config->opt_bool("wipe_tower") && config->opt_bool("support_material") &&
((ConfigOptionEnumGeneric*)config->option("support_material_contact_distance_type"))->value != zdNone &&
!config->opt_bool("support_material_synchronize_layers")) {
wxString msg_text = _(L("For the Wipe Tower to work with the soluble supports, the support layers\n"
"need to be synchronized with the object layers."));
if (is_global_config)
msg_text += "\n\n" + _(L("Shall I synchronize support layers in order to enable the Wipe Tower?"));
wxMessageDialog dialog(nullptr, msg_text, _(L("Wipe Tower")),
wxICON_WARNING | (is_global_config ? wxYES | wxNO : wxOK));
DynamicPrintConfig new_conf = *config;
auto answer = dialog.ShowModal();
if (!is_global_config || answer == wxID_YES) {
new_conf.set_key_value("support_material_synchronize_layers", new ConfigOptionBool(true));
}
else
new_conf.set_key_value("wipe_tower", new ConfigOptionBool(false));
apply(config, &new_conf);
}
// check forgotten '%'
{
struct optDescr {
ConfigOptionFloatOrPercent* opt;
std::string name;
float min;
float max;
};
float diameter = 0.4f;
if (config->option<ConfigOptionFloatOrPercent>("extrusion_width")->percent) {
//has to be percent
diameter = 0;
}
else {
diameter = config->option<ConfigOptionFloatOrPercent>("extrusion_width")->value;
}
std::vector<optDescr> opts;
opts.push_back({ config->option<ConfigOptionFloatOrPercent>("infill_overlap"), "infill_overlap", 0, diameter * 10 });
for (int i = 0; i < opts.size(); i++) {
if ( (!opts[i].opt->percent) && (opts[i].opt->get_abs_value(diameter) < opts[i].min || opts[i].opt->get_abs_value(diameter) > opts[i].max) ) {
wxString msg_text = _(L("Did you forgot to put a '%' in the "+opts[i].name+" field? "
"it's currently set to "+std::to_string(opts[i].opt->get_abs_value(diameter)) + " mm."));
if (is_global_config)
msg_text += "\n\n" + _(L("Shall I add the '%'?"));
wxMessageDialog dialog(nullptr, msg_text, _(L("Wipe Tower")),
wxICON_WARNING | (is_global_config ? wxYES | wxNO : wxOK));
DynamicPrintConfig new_conf = *config;
auto answer = dialog.ShowModal();
if (!is_global_config || answer == wxID_YES) {
new_conf.set_key_value(opts[i].name, new ConfigOptionFloatOrPercent(opts[i].opt->value*100, true));
apply(config, &new_conf);
}
}
}
}
// check changes from FloatOrPercent to percent (useful to migrate cofnig from prusa to slic3r++)
{
std::vector<std::string> names;
names.push_back("bridge_flow_ratio");
names.push_back("over_bridge_flow_ratio");
names.push_back("bridge_overlap");
names.push_back("fill_top_flow_ratio");
names.push_back("first_layer_flow_ratio");
for (int i = 0; i < names.size(); i++) {
if (config->option<ConfigOptionPercent>(names[i])->value <= 2) {
DynamicPrintConfig new_conf = *config;
new_conf.set_key_value(names[i], new ConfigOptionPercent(config->option<ConfigOptionPercent>(names[i])->value * 100));
apply(config, &new_conf);
}
}
}
static bool support_material_overhangs_queried = false;
if (config->opt_bool("support_material")) {
// Ask only once.
if (!support_material_overhangs_queried) {
support_material_overhangs_queried = true;
if (!config->opt_bool("overhangs")/* != 1*/) {
wxString msg_text = _(L("Supports work better, if the following feature is enabled:\n"
"- Detect bridging perimeters"));
if (is_global_config)
msg_text += "\n\n" + _(L("Shall I adjust those settings for supports?"));
wxMessageDialog dialog(nullptr, msg_text, _(L("Support Generator")),
wxICON_WARNING | (is_global_config ? wxYES | wxNO | wxCANCEL : wxOK));
DynamicPrintConfig new_conf = *config;
auto answer = dialog.ShowModal();
if (!is_global_config || answer == wxID_YES) {
// Enable "detect bridging perimeters".
new_conf.set_key_value("overhangs", new ConfigOptionBool(true));
}
else if (answer == wxID_NO) {
// Do nothing, leave supports on and "detect bridging perimeters" off.
}
else if (answer == wxID_CANCEL) {
// Disable supports.
new_conf.set_key_value("support_material", new ConfigOptionBool(false));
support_material_overhangs_queried = false;
}
apply(config, &new_conf);
}
}
}
else {
support_material_overhangs_queried = false;
}
if (config->option<ConfigOptionPercent>("fill_density")->value == 100) {
auto fill_pattern = config->option<ConfigOptionEnum<InfillPattern>>("fill_pattern")->value;
std::string str_fill_pattern = "";
t_config_enum_values map_names = config->option<ConfigOptionEnum<InfillPattern>>("fill_pattern")->get_enum_values();
for (auto it : map_names) {
if (fill_pattern == it.second) {
str_fill_pattern = it.first;
break;
}
}
if (!str_fill_pattern.empty()) {
const std::vector<std::string>& top_fill_pattern = config->def()->get("top_fill_pattern")->enum_values;
bool correct_100p_fill = false;
for (const std::string& fill : top_fill_pattern)
{
if (str_fill_pattern == fill)
correct_100p_fill = true;
}
const std::vector<std::string> bottom_fill_pattern = config->def()->get("bottom_fill_pattern")->enum_values;
for (const std::string &fill : bottom_fill_pattern) {
if (str_fill_pattern.compare(fill) == 0)
correct_100p_fill = true;
}
// get fill_pattern name from enum_labels for using this one at dialog_msg
str_fill_pattern = _utf8(config->def()->get("fill_pattern")->enum_labels[fill_pattern]);
if (!correct_100p_fill) {
wxString msg_text = GUI::from_u8((boost::format(_utf8(L("The %1% infill pattern is not supposed to work at 100%% density."))) % str_fill_pattern).str());
if (is_global_config)
msg_text += "\n\n" + _(L("Shall I switch to "+ str_fill_pattern +" fill pattern?"));
wxMessageDialog dialog(nullptr, msg_text, _(L("Infill")),
wxICON_WARNING | (is_global_config ? wxYES | wxNO : wxOK) );
DynamicPrintConfig new_conf = *config;
auto answer = dialog.ShowModal();
if (!is_global_config || answer == wxID_YES) {
new_conf.set_key_value("fill_pattern", new ConfigOptionEnum<InfillPattern>(ipRectilinear));
fill_density = 100;
}
else
fill_density = wxGetApp().preset_bundle->prints.get_selected_preset().config.option<ConfigOptionPercent>("fill_density")->value;
new_conf.set_key_value("fill_density", new ConfigOptionPercent(fill_density));
apply(config, &new_conf);
if (cb_value_change)
cb_value_change("fill_density", fill_density);
}
}
}
}
void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config)
{
bool have_perimeters = config->opt_int("perimeters") > 0;
for (auto el : { "extra_perimeters", "extra_perimeters_overhangs", "extra_perimeters_odd_layers",
"only_one_perimeter_top", "ensure_vertical_shell_thickness", "thin_walls",
"overhangs", "overhangs_reverse",
"seam_position", "external_perimeters_first", "external_perimeters_vase", "external_perimeter_extrusion_width",
"perimeter_speed", "small_perimeter_speed", "external_perimeter_speed", "perimeter_loop", "perimeter_loop_seam" })
toggle_field(el, have_perimeters);
toggle_field("overhangs_width", config->opt_bool("overhangs"));
toggle_field("overhangs_reverse_threshold", config->opt_bool("overhangs_reverse"));
for (auto el : { "external_perimeters_vase", "external_perimeters_nothole", "external_perimeters_hole"})
toggle_field(el, config->opt_bool("external_perimeters_first"));
for (auto el : { "thin_walls_min_width", "thin_walls_overlap" })
toggle_field(el, config->opt_bool("thin_walls"));
toggle_field("perimeter_loop_seam", config->opt_bool("perimeter_loop"));
toggle_field("gap_fill_min_area", config->opt_bool("gap_fill"));
toggle_field("avoid_crossing_not_first_layer", config->opt_bool("avoid_crossing_perimeters"));
bool have_infill = config->option<ConfigOptionPercent>("fill_density")->value > 0;
// infill_extruder uses the same logic as in Print::extruders()
for (auto el : { "fill_pattern", "infill_every_layers", "infill_only_where_needed",
"solid_infill_every_layers", "solid_infill_below_area", "infill_extruder" })
toggle_field(el, have_infill);
bool can_have_infill_dense = config->option<ConfigOptionPercent>("fill_density")->value < 50;
for (auto el : { "infill_dense" })
toggle_field(el, can_have_infill_dense);
bool have_infill_dense = config->opt_bool("infill_dense") && can_have_infill_dense;
for (auto el : { "infill_dense_algo" })
toggle_field(el, have_infill_dense);
bool has_spiral_vase = config->opt_bool("spiral_vase");
bool has_top_solid_infill = config->opt_int("top_solid_layers") > 0;
bool has_bottom_solid_infill = config->opt_int("bottom_solid_layers") > 0;
bool has_solid_infill = has_top_solid_infill || has_bottom_solid_infill;
// solid_infill_extruder uses the same logic as in Print::extruders()
for (auto el : { "top_fill_pattern", "bottom_fill_pattern", "solid_fill_pattern", "enforce_full_fill_volume", "external_infill_margin",
"infill_first", "solid_infill_extruder", "solid_infill_extrusion_width", "solid_infill_speed" })
toggle_field(el, has_solid_infill);
for (auto el : { "fill_angle", "bridge_angle", "infill_extrusion_width",
"infill_speed" })
toggle_field(el, have_infill || has_solid_infill);
toggle_field("top_solid_min_thickness", ! has_spiral_vase && has_top_solid_infill);
toggle_field("bottom_solid_min_thickness", ! has_spiral_vase && has_bottom_solid_infill);
// gap fill can appear in infill
//toggle_field("gap_fill_speed", have_perimeters && config->opt_bool("gap_fill"));
for (auto el : {"fill_smooth_width, fill_smooth_distribution" })
toggle_field(el, config->opt_enum<InfillPattern>("top_fill_pattern") == InfillPattern::ipSmooth);
bool have_top_solid_infill = config->opt_int("top_solid_layers") > 0;
for (auto el : { "top_infill_extrusion_width", "top_solid_infill_speed" })
toggle_field(el, has_top_solid_infill);
bool have_default_acceleration = config->opt_float("default_acceleration") > 0;
for (auto el : { "perimeter_acceleration", "infill_acceleration",
"bridge_acceleration", "first_layer_acceleration" })
toggle_field(el, have_default_acceleration);
bool have_skirt = config->opt_int("skirts") > 0;
toggle_field("skirt_height", have_skirt && !config->opt_bool("draft_shield"));
for (auto el : { "skirt_distance", "draft_shield", "min_skirt_length" })
toggle_field(el, have_skirt);
bool have_brim = config->opt_float("brim_width") > 0 || config->opt_float("brim_width_interior") > 0;
// perimeter_extruder uses the same logic as in Print::extruders()
toggle_field("perimeter_extruder", have_perimeters || have_brim);
toggle_field("brim_ears", config->opt_float("brim_width") > 0);
toggle_field("brim_inside_holes", config->opt_float("brim_width") > 0 && config->opt_float("brim_width_interior") == 0);
toggle_field("brim_ears_max_angle", have_brim && config->opt_bool("brim_ears"));
bool have_raft = config->opt_int("raft_layers") > 0;
bool have_support_material = config->opt_bool("support_material") || have_raft;
bool have_support_material_auto = have_support_material && config->opt_bool("support_material_auto");
bool have_support_interface = config->opt_int("support_material_interface_layers") > 0;
bool have_support_soluble = have_support_material && ((ConfigOptionEnumGeneric*)config->option("support_material_contact_distance_type"))->value == zdNone;
for (auto el : { "support_material_pattern", "support_material_with_sheath",
"support_material_spacing", "support_material_angle", "support_material_interface_layers",
"dont_support_bridges", "support_material_extrusion_width",
"support_material_contact_distance_type",
"support_material_xy_spacing", "support_material_interface_pattern" })
toggle_field(el, have_support_material);
toggle_field("support_material_threshold", have_support_material_auto);
for (auto el : { "support_material_contact_distance_top",
"support_material_contact_distance_bottom" })
toggle_field(el, have_support_material && !have_support_soluble);
for (auto el : { "support_material_interface_spacing", "support_material_interface_extruder",
"support_material_interface_speed", "support_material_interface_contact_loops" })
toggle_field(el, have_support_material && have_support_interface);
toggle_field("support_material_synchronize_layers", have_support_soluble);
toggle_field("perimeter_extrusion_width", have_perimeters || have_skirt || have_brim);
toggle_field("support_material_extruder", have_support_material || have_skirt);
toggle_field("support_material_speed", have_support_material || have_brim || have_skirt);
bool have_sequential_printing = config->opt_bool("complete_objects");
for (auto el : { /*"extruder_clearance_radius", "extruder_clearance_height",*/ "complete_objects_one_skirt",
"complete_objects_sort"})
toggle_field(el, have_sequential_printing);
bool have_ooze_prevention = config->opt_bool("ooze_prevention");
toggle_field("standby_temperature_delta", have_ooze_prevention);
bool have_wipe_tower = config->opt_bool("wipe_tower");
for (auto el : { "wipe_tower_x", "wipe_tower_y", "wipe_tower_width", "wipe_tower_rotation_angle", "wipe_tower_bridging", "wipe_tower_brim" })
toggle_field(el, have_wipe_tower);
for (auto el : { "fill_smooth_width", "fill_smooth_distribution" })
toggle_field(el, (has_solid_infill && (config->option<ConfigOptionEnum<InfillPattern>>("top_fill_pattern")->value == InfillPattern::ipSmooth
|| config->option<ConfigOptionEnum<InfillPattern>>("bottom_fill_pattern")->value == InfillPattern::ipSmooth
|| config->option<ConfigOptionEnum<InfillPattern>>("solid_fill_pattern")->value == InfillPattern::ipSmooth))
|| (config->option<ConfigOptionEnum<InfillPattern>>("support_material_interface_pattern")->value == InfillPattern::ipSmooth && have_support_material));
//TODO: can the milling_diameter or the milling_cutter be check to enable/disable this?
for (auto el : { "milling_after_z", "milling_extra_size", "milling_speed" })
toggle_field(el, config->opt_bool("milling_post_process"));
}
void ConfigManipulation::update_print_sla_config(DynamicPrintConfig* config, const bool is_global_config/* = false*/)
{
double head_penetration = config->opt_float("support_head_penetration");
double head_width = config->opt_float("support_head_width");
if (head_penetration > head_width) {
wxString msg_text = _(L("Head penetration should not be greater than the head width."));
wxMessageDialog dialog(nullptr, msg_text, _(L("Invalid Head penetration")), wxICON_WARNING | wxOK);
DynamicPrintConfig new_conf = *config;
if (dialog.ShowModal() == wxID_OK) {
new_conf.set_key_value("support_head_penetration", new ConfigOptionFloat(head_width));
apply(config, &new_conf);
}
}
double pinhead_d = config->opt_float("support_head_front_diameter");
double pillar_d = config->opt_float("support_pillar_diameter");
if (pinhead_d > pillar_d) {
wxString msg_text = _(L("Pinhead diameter should be smaller than the pillar diameter."));
wxMessageDialog dialog(nullptr, msg_text, _(L("Invalid pinhead diameter")), wxICON_WARNING | wxOK);
DynamicPrintConfig new_conf = *config;
if (dialog.ShowModal() == wxID_OK) {
new_conf.set_key_value("support_head_front_diameter", new ConfigOptionFloat(pillar_d / 2.0));
apply(config, &new_conf);
}
}
}
void ConfigManipulation::toggle_print_sla_options(DynamicPrintConfig* config)
{
bool supports_en = config->opt_bool("supports_enable");
toggle_field("support_head_front_diameter", supports_en);
toggle_field("support_head_penetration", supports_en);
toggle_field("support_head_width", supports_en);
toggle_field("support_pillar_diameter", supports_en);
toggle_field("support_max_bridges_on_pillar", supports_en);
toggle_field("support_pillar_connection_mode", supports_en);
toggle_field("support_buildplate_only", supports_en);
toggle_field("support_base_diameter", supports_en);
toggle_field("support_base_height", supports_en);
toggle_field("support_base_safety_distance", supports_en);
toggle_field("support_critical_angle", supports_en);
toggle_field("support_max_bridge_length", supports_en);
toggle_field("support_max_pillar_link_distance", supports_en);
toggle_field("support_points_density_relative", supports_en);
toggle_field("support_points_minimal_distance", supports_en);
bool pad_en = config->opt_bool("pad_enable");
toggle_field("pad_wall_thickness", pad_en);
toggle_field("pad_wall_height", pad_en);
toggle_field("pad_brim_size", pad_en);
toggle_field("pad_max_merge_distance", pad_en);
// toggle_field("pad_edge_radius", supports_en);
toggle_field("pad_wall_slope", pad_en);
toggle_field("pad_around_object", pad_en);
toggle_field("pad_around_object_everywhere", pad_en);
bool zero_elev = config->opt_bool("pad_around_object") && pad_en;
toggle_field("support_object_elevation", supports_en && !zero_elev);
toggle_field("pad_object_gap", zero_elev);
toggle_field("pad_around_object_everywhere", zero_elev);
toggle_field("pad_object_connector_stride", zero_elev);
toggle_field("pad_object_connector_width", zero_elev);
toggle_field("pad_object_connector_penetration", zero_elev);
}
} // GUI
} // Slic3r
|