mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-12 19:59:09 +08:00
Move layout of ui settings to config files.
This commit is contained in:
parent
2530af7a9f
commit
7d95107793
@ -28,7 +28,7 @@ variants = 0.4; 0.15; 0.2; 0.25; 0.3; 0.35; 0.5; 0.6; 0.8; 1.0; 1.2;
|
||||
[printer:*common*]
|
||||
end_gcode = G1 E-4 F2100.00000\nG91\nG1 Z1 F7200.000\nG90\nG1 X195 Y1\nG1 X190 E4\nG1 F4000\nG1 X180 E2.7 \nG1 F4600\nG1 X110 E2.8\nG1 F5200\nG1 X40 E3 \nG1 E-15.0000 F5000\nG1 E-50.0000 F5400\nG1 E-15.0000 F3000\nG1 E-12.0000 F2000\nG1 F1600\nG1 X0 Y1 E3.0000\nG1 X50 Y1 E-5.0000\nG1 F2000\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-3.0000\nG4 S0\nM107 ; turn off fan\n{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+30, max_print_height)}{endif} ; Move print head up\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nG28 X0 ; home X axis\nM84 ; disable motors\n\n
|
||||
extruder_offset = 0x0
|
||||
gcode_flavor = reprap
|
||||
gcode_flavor = marlin
|
||||
before_layer_gcode = ;BEFORE_LAYER_CHANGE\nG92 E0.0\n;[layer_z]\n\n
|
||||
layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z]
|
||||
pressure_advance = 0
|
||||
@ -53,6 +53,7 @@ z_offset = 0
|
||||
bed_shape = 0x0,200x0,200x200,0x200
|
||||
max_print_height = 200
|
||||
default_filament_profile = Basic PLA
|
||||
silent_mode = 0
|
||||
|
||||
|
||||
[printer:*0.15nozzle*]
|
||||
|
74
resources/ui_layout/Readme.md
Normal file
74
resources/ui_layout/Readme.md
Normal file
@ -0,0 +1,74 @@
|
||||
# How to customize the setting UI
|
||||
|
||||
## How it works
|
||||
The software will search for each tab the needed ui files
|
||||
* for fff printers:
|
||||
* "print.ui" for the Print Settings tab
|
||||
* "filament.ui" for the Filament Settings tab
|
||||
* "printer.ui" for the Printer Settings tab
|
||||
* for slaprinters:
|
||||
* "sla_print.ui" for the Print Settings tab
|
||||
* "sla_material.ui" for the Filament Settings tab
|
||||
* "sla_printer.ui" for the Printer Settings tab
|
||||
If a ui file isn't here, it will build the tab with the default (harcoded) layout.
|
||||
## syntax
|
||||
The tree is composed of page, group, lines and settings
|
||||
A group has to be inside a page.
|
||||
A line has to be inside a group.
|
||||
A setting has to be inside a group or a line.
|
||||
Each object has parameters
|
||||
### syntax of each object
|
||||
STR represent a label that can conatins any character but ':', leading and trailing space and tabs are removed.
|
||||
INT represent an integer
|
||||
parameters that are inside [] are optionals
|
||||
each parameter is separated by ':'
|
||||
* Page:
|
||||
page:STR:STR
|
||||
* first STR is for the label and the second for the icon, with or without the .svg / .png
|
||||
* Group:
|
||||
group[:nolabel][:label_width$INT][:EVENT]:STR
|
||||
* EVENT can be extruders_count_event if the group contains extruders_count and is a printer tab ; silent_mode_event if the group contains silent_mode and is a printer tab ; material_density_event if the group contains material_density.
|
||||
* label_width$INT is used to set the size of the left column, where labels are draw.
|
||||
* nolabel is used to remove the left column, where labels are draw.
|
||||
* Line:
|
||||
line:STR
|
||||
* setting:
|
||||
setting[label$STR][:full_label][:full_width][:simple|advanced|expert][:width$INT][:width$INT][:id$INT]:STR
|
||||
* STR, the last parameter: the id name of the setting.
|
||||
* label$STR : to override the label by this new one
|
||||
* full_label: to override the label by the "full one"
|
||||
* full_width: to tell to create a field that span the full width
|
||||
* simple|advanced|expert: add one of these to modify the mode in which this setting appear. If it's inside a lien, the first setting of the line decide for all the line.
|
||||
* width$INT: change the width of the field. Don't works (yet) with every type of setting.
|
||||
* height$INT: change the height of the field. Don't works (yet) with every type of setting.
|
||||
* id $INT : for setting only a single value of a setting array.
|
||||
* recommended_thin_wall_thickness_description: create a text widget to explain recommended thin wall thickness (only in a fff print tab)
|
||||
* parent_preset_description: create a text widget to explain parent preset
|
||||
* cooling_description: create a text widget to explain cooling (only in a filament tab)
|
||||
* volumetric_speed_description: create a text widget to explain volumetric speed (only in a filament tab)
|
||||
* filament_ramming_parameters: create a widget for filament ramming
|
||||
* filament_overrides_page: create a page for overrides (only in a filament tab)
|
||||
* unregular_pages: create needed special pages for a fff printer tab
|
||||
* printhost: create printhost settings for the group (only in a printer tab)
|
||||
* bed_shape: create bed shape widget (only in a printer tab)
|
||||
* extruders_count: create extruders_count setting (only in a fff printer tab)
|
||||
* logs: activated logs
|
||||
### ui file syntax
|
||||
trailing & leading tabs & spaces are removed, so you can indent as you want.
|
||||
If the first character is '#', then this line is ignored
|
||||
You can end page, group and line section by end_page, end_group but it's not mandatory as they do nothing. You have to use end_line because it indicates when the line end and you have to stop adding settings inside. Note that it's added automatically when line, group or page is called.
|
||||
|
||||
exemple:
|
||||
|
||||
page:my page:my icon name
|
||||
group:my group name
|
||||
setting:label$Choose your base layer height, if you dare:layer_height
|
||||
line:perimeters
|
||||
settings:label$count:perimeters
|
||||
settings:label$only one is spiral:spiral_vase
|
||||
end_line
|
||||
end_group
|
||||
end_page
|
||||
|
||||
## notes
|
||||
A print.ui.legacy is here with the prusaslicer tabs, just rename print.ui and remove the .legacy to switch from the slic3r++ print layout to prusaslicer print layout.
|
94
resources/ui_layout/filament.ui
Normal file
94
resources/ui_layout/filament.ui
Normal file
@ -0,0 +1,94 @@
|
||||
|
||||
page:Filament:spool
|
||||
group:Filament
|
||||
setting:filament_colour
|
||||
setting:filament_diameter
|
||||
setting:extrusion_multiplier
|
||||
setting:filament_density
|
||||
setting:filament_cost
|
||||
group:Temperature °C
|
||||
line:Extruder
|
||||
setting:first_layer_temperature
|
||||
setting:temperature
|
||||
end_line
|
||||
line:Bed
|
||||
setting:first_layer_bed_temperature
|
||||
setting:label:Other layers:bed_temperature
|
||||
end_line
|
||||
setting:chamber_temperature
|
||||
|
||||
page:Cooling:time
|
||||
group:Enable
|
||||
setting:fan_always_on
|
||||
setting:cooling
|
||||
cooling_description
|
||||
group:Fan settings
|
||||
line:Fan speed
|
||||
setting:min_fan_speed
|
||||
setting:max_fan_speed
|
||||
end_line
|
||||
setting:bridge_fan_speed
|
||||
setting:top_fan_speed
|
||||
setting:disable_fan_first_layers
|
||||
group:Cooling thresholds
|
||||
setting:fan_below_layer_time
|
||||
setting:slowdown_below_layer_time
|
||||
setting:min_print_speed
|
||||
|
||||
page:Advanced:wrench
|
||||
group:Filament properties
|
||||
setting:filament_type
|
||||
setting:filament_soluble
|
||||
group:Multimaterial toolchange temperature
|
||||
setting:filament_enable_toolchange_temp
|
||||
setting:filament_toolchange_temp
|
||||
setting:filament_use_fast_skinnydip
|
||||
setting:filament_enable_toolchange_part_fan
|
||||
setting:filament_toolchange_part_fan_speed
|
||||
group:Multimaterial toolchange string reduction
|
||||
setting:filament_use_skinnydip
|
||||
setting:filament_skinnydip_distance
|
||||
setting:filament_melt_zone_pause
|
||||
setting:filament_cooling_zone_pause
|
||||
setting:filament_dip_insertion_speed
|
||||
setting:filament_dip_extraction_speed
|
||||
group:Print speed override
|
||||
setting:filament_max_wipe_tower_speed
|
||||
setting:filament_max_volumetric_speed
|
||||
volumetric_speed_description
|
||||
group:Wipe tower parameters
|
||||
setting:filament_minimal_purge_on_wipe_tower
|
||||
group:Toolchange parameters with single extruder MM printers
|
||||
setting:filament_loading_speed_start
|
||||
setting:filament_loading_speed
|
||||
setting:filament_unloading_speed_start
|
||||
setting:filament_unloading_speed
|
||||
setting:filament_load_time
|
||||
setting:filament_unload_time
|
||||
setting:filament_toolchange_delay
|
||||
setting:filament_cooling_moves
|
||||
setting:filament_cooling_initial_speed
|
||||
setting:filament_cooling_final_speed
|
||||
setting:filament_wipe_advanced_pigment
|
||||
filament_ramming_parameters
|
||||
|
||||
|
||||
filament_overrides_page
|
||||
|
||||
page:Custom G-code:cog
|
||||
group:nolabel:Start G-code
|
||||
setting:full_width:height$35:start_filament_gcode
|
||||
group:nolabel:End G-code
|
||||
setting:full_width:height$35:end_filament_gcode
|
||||
|
||||
page:Notes:note.png
|
||||
group:label_width$0:Notes
|
||||
setting:full_width:height$25:filament_notes
|
||||
|
||||
page:Dependencies:wrench.png
|
||||
group:Profile dependencies
|
||||
setting:compatible_printers
|
||||
setting:full_width:color:compatible_printers_condition
|
||||
setting:compatible_prints
|
||||
setting:full_width:color:compatible_prints_condition
|
||||
parent_preset_description
|
255
resources/ui_layout/print.ui
Normal file
255
resources/ui_layout/print.ui
Normal file
@ -0,0 +1,255 @@
|
||||
#logs
|
||||
page:Perimeters & Shell:shell
|
||||
group:Vertical shells
|
||||
setting:label$perimeters yeah!:width$5:perimeters
|
||||
setting:spiral_vase
|
||||
recommended_thin_wall_thickness_description
|
||||
group:Horizontal shells
|
||||
line:Solid layers
|
||||
setting:top_solid_layers
|
||||
setting:label$Bottom:bottom_solid_layers
|
||||
end_line
|
||||
setting:enforce_full_fill_volume
|
||||
group:Quality (slower slicing)
|
||||
line:Extra perimeters
|
||||
setting:extra_perimeters
|
||||
setting:extra_perimeters_odd_layers
|
||||
end_line
|
||||
setting:only_one_perimeter_top
|
||||
setting:ensure_vertical_shell_thickness
|
||||
setting:avoid_crossing_perimeters
|
||||
setting:thin_perimeters
|
||||
line:Thin walls
|
||||
setting:thin_walls
|
||||
setting:thin_walls_min_width
|
||||
setting:thin_walls_overlap
|
||||
end_line
|
||||
line:Overhangs
|
||||
setting:overhangs
|
||||
setting:overhangs_width
|
||||
end_line
|
||||
setting:no_perimeter_unsupported_algo
|
||||
group:Advanced
|
||||
line:Gap Fill
|
||||
setting:gap_fill
|
||||
setting:gap_fill_min_area
|
||||
end_line
|
||||
line:Seam
|
||||
setting:seam_position
|
||||
setting:seam_travel
|
||||
end_line
|
||||
line:External Perimeter
|
||||
setting:external_perimeters_first
|
||||
setting:external_perimeters_vase
|
||||
end_line
|
||||
line:Looping perimeter
|
||||
setting:perimeter_loop
|
||||
setting:perimeter_loop_seam
|
||||
end_line
|
||||
|
||||
page:Slicing:layers
|
||||
group:Layer height
|
||||
setting:layer_height
|
||||
setting:first_layer_height
|
||||
group:Filtering
|
||||
setting:resolution
|
||||
setting:model_precision
|
||||
setting:slice_closing_radius
|
||||
group:Modifying slices
|
||||
line:Curve smoothing
|
||||
setting:curve_smoothing_precision
|
||||
setting:curve_smoothing_angle_convex
|
||||
setting:curve_smoothing_angle_concave
|
||||
setting:curve_smoothing_cutoff_dist
|
||||
end_line
|
||||
line:XY compensation
|
||||
setting:xy_size_compensation
|
||||
setting:elefant_foot_compensation
|
||||
setting:hole_size_compensation
|
||||
end_line
|
||||
setting:hole_to_polyhole
|
||||
group:Other
|
||||
setting:clip_multipart_objects
|
||||
|
||||
page:Infill:infill
|
||||
group:Infill
|
||||
setting:fill_density
|
||||
setting:fill_pattern
|
||||
line:External patterns
|
||||
setting:top_fill_pattern
|
||||
setting:bottom_fill_pattern
|
||||
end_line
|
||||
setting:solid_fill_pattern
|
||||
setting:infill_not_connected
|
||||
group:Reducing printing time
|
||||
setting:infill_every_layers
|
||||
setting:infill_only_where_needed
|
||||
line:Supporting dense layer
|
||||
setting:infill_dense
|
||||
setting:infill_dense_algo
|
||||
end_line
|
||||
group:Advanced
|
||||
setting:solid_infill_every_layers
|
||||
setting:solid_infill_below_area
|
||||
line:Angle
|
||||
setting:fill_angle
|
||||
setting:bridge_angle
|
||||
end_line
|
||||
line:Anchor solid infill by X mm
|
||||
setting:external_infill_margin
|
||||
setting:bridged_infill_margin
|
||||
end_line
|
||||
setting:only_retract_when_crossing_perimeters
|
||||
setting:infill_first
|
||||
group:Advanced Infill
|
||||
line:Ironing tuning
|
||||
setting:fill_smooth_width
|
||||
setting:fill_smooth_distribution
|
||||
end_line
|
||||
|
||||
page:Skirt & Brim:skirt+brim
|
||||
group:Skirt
|
||||
setting:skirts
|
||||
setting:skirt_distance
|
||||
setting:skirt_height
|
||||
setting:min_skirt_length
|
||||
group:Brim
|
||||
setting:brim_width
|
||||
setting:brim_inside_holes
|
||||
setting:brim_width_interior
|
||||
line:Brim ears
|
||||
setting:brim_ears
|
||||
setting:brim_ears_max_angle
|
||||
end_line
|
||||
|
||||
page:Support material:support
|
||||
group:Support material
|
||||
setting:support_material
|
||||
setting:support_material_auto
|
||||
setting:support_material_threshold
|
||||
setting:support_material_enforce_layers
|
||||
group:Raft
|
||||
setting:support_material_solid_first_layer
|
||||
setting:raft_layers
|
||||
group:Options for support material and raft
|
||||
line:Z-offset
|
||||
setting:support_material_contact_distance_type
|
||||
setting:support_material_contact_distance_top
|
||||
setting:support_material_contact_distance_bottom
|
||||
end_line
|
||||
setting:support_material_pattern
|
||||
setting:support_material_with_sheath
|
||||
setting:support_material_spacing
|
||||
setting:support_material_angle
|
||||
setting:support_material_buildplate_only
|
||||
setting:support_material_xy_spacing
|
||||
setting:dont_support_bridges
|
||||
setting:support_material_synchronize_layers
|
||||
group:Options for support material interface
|
||||
setting:support_material_interface_pattern
|
||||
setting:support_material_interface_layers
|
||||
setting:support_material_interface_spacing
|
||||
setting:support_material_interface_contact_loops
|
||||
|
||||
page:Speed:time
|
||||
group:Speed for print moves
|
||||
line:Perimeter speed
|
||||
setting:perimeter_speed
|
||||
setting:external_perimeter_speed
|
||||
setting:small_perimeter_speed
|
||||
end_line
|
||||
line:Infill speed
|
||||
setting:infill_speed
|
||||
setting:solid_infill_speed
|
||||
setting:top_solid_infill_speed
|
||||
end_line
|
||||
line:Support speed
|
||||
setting:support_material_speed
|
||||
setting:support_material_interface_speed
|
||||
end_line
|
||||
setting:bridge_speed
|
||||
setting:gap_fill_speed
|
||||
group:Speed for non-print moves
|
||||
setting:travel_speed
|
||||
group:Modifiers
|
||||
line:First layer speed
|
||||
setting:first_layer_speed
|
||||
setting:first_layer_infill_speed
|
||||
end_line
|
||||
group:Acceleration control (advanced)
|
||||
setting:perimeter_acceleration
|
||||
setting:infill_acceleration
|
||||
setting:bridge_acceleration
|
||||
setting:first_layer_acceleration
|
||||
setting:default_acceleration
|
||||
group:Autospeed (advanced)
|
||||
setting:max_print_speed
|
||||
setting:max_volumetric_speed
|
||||
|
||||
page:Width & Flow:width
|
||||
group:Extrusion width
|
||||
setting:extrusion_width
|
||||
setting:first_layer_extrusion_width
|
||||
setting:perimeter_extrusion_width
|
||||
setting:external_perimeter_extrusion_width
|
||||
setting:infill_extrusion_width
|
||||
setting:solid_infill_extrusion_width
|
||||
setting:top_infill_extrusion_width
|
||||
setting:support_material_extrusion_width
|
||||
group:Overlap
|
||||
setting:infill_overlap
|
||||
setting:bridge_overlap
|
||||
group:Flow
|
||||
line:Flow ratio
|
||||
setting:bridge_flow_ratio
|
||||
setting:over_bridge_flow_ratio
|
||||
setting:fill_top_flow_ratio
|
||||
end_line
|
||||
|
||||
page:Multiple extruders:funnel
|
||||
group:Extruders
|
||||
setting:perimeter_extruder
|
||||
setting:infill_extruder
|
||||
setting:solid_infill_extruder
|
||||
setting:support_material_extruder
|
||||
setting:support_material_interface_extruder
|
||||
group:Ooze prevention
|
||||
setting:ooze_prevention
|
||||
setting:standby_temperature_delta
|
||||
group:Wipe tower
|
||||
setting:wipe_tower
|
||||
line:Wipe tower position
|
||||
setting:wipe_tower_x
|
||||
setting:wipe_tower_y
|
||||
end_line
|
||||
setting:wipe_tower_width
|
||||
setting:wipe_tower_rotation_angle
|
||||
setting:wipe_tower_bridging
|
||||
setting:wipe_tower_no_sparse_layers
|
||||
setting:single_extruder_multi_material_priming
|
||||
group:Advanced
|
||||
setting:interface_shells
|
||||
|
||||
page:Output options:output+page_white
|
||||
group:Sequential printing
|
||||
setting:complete_objects
|
||||
line:Extruder clearance (mm)
|
||||
setting:width$6:extruder_clearance_radius
|
||||
setting:width$6:extruder_clearance_height
|
||||
end_line
|
||||
group:Output file
|
||||
setting:gcode_comments
|
||||
setting:gcode_label_objects
|
||||
setting:full_width:output_filename_format
|
||||
group:Post-processing scripts
|
||||
setting:full_width:height$5:post_process
|
||||
|
||||
page:Notes:note
|
||||
group:nolabel:Notes
|
||||
setting:full_width:height$25:notes
|
||||
|
||||
page:Dependencies:wrench
|
||||
group:Profile dependencies
|
||||
setting:compatible_printers
|
||||
setting:full_width:color:compatible_printers_condition
|
||||
parent_preset_description
|
236
resources/ui_layout/print.ui.legacy
Normal file
236
resources/ui_layout/print.ui.legacy
Normal file
@ -0,0 +1,236 @@
|
||||
#logs
|
||||
page:Layers and perimeters:layers
|
||||
group:Layer height
|
||||
setting:layer_height
|
||||
setting:first_layer_height
|
||||
group:Vertical shells
|
||||
setting:label$perimeters yeah!:width$5:perimeters
|
||||
setting:spiral_vase
|
||||
recommended_thin_wall_thickness_description
|
||||
group:Horizontal shells
|
||||
line:Solid layers
|
||||
setting:top_solid_layers
|
||||
setting:label$Bottom:bottom_solid_layers
|
||||
end_line
|
||||
setting:enforce_full_fill_volume
|
||||
group:Quality (slower slicing)
|
||||
setting:full_lablel:extra_perimeters
|
||||
setting:full_lablel:extra_perimeters_odd_layers
|
||||
setting:only_one_perimeter_top
|
||||
setting:ensure_vertical_shell_thickness
|
||||
setting:avoid_crossing_perimeters
|
||||
setting:thin_perimeters
|
||||
line:Thin walls
|
||||
setting:thin_walls
|
||||
setting:thin_walls_min_width
|
||||
setting:thin_walls_overlap
|
||||
end_line
|
||||
line:Overhangs
|
||||
setting:overhangs
|
||||
setting:overhangs_width
|
||||
end_line
|
||||
setting:no_perimeter_unsupported_algo
|
||||
group:Advanced
|
||||
line:Gap Fill
|
||||
setting:gap_fill
|
||||
setting:gap_fill_min_area
|
||||
end_line
|
||||
line:Seam
|
||||
setting:seam_position
|
||||
setting:seam_travel
|
||||
end_line
|
||||
line:External Perimeter
|
||||
setting:external_perimeters_first
|
||||
setting:external_perimeters_vase
|
||||
end_line
|
||||
line:Looping perimeter
|
||||
setting:perimeter_loop
|
||||
setting:perimeter_loop_seam
|
||||
end_line
|
||||
|
||||
page:Infill:infill
|
||||
group:Infill
|
||||
setting:fill_density
|
||||
setting:fill_pattern
|
||||
setting:full_label:top_fill_pattern
|
||||
setting:full_label:bottom_fill_pattern
|
||||
setting:solid_fill_pattern
|
||||
setting:infill_not_connected
|
||||
group:Reducing printing time
|
||||
setting:infill_every_layers
|
||||
setting:infill_only_where_needed
|
||||
line:Supporting dense layer
|
||||
setting:infill_dense
|
||||
setting:infill_dense_algo
|
||||
end_line
|
||||
group:Advanced
|
||||
setting:solid_infill_every_layers
|
||||
setting:solid_infill_below_area
|
||||
setting:full_label:fill_angle
|
||||
setting:full_label:bridge_angle
|
||||
line:Anchor solid infill by X mm
|
||||
setting:external_infill_margin
|
||||
setting:bridged_infill_margin
|
||||
end_line
|
||||
setting:only_retract_when_crossing_perimeters
|
||||
setting:infill_first
|
||||
group:Advanced Infill
|
||||
line:Ironing tuning
|
||||
setting:fill_smooth_width
|
||||
setting:fill_smooth_distribution
|
||||
end_line
|
||||
|
||||
page:Skirt and brim:skirt+brim
|
||||
group:Skirt
|
||||
setting:skirts
|
||||
setting:skirt_distance
|
||||
setting:skirt_height
|
||||
setting:min_skirt_length
|
||||
group:Brim
|
||||
setting:brim_width
|
||||
setting:brim_inside_holes
|
||||
setting:brim_width_interior
|
||||
line:Brim ears
|
||||
setting:brim_ears
|
||||
setting:brim_ears_max_angle
|
||||
end_line
|
||||
|
||||
page:Support Material:support
|
||||
group:Support material
|
||||
setting:support_material
|
||||
setting:support_material_auto
|
||||
setting:support_material_threshold
|
||||
setting:support_material_enforce_layers
|
||||
group:Raft
|
||||
setting:support_material_solid_first_layer
|
||||
setting:raft_layers
|
||||
group:Options for support material and raft
|
||||
line:Z-offset
|
||||
setting:support_material_contact_distance_type
|
||||
setting:support_material_contact_distance_top
|
||||
setting:support_material_contact_distance_bottom
|
||||
end_line
|
||||
setting:support_material_pattern
|
||||
setting:support_material_with_sheath
|
||||
setting:support_material_spacing
|
||||
setting:support_material_angle
|
||||
setting:support_material_buildplate_only
|
||||
setting:support_material_xy_spacing
|
||||
setting:dont_support_bridges
|
||||
setting:support_material_synchronize_layers
|
||||
group:Options for support material interface
|
||||
setting:support_material_interface_pattern
|
||||
setting:support_material_interface_layers
|
||||
setting:support_material_interface_spacing
|
||||
setting:support_material_interface_contact_loops
|
||||
|
||||
page:Speed:time
|
||||
group:Speed for print moves
|
||||
setting:full_label:perimeter_speed
|
||||
setting:full_label:external_perimeter_speed
|
||||
setting:full_label:small_perimeter_speed
|
||||
setting:full_label:infill_speed
|
||||
setting:full_label:solid_infill_speed
|
||||
setting:full_label:top_solid_infill_speed
|
||||
setting:full_label:support_material_speed
|
||||
setting:full_label:support_material_interface_speed
|
||||
setting:bridge_speed
|
||||
setting:gap_fill_speed
|
||||
group:Speed for non-print moves
|
||||
setting:travel_speed
|
||||
group:Modifiers
|
||||
setting:full_label:first_layer_speed
|
||||
setting:full_label:first_layer_infill_speed
|
||||
group:Acceleration control (advanced)
|
||||
setting:perimeter_acceleration
|
||||
setting:infill_acceleration
|
||||
setting:bridge_acceleration
|
||||
setting:first_layer_acceleration
|
||||
setting:default_acceleration
|
||||
group:Autospeed (advanced)
|
||||
setting:max_print_speed
|
||||
setting:max_volumetric_speed
|
||||
|
||||
page:Multiple Extruders:funnel
|
||||
group:Extruders
|
||||
setting:perimeter_extruder
|
||||
setting:infill_extruder
|
||||
setting:solid_infill_extruder
|
||||
setting:support_material_extruder
|
||||
setting:support_material_interface_extruder
|
||||
group:Ooze prevention
|
||||
setting:ooze_prevention
|
||||
setting:standby_temperature_delta
|
||||
group:Wipe tower
|
||||
setting:wipe_tower
|
||||
setting:full_label:wipe_tower_x
|
||||
setting:full_label:wipe_tower_y
|
||||
setting:wipe_tower_width
|
||||
setting:wipe_tower_rotation_angle
|
||||
setting:wipe_tower_bridging
|
||||
setting:wipe_tower_no_sparse_layers
|
||||
setting:single_extruder_multi_material_priming
|
||||
group:Advanced
|
||||
setting:interface_shells
|
||||
|
||||
|
||||
page:Advanced:wrench
|
||||
group:Extrusion width
|
||||
setting:extrusion_width
|
||||
setting:first_layer_extrusion_width
|
||||
setting:perimeter_extrusion_width
|
||||
setting:external_perimeter_extrusion_width
|
||||
setting:infill_extrusion_width
|
||||
setting:solid_infill_extrusion_width
|
||||
setting:top_infill_extrusion_width
|
||||
setting:support_material_extrusion_width
|
||||
group:Overlap
|
||||
setting:infill_overlap
|
||||
setting:bridge_overlap
|
||||
group:Flow
|
||||
line:Flow ratio
|
||||
setting:bridge_flow_ratio
|
||||
setting:over_bridge_flow_ratio
|
||||
setting:fill_top_flow_ratio
|
||||
end_line
|
||||
group:Filtering
|
||||
setting:resolution
|
||||
setting:model_precision
|
||||
setting:slice_closing_radius
|
||||
group:Modifying slices
|
||||
line:Curve smoothing
|
||||
setting:curve_smoothing_precision
|
||||
setting:curve_smoothing_angle_convex
|
||||
setting:curve_smoothing_angle_concave
|
||||
setting:curve_smoothing_cutoff_dist
|
||||
end_line
|
||||
setting:full_label:xy_size_compensation
|
||||
setting:full_label:elefant_foot_compensation
|
||||
setting:full_label:hole_size_compensation
|
||||
setting:hole_to_polyhole
|
||||
group:Other
|
||||
setting:clip_multipart_objects
|
||||
|
||||
page:Output options:output+page_white
|
||||
group:Sequential printing
|
||||
setting:complete_objects
|
||||
line:Extruder clearance (mm)
|
||||
setting:width$6:extruder_clearance_radius
|
||||
setting:width$6:extruder_clearance_height
|
||||
end_line
|
||||
group:Output file
|
||||
setting:gcode_comments
|
||||
setting:gcode_label_objects
|
||||
setting:full_width:output_filename_format
|
||||
group:Post-processing scripts
|
||||
setting:full_width:height$5:post_process
|
||||
|
||||
page:Notes:note
|
||||
group:nolabel:Notes
|
||||
setting:full_width:height$25:notes
|
||||
|
||||
page:Dependencies:wrench
|
||||
group:Profile dependencies
|
||||
setting:compatible_printers
|
||||
setting:full_width:color:compatible_printers_condition
|
||||
parent_preset_description
|
49
resources/ui_layout/printer_fff.ui
Normal file
49
resources/ui_layout/printer_fff.ui
Normal file
@ -0,0 +1,49 @@
|
||||
|
||||
page:General:printer
|
||||
group:Size and coordinates
|
||||
bed_shape
|
||||
setting:max_print_height
|
||||
setting:z_offset
|
||||
group:extruders_count_event:Capabilities
|
||||
extruders_count
|
||||
setting:single_extruder_multi_material
|
||||
group:Print Host upload
|
||||
printhost
|
||||
group:silent_mode_event:Firmware
|
||||
setting:gcode_flavor
|
||||
setting:silent_mode
|
||||
setting:remaining_times
|
||||
setting:fan_speedup_time
|
||||
group:Advanced
|
||||
setting:use_relative_e_distances
|
||||
setting:use_firmware_retraction
|
||||
setting:use_volumetric_e
|
||||
setting:variable_layer_height
|
||||
|
||||
page:Custom G-code:cog
|
||||
height:15
|
||||
group:nolabel:Start G-code
|
||||
setting:full_width:start_gcode
|
||||
group:nolabel:End G-code
|
||||
setting:full_width:end_gcode
|
||||
group:nolabel:Before layer change G-code
|
||||
setting:full_width:before_layer_gcode
|
||||
group:nolabel:After layer change G-code
|
||||
setting:full_width:layer_gcode
|
||||
group:nolabel:Tool change G-code
|
||||
setting:full_width:toolchange_gcode
|
||||
group:nolabel:Between objects G-code (for sequential printing)
|
||||
setting:full_width:between_objects_gcode
|
||||
group:nolabel:Between extrusion role change G-code
|
||||
setting:full_width:feature_gcode
|
||||
height:0
|
||||
|
||||
page:Notes:note.png
|
||||
group:nolabel:Notes
|
||||
setting:full_width:height$25:printer_notes
|
||||
|
||||
page:Dependencies:wrench.png
|
||||
group:Profile dependencies
|
||||
parent_preset_description
|
||||
|
||||
unregular_pages
|
46
resources/ui_layout/printer_sla.ui
Normal file
46
resources/ui_layout/printer_sla.ui
Normal file
@ -0,0 +1,46 @@
|
||||
|
||||
page:General:printer
|
||||
group:Size and coordinates
|
||||
bed_shape
|
||||
setting:max_print_height
|
||||
group:Display
|
||||
setting:display_width
|
||||
setting:display_height
|
||||
line:Number of pixels in
|
||||
setting:label$X:display_pixels_x
|
||||
setting:label$Y:display_pixels_y
|
||||
end_line
|
||||
setting:display_orientation
|
||||
# FIXME: This should be on one line in the UI
|
||||
line:Display mirroring
|
||||
setting:label$horizontal:display_mirror_x
|
||||
setting:label$vertical:display_mirror_y
|
||||
end_line
|
||||
group:Tilt
|
||||
line:Tilt time
|
||||
setting:fast_tilt_time
|
||||
setting:slow_tilt_time
|
||||
end_line
|
||||
setting:area_fill
|
||||
group:Corrections
|
||||
line:Printer scaling correction
|
||||
setting:label$XY:id$0:relative_correction
|
||||
setting:label$Z:id$1:relative_correction
|
||||
end_line
|
||||
setting:absolute_correction
|
||||
setting:gamma_correction
|
||||
group:Exposure
|
||||
setting:min_exposure_time
|
||||
setting:max_exposure_time
|
||||
setting:min_initial_exposure_time
|
||||
setting:max_initial_exposure_time
|
||||
group:Print Host upload
|
||||
build_printhost
|
||||
|
||||
page:Notes:note.png
|
||||
group:nolabel:Notes
|
||||
setting:full_width:height$25:printer_notes
|
||||
|
||||
page:Dependencies:wrench.png
|
||||
group:Profile dependencies
|
||||
parent_preset_description
|
32
resources/ui_layout/sla_material.ui
Normal file
32
resources/ui_layout/sla_material.ui
Normal file
@ -0,0 +1,32 @@
|
||||
#logs
|
||||
page:Material:resin
|
||||
group:material_density_event:Material
|
||||
setting:bottle_cost
|
||||
setting:bottle_volume
|
||||
setting:bottle_weight
|
||||
setting:material_density
|
||||
|
||||
group:Layers
|
||||
setting:initial_layer_height
|
||||
|
||||
group:Exposure
|
||||
setting:exposure_time
|
||||
setting:initial_exposure_time
|
||||
|
||||
group:label_width$19:Corrections
|
||||
line:material_correction
|
||||
setting:label$XY:id$0:width$6:material_correction
|
||||
setting:label$Z:id$1:width$6:material_correction
|
||||
end_line
|
||||
|
||||
page:Notes:note
|
||||
group:label_width$0:nolabel:Notes
|
||||
setting:full_width:height$25:material_notes
|
||||
|
||||
page:Dependencies:wrench
|
||||
group:Profile dependencies
|
||||
setting:color:compatible_printers
|
||||
setting:full_width:compatible_printers_condition
|
||||
setting:color:compatible_prints
|
||||
setting:full_width:compatible_prints_condition
|
||||
parent_preset_description
|
63
resources/ui_layout/sla_print.ui
Normal file
63
resources/ui_layout/sla_print.ui
Normal file
@ -0,0 +1,63 @@
|
||||
|
||||
page:Layers and perimeters:layers
|
||||
group:Layers
|
||||
setting:layer_height
|
||||
setting:faded_layers
|
||||
|
||||
page:Supports:support
|
||||
group:Supports
|
||||
setting:supports_enable
|
||||
group:Support head
|
||||
setting:support_head_front_diameter
|
||||
setting:support_head_penetration
|
||||
setting:support_head_width
|
||||
group:Support pillar
|
||||
setting:support_pillar_diameter
|
||||
setting:support_pillar_connection_mode
|
||||
setting:support_buildplate_only
|
||||
# TODO: This parameter is not used at the moment.
|
||||
# setting:support_pillar_widening_factor
|
||||
setting:support_base_diameter
|
||||
setting:support_base_height
|
||||
setting:support_base_safety_distance
|
||||
# Mirrored parameter from Pad page for toggling elevation on the same page
|
||||
setting:pad_around_object
|
||||
setting:support_object_elevation
|
||||
group:Connection of the support sticks and junctions
|
||||
setting:support_critical_angle
|
||||
setting:support_max_bridge_length
|
||||
setting:support_max_pillar_link_distance
|
||||
group:Automatic generation
|
||||
setting:support_points_density_relative
|
||||
setting:support_points_minimal_distance
|
||||
|
||||
page:Pad:pad
|
||||
group:Pad
|
||||
setting:pad_enable
|
||||
setting:pad_wall_thickness
|
||||
setting:pad_wall_height
|
||||
setting:pad_brim_size
|
||||
setting:pad_max_merge_distance
|
||||
# TODO: Disabling this parameter for the beta release
|
||||
# setting:pad_edge_radius
|
||||
setting:pad_wall_slope
|
||||
setting:pad_around_object
|
||||
setting:pad_around_object_everywhere
|
||||
setting:pad_object_gap
|
||||
setting:pad_object_connector_stride
|
||||
setting:pad_object_connector_width
|
||||
setting:pad_object_connector_penetration
|
||||
|
||||
page:Advanced:wrench
|
||||
group:Slicing
|
||||
setting:slice_closing_radius
|
||||
|
||||
page:Output options:output+page_white
|
||||
group:Output file
|
||||
setting:full_width:output_filename_format
|
||||
|
||||
page:Dependencies:wrench
|
||||
group:Profile dependencies
|
||||
setting:color:compatible_printers
|
||||
setting:full_width:compatible_printers_condition
|
||||
parent_preset_description
|
@ -124,7 +124,7 @@ void OptionsGroup::append_line(const Line& line, wxStaticText** full_Label/* = n
|
||||
}
|
||||
}
|
||||
|
||||
auto option_set = line.get_options();
|
||||
const std::vector<Option>& option_set = line.get_options();
|
||||
for (auto opt : option_set)
|
||||
m_options.emplace(opt.opt_id, opt);
|
||||
|
||||
|
@ -1030,14 +1030,462 @@ void Tab::update_frequently_changed_parameters()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool Tab::create_pages(std::string setting_type_name)
|
||||
{
|
||||
std::cout << "create settings " << setting_type_name << "\n";
|
||||
//search for the file
|
||||
const auto ui_layout_file = (boost::filesystem::path(resources_dir()) / "ui_layout" / setting_type_name).make_preferred();
|
||||
if (!boost::filesystem::exists(ui_layout_file)) return false;
|
||||
|
||||
Slic3r::GUI::PageShp current_page;
|
||||
ConfigOptionsGroupShp current_group;
|
||||
Line current_line{ "", "" };
|
||||
bool in_line = false;
|
||||
int height = 0;
|
||||
bool logs = false;
|
||||
|
||||
//read file
|
||||
std::ifstream filestream(ui_layout_file.c_str());
|
||||
std::string full_line;
|
||||
while (std::getline(filestream, full_line)) {
|
||||
if (full_line.size() < 4 || full_line[0] == '#') continue;
|
||||
//remove spaces
|
||||
while (full_line.size() > 1 && (full_line.front() == ' ' || full_line.front() == '\t')) full_line = full_line.substr(1, full_line.size() - 1);
|
||||
while (full_line.size() > 1 && (full_line.back() == ' ' || full_line.back() == '\t')) full_line = full_line.substr(0, full_line.size() - 1);
|
||||
if (full_line.size() < 4 || full_line[0] == '#') continue;
|
||||
//get main command
|
||||
if (boost::starts_with(full_line, "logs"))
|
||||
{
|
||||
logs = true;
|
||||
}
|
||||
else if (boost::starts_with(full_line, "page"))
|
||||
{
|
||||
if (in_line) {
|
||||
current_group->append_line(current_line);
|
||||
if (logs) std::cout << "add line\n";
|
||||
in_line = false;
|
||||
}
|
||||
std::vector<std::string> params;
|
||||
boost::split(params, full_line, boost::is_any_of(":"));
|
||||
for (std::string &str : params) {
|
||||
while (str.size() > 1 && (str.front() == ' ' || str.front() == '\t')) str = str.substr(1, str.size() - 1);
|
||||
while (str.size() > 1 && (str.back() == ' ' || str.back() == '\t')) str = str.substr(0, str.size() - 1);
|
||||
}
|
||||
if (params.size() < 2) std::cerr << "error, you need to add the title and icon of the page example: page:awsome page:shell, \n";
|
||||
if (params.size() < 2) continue;
|
||||
if (params.size() == 2) params.push_back("wrench");
|
||||
|
||||
if(logs) std::cout << "create page " << params[1]<<" : "<< params[2] << "\n";
|
||||
current_page = add_options_page(_(L(params[1])), params[2]);
|
||||
}
|
||||
else if (boost::starts_with(full_line, "end_page"))
|
||||
{
|
||||
if (in_line) {
|
||||
current_group->append_line(current_line);
|
||||
if (logs) std::cout << "add line\n";
|
||||
in_line = false;
|
||||
}
|
||||
current_page.reset();
|
||||
}
|
||||
else if (boost::starts_with(full_line, "group"))
|
||||
{
|
||||
if (in_line) {
|
||||
current_group->append_line(current_line);
|
||||
if (logs) std::cout << "add line\n";
|
||||
in_line = false;
|
||||
}
|
||||
std::vector<std::string> params;
|
||||
boost::split(params, full_line, boost::is_any_of(":"));
|
||||
for (std::string &str : params) {
|
||||
while (str.size() > 1 && (str.front() == ' ' || str.front() == '\t')) str = str.substr(1, str.size() - 1);
|
||||
while (str.size() > 1 && (str.back() == ' ' || str.back() == '\t')) str = str.substr(0, str.size() - 1);
|
||||
}
|
||||
bool nolabel = false;
|
||||
for (int i = 1; i < params.size() - 1; i++) {
|
||||
if (params[i] == "nolabel")
|
||||
{
|
||||
nolabel = true;
|
||||
}
|
||||
}
|
||||
|
||||
current_group = current_page->new_optgroup(_(L(params.back())), nolabel?0:-1);
|
||||
for (int i = 1; i < params.size() - 1; i++) {
|
||||
if (boost::starts_with(params[i], "label_width$")) {
|
||||
current_group->label_width = atoi(params[i].substr(12, params[i].size() - 12).c_str());
|
||||
}
|
||||
else if (params[i] == "extruders_count_event") {
|
||||
TabPrinter* tab = nullptr;
|
||||
if ((tab = dynamic_cast<TabPrinter*>(this)) == nullptr) continue;
|
||||
current_group->m_on_change = [this, tab, current_group](t_config_option_key opt_key, boost::any value) {
|
||||
// optgroup->get_value() return int for def.type == coInt,
|
||||
// Thus, there should be boost::any_cast<int> !
|
||||
// Otherwise, boost::any_cast<size_t> causes an "unhandled unknown exception"
|
||||
size_t extruders_count = size_t(boost::any_cast<int>(current_group->get_value("extruders_count")));
|
||||
wxTheApp->CallAfter([this, tab, opt_key, value, extruders_count]() {
|
||||
if (opt_key == "extruders_count" || opt_key == "single_extruder_multi_material") {
|
||||
tab->extruders_count_changed(extruders_count);
|
||||
init_options_list(); // m_options_list should be updated before UI updating
|
||||
update_dirty();
|
||||
if (opt_key == "single_extruder_multi_material") { // the single_extruder_multimaterial was added to force pages
|
||||
on_value_change(opt_key, value); // rebuild - let's make sure the on_value_change is not skipped
|
||||
|
||||
if (boost::any_cast<bool>(value) && tab->m_extruders_count > 1) {
|
||||
SuppressBackgroundProcessingUpdate sbpu;
|
||||
std::vector<double> nozzle_diameters = static_cast<const ConfigOptionFloats*>(m_config->option("nozzle_diameter"))->values;
|
||||
const double frst_diam = nozzle_diameters[0];
|
||||
|
||||
for (auto cur_diam : nozzle_diameters) {
|
||||
// if value is differs from first nozzle diameter value
|
||||
if (fabs(cur_diam - frst_diam) > EPSILON) {
|
||||
const wxString msg_text = _(L("Single Extruder Multi Material is selected, \n"
|
||||
"and all extruders must have the same diameter.\n"
|
||||
"Do you want to change the diameter for all extruders to first extruder nozzle diameter value?"));
|
||||
wxMessageDialog dialog(parent(), msg_text, _(L("Nozzle diameter")), wxICON_WARNING | wxYES_NO);
|
||||
|
||||
DynamicPrintConfig new_conf = *m_config;
|
||||
if (dialog.ShowModal() == wxID_YES) {
|
||||
for (size_t i = 1; i < nozzle_diameters.size(); i++)
|
||||
nozzle_diameters[i] = frst_diam;
|
||||
|
||||
new_conf.set_key_value("nozzle_diameter", new ConfigOptionFloats(nozzle_diameters));
|
||||
}
|
||||
else
|
||||
new_conf.set_key_value("single_extruder_multi_material", new ConfigOptionBool(false));
|
||||
|
||||
load_config(new_conf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
update_dirty();
|
||||
on_value_change(opt_key, value);
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
else if (params[i] == "silent_mode_event") {
|
||||
TabPrinter* tab = nullptr;
|
||||
if ((tab = dynamic_cast<TabPrinter*>(this)) == nullptr) continue;
|
||||
current_group->m_on_change = [this, tab](t_config_option_key opt_key, boost::any value) {
|
||||
wxTheApp->CallAfter([this, tab, opt_key, value]() {
|
||||
if (opt_key == "silent_mode") {
|
||||
bool val = boost::any_cast<bool>(value);
|
||||
if (tab->m_use_silent_mode != val) {
|
||||
tab->m_rebuild_kinematics_page = true;
|
||||
tab->m_use_silent_mode = val;
|
||||
}
|
||||
}
|
||||
tab->build_unregular_pages();
|
||||
update_dirty();
|
||||
on_value_change(opt_key, value);
|
||||
});
|
||||
};
|
||||
}
|
||||
else if (params[i] == "material_density_event") {
|
||||
current_group->m_on_change = [this, current_group](t_config_option_key opt_key, boost::any value)
|
||||
{
|
||||
DynamicPrintConfig new_conf = *m_config;
|
||||
|
||||
if (opt_key == "bottle_volume") {
|
||||
double new_bottle_weight = boost::any_cast<double>(value) / (new_conf.option("material_density")->getFloat() * 1000);
|
||||
new_conf.set_key_value("bottle_weight", new ConfigOptionFloat(new_bottle_weight));
|
||||
}
|
||||
if (opt_key == "bottle_weight") {
|
||||
double new_bottle_volume = boost::any_cast<double>(value)*(new_conf.option("material_density")->getFloat() * 1000);
|
||||
new_conf.set_key_value("bottle_volume", new ConfigOptionFloat(new_bottle_volume));
|
||||
}
|
||||
if (opt_key == "material_density") {
|
||||
double new_bottle_volume = new_conf.option("bottle_weight")->getFloat() * boost::any_cast<double>(value) * 1000;
|
||||
new_conf.set_key_value("bottle_volume", new ConfigOptionFloat(new_bottle_volume));
|
||||
}
|
||||
|
||||
load_config(new_conf);
|
||||
|
||||
update_dirty();
|
||||
on_value_change(opt_key, value);
|
||||
|
||||
if (opt_key == "bottle_volume" || opt_key == "bottle_cost") {
|
||||
wxGetApp().sidebar().update_sliced_info_sizer();
|
||||
wxGetApp().sidebar().Layout();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
if (logs) std::cout << "create group " << params.back() << "\n";
|
||||
}
|
||||
else if (boost::starts_with(full_line, "end_group"))
|
||||
{
|
||||
if (in_line) {
|
||||
current_group->append_line(current_line);
|
||||
if (logs) std::cout << "add line\n";
|
||||
in_line = false;
|
||||
}
|
||||
current_group.reset();
|
||||
}
|
||||
else if (boost::starts_with(full_line, "line"))
|
||||
{
|
||||
if (in_line) {
|
||||
current_group->append_line(current_line);
|
||||
if (logs) std::cout << "add line\n";
|
||||
in_line = false;
|
||||
}
|
||||
std::string arg = "";
|
||||
if (full_line.size() > 6 && full_line.find(":") != std::string::npos)
|
||||
arg = full_line.substr(full_line.find(":") + 1, full_line.size() - 1 - full_line.find(":"));
|
||||
while (arg.size() > 1 && (arg.back() == ' ' || arg.back() == '\t')) arg = arg.substr(0, arg.size()-1);
|
||||
current_line = { _(L(arg.c_str())), wxString{""} };
|
||||
in_line = true;
|
||||
if (logs) std::cout << "create line " << arg << "\n";
|
||||
}
|
||||
else if (boost::starts_with(full_line, "end_line"))
|
||||
{
|
||||
current_group->append_line(current_line);
|
||||
if (logs) std::cout << "add line\n";
|
||||
in_line = false;
|
||||
}
|
||||
else if (boost::starts_with(full_line, "setting"))
|
||||
{
|
||||
std::vector<std::string> params;
|
||||
boost::split(params, full_line, boost::is_any_of(":"));
|
||||
for (std::string &str : params) {
|
||||
while (str.size() > 1 && (str.front() == ' ' || str.front() == '\t')) str = str.substr(1, str.size() - 1);
|
||||
while (str.size() > 1 && (str.back() == ' ' || str.back() == '\t')) str = str.substr(0, str.size() - 1);
|
||||
}
|
||||
|
||||
std::string setting_id = "";
|
||||
if (params.size() > 1) setting_id = params.back();
|
||||
if (setting_id.size() < 2) continue;
|
||||
if (!m_config->has(setting_id)) {
|
||||
std::cerr << "No " << setting_id << " in ConfigOptionsGroup config.\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
if (setting_id == "compatible_printers") {
|
||||
current_line = current_group->create_single_option_line("compatible_printers");
|
||||
current_line.widget = [this](wxWindow* parent) {
|
||||
return compatible_widget_create(parent, m_compatible_printers);
|
||||
};
|
||||
current_group->append_line(current_line, &m_colored_Label);
|
||||
continue;
|
||||
}
|
||||
else if (setting_id == "compatible_prints") {
|
||||
current_line = current_group->create_single_option_line("compatible_prints");
|
||||
current_line.widget = [this](wxWindow* parent) {
|
||||
return compatible_widget_create(parent, m_compatible_prints);
|
||||
};
|
||||
current_group->append_line(current_line, &m_colored_Label);
|
||||
continue;
|
||||
}
|
||||
|
||||
int id = -1;
|
||||
for (int i = 1; i < params.size() - 1; i++) {
|
||||
if (boost::starts_with(params[i], "id$"))
|
||||
id = atoi(params[i].substr(3, params[i].size() - 3).c_str());
|
||||
}
|
||||
|
||||
Option option = current_group->get_option(setting_id, id);
|
||||
|
||||
bool colored = false;
|
||||
for (int i = 1; i < params.size() - 1; i++) {
|
||||
if (params[i] == "simple")
|
||||
{
|
||||
option.opt.mode = ConfigOptionMode::comSimple;
|
||||
}
|
||||
else if (params[i] == "advanced")
|
||||
{
|
||||
option.opt.mode = ConfigOptionMode::comAdvanced;
|
||||
}
|
||||
else if (params[i] == "expert")
|
||||
{
|
||||
option.opt.mode = ConfigOptionMode::comExpert;
|
||||
}
|
||||
else if (params[i] == "full_label")
|
||||
{
|
||||
option.opt.label = option.opt.full_label;
|
||||
}
|
||||
else if (params[i].find("label$") != std::string::npos)
|
||||
{
|
||||
option.opt.label = params[i].substr(6, params[i].size() - 6);
|
||||
}
|
||||
else if (params[i] == "full_width") {
|
||||
option.opt.full_width = true;
|
||||
}
|
||||
else if (boost::starts_with(params[i], "width$")) {
|
||||
option.opt.width = atoi(params[i].substr(6, params[i].size()-6).c_str());
|
||||
}
|
||||
else if (boost::starts_with(params[i], "height$")) {
|
||||
option.opt.height = atoi(params[i].substr(7, params[i].size() - 7).c_str());
|
||||
}
|
||||
else if (params[i] == "color") {
|
||||
colored = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(height>0)
|
||||
option.opt.height = height;
|
||||
|
||||
if (!in_line)
|
||||
current_group->append_line(current_group->create_single_option_line(option), colored ? &m_colored_Label : nullptr);
|
||||
else
|
||||
current_line.append_option(option);
|
||||
if (logs) std::cout << "create setting " << setting_id <<" with label "<< option.opt.label << "and height "<< option.opt.height<<" fw:"<< option.opt.full_width << "\n";
|
||||
}
|
||||
else if (boost::starts_with(full_line, "height")) {
|
||||
std::string arg = "";
|
||||
if (full_line.size() > 6 && full_line.find(":") != std::string::npos)
|
||||
arg = full_line.substr(full_line.find(":") + 1, full_line.size() - 1 - full_line.find(":"));
|
||||
while (arg.size() > 1 && (arg.back() == ' ' || arg.back() == '\t')) arg = arg.substr(0, arg.size() - 1);
|
||||
height = atoi(arg.c_str());
|
||||
}
|
||||
else if (boost::starts_with(full_line, "recommended_thin_wall_thickness_description")) {
|
||||
TabPrint* tab = nullptr;
|
||||
if ((tab = dynamic_cast<TabPrint*>(this)) == nullptr) continue;
|
||||
current_line = { "", "" };
|
||||
current_line.full_width = 1;
|
||||
current_line.widget = [this, tab](wxWindow* parent) {
|
||||
return description_line_widget(parent, &(tab->m_recommended_thin_wall_thickness_description_line));
|
||||
};
|
||||
current_group->append_line(current_line);
|
||||
}
|
||||
else if (boost::starts_with(full_line, "parent_preset_description")) {
|
||||
current_line = Line{ "", "" };
|
||||
current_line.full_width = 1;
|
||||
current_line.widget = [this](wxWindow* parent) {
|
||||
return description_line_widget(parent, &this->m_parent_preset_description_line);
|
||||
};
|
||||
current_group->append_line(current_line);
|
||||
}
|
||||
else if (boost::starts_with(full_line, "cooling_description")) {
|
||||
TabFilament* tab = nullptr;
|
||||
if ((tab = dynamic_cast<TabFilament*>(this)) == nullptr) continue;
|
||||
current_line = Line{ "", "" };
|
||||
current_line.full_width = 1;
|
||||
current_line.widget = [this, tab](wxWindow* parent) {
|
||||
return description_line_widget(parent, &(tab->m_cooling_description_line));
|
||||
};
|
||||
current_group->append_line(current_line);
|
||||
}
|
||||
else if (boost::starts_with(full_line, "volumetric_speed_description")) {
|
||||
TabFilament* tab = nullptr;
|
||||
if ((tab = dynamic_cast<TabFilament*>(this)) == nullptr) continue;
|
||||
current_line = Line{ "", "" };
|
||||
current_line.full_width = 1;
|
||||
current_line.widget = [this, tab](wxWindow* parent) {
|
||||
return description_line_widget(parent, &(tab->m_volumetric_speed_description_line));
|
||||
};
|
||||
current_group->append_line(current_line);
|
||||
}
|
||||
else if (boost::starts_with(full_line, "filament_ramming_parameters")) {
|
||||
Line thisline = current_group->create_single_option_line("filament_ramming_parameters");// { _(L("Ramming")), "" };
|
||||
thisline.widget = [this](wxWindow* parent) {
|
||||
auto ramming_dialog_btn = new wxButton(parent, wxID_ANY, _(L("Ramming settings")) + dots, wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
|
||||
ramming_dialog_btn->SetFont(Slic3r::GUI::wxGetApp().normal_font());
|
||||
auto sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
sizer->Add(ramming_dialog_btn);
|
||||
|
||||
ramming_dialog_btn->Bind(wxEVT_BUTTON, ([this](wxCommandEvent& e)
|
||||
{
|
||||
RammingDialog dlg(this, (m_config->option<ConfigOptionStrings>("filament_ramming_parameters"))->get_at(0));
|
||||
if (dlg.ShowModal() == wxID_OK)
|
||||
(m_config->option<ConfigOptionStrings>("filament_ramming_parameters"))->get_at(0) = dlg.get_parameters();
|
||||
}));
|
||||
return sizer;
|
||||
};
|
||||
current_group->append_line(thisline);
|
||||
}
|
||||
else if (boost::starts_with(full_line, "filament_overrides_page")) {
|
||||
TabFilament* tab = nullptr;
|
||||
if ((tab = dynamic_cast<TabFilament*>(this)) == nullptr) continue;
|
||||
tab->add_filament_overrides_page();
|
||||
}
|
||||
else if (full_line == "unregular_pages") {
|
||||
TabPrinter* tab = nullptr;
|
||||
if ((tab = dynamic_cast<TabPrinter*>(this)) == nullptr) continue;
|
||||
tab->build_unregular_pages();
|
||||
}
|
||||
else if (full_line == "printhost") {
|
||||
TabPrinter* tab = nullptr;
|
||||
if ((tab = dynamic_cast<TabPrinter*>(this)) == nullptr) continue;
|
||||
tab->build_printhost(current_group.get());
|
||||
}
|
||||
else if (full_line == "bed_shape"){
|
||||
Line myline = current_group->create_single_option_line("bed_shape");//{ _(L("Bed shape")), "" };
|
||||
myline.widget = [this](wxWindow* parent) {
|
||||
ScalableButton* btn;
|
||||
add_scaled_button(parent, &btn, "printer_white", " " + _(L("Set")) + " " + dots, wxBU_LEFT | wxBU_EXACTFIT);
|
||||
btn->SetFont(wxGetApp().normal_font());
|
||||
|
||||
auto sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
sizer->Add(btn);
|
||||
|
||||
btn->Bind(wxEVT_BUTTON, ([this](wxCommandEvent e)
|
||||
{
|
||||
BedShapeDialog dlg(this);
|
||||
dlg.build_dialog(*m_config->option<ConfigOptionPoints>("bed_shape"),
|
||||
*m_config->option<ConfigOptionString>("bed_custom_texture"),
|
||||
*m_config->option<ConfigOptionString>("bed_custom_model"));
|
||||
if (dlg.ShowModal() == wxID_OK) {
|
||||
const std::vector<Vec2d>& shape = dlg.get_shape();
|
||||
const std::string& custom_texture = dlg.get_custom_texture();
|
||||
const std::string& custom_model = dlg.get_custom_model();
|
||||
if (!shape.empty())
|
||||
{
|
||||
load_key_value("bed_shape", shape);
|
||||
load_key_value("bed_custom_texture", custom_texture);
|
||||
load_key_value("bed_custom_model", custom_model);
|
||||
update_changed_ui();
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
return sizer;
|
||||
};
|
||||
current_group->append_line(myline, &m_colored_Label);
|
||||
}
|
||||
else if (full_line == "extruders_count") {
|
||||
ConfigOptionDef def;
|
||||
def.type = coInt,
|
||||
def.set_default_value(new ConfigOptionInt(1));
|
||||
def.label = L("Extruders");
|
||||
def.tooltip = L("Number of extruders of the printer.");
|
||||
def.min = 1;
|
||||
def.mode = comAdvanced;
|
||||
Option option(def, "extruders_count");
|
||||
current_group->append_single_option_line(option);
|
||||
}
|
||||
}
|
||||
/* fs::ifstream inFileUTF(ui_layout_file);tyj
|
||||
std::wbuffer_convert<std::codecvt_utf8<wchar_t>> inFilebufConverted(inFileUTF.rdbuf());
|
||||
std::wistream inFileConverted(&inFilebufConverted);
|
||||
for (std::wstring s; getline(inFileConverted, s); )
|
||||
{
|
||||
std::wcout << p_list_utf.c_str() << '\n' << s << '\n';
|
||||
if (fs::exists(s))
|
||||
std::wcout << "File exists!\n";
|
||||
else
|
||||
std::wcout << "File DOES NOT exist!\n";
|
||||
}*/
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void TabPrint::build()
|
||||
{
|
||||
m_presets = &m_preset_bundle->prints;
|
||||
Line line{ "", "" };
|
||||
load_initial_data();
|
||||
auto page = add_options_page(_(L(toString(OptionCategory::perimeter))), "shell");
|
||||
if (create_pages("print.ui")) return;
|
||||
|
||||
auto optgroup = page->new_optgroup(_(L("Vertical shells")));
|
||||
|
||||
Line line{ "", "" };
|
||||
|
||||
Slic3r::GUI::PageShp page = add_options_page(_(L(toString(OptionCategory::perimeter))), "shell");
|
||||
|
||||
ConfigOptionsGroupShp optgroup = page->new_optgroup(_(L("Vertical shells")));
|
||||
optgroup->append_single_option_line("perimeters");
|
||||
optgroup->append_single_option_line("spiral_vase");
|
||||
|
||||
@ -1155,9 +1603,9 @@ void TabPrint::build()
|
||||
optgroup->append_line(line);
|
||||
optgroup->append_single_option_line("only_retract_when_crossing_perimeters");
|
||||
optgroup->append_single_option_line("infill_first");
|
||||
line = { _(L("Ironing tuning")), "" };
|
||||
|
||||
optgroup = page->new_optgroup(_(L("Advanced Infill")));
|
||||
line = { _(L("Ironing tuning")), "" };
|
||||
line.append_option(optgroup->get_option("fill_smooth_width"));
|
||||
line.append_option(optgroup->get_option("fill_smooth_distribution"));
|
||||
optgroup->append_line(line);
|
||||
@ -1367,6 +1815,7 @@ void TabPrint::update()
|
||||
return; // ys_FIXME
|
||||
|
||||
m_update_cnt++;
|
||||
// Freeze();
|
||||
|
||||
m_config_manipulation.update_print_fff_config(m_config, true);
|
||||
|
||||
@ -1383,7 +1832,7 @@ void TabPrint::update()
|
||||
wxGetApp().obj_list()->update_and_show_object_settings_item();
|
||||
|
||||
wxGetApp().mainframe->on_config_changed(m_config);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TabPrint::OnActivate()
|
||||
@ -1496,6 +1945,7 @@ void TabFilament::build()
|
||||
{
|
||||
m_presets = &m_preset_bundle->filaments;
|
||||
load_initial_data();
|
||||
if (create_pages("filament.ui")) return;
|
||||
|
||||
auto page = add_options_page(_(L("Filament")), "spool");
|
||||
auto optgroup = page->new_optgroup(_(L("Filament")));
|
||||
@ -1878,6 +2328,8 @@ void TabPrinter::build_fff()
|
||||
m_sys_extruders_count = parent_preset == nullptr ? 0 :
|
||||
static_cast<const ConfigOptionFloats*>(parent_preset->config.option("nozzle_diameter"))->values.size();
|
||||
|
||||
if (create_pages("printer_fff.ui")) return;
|
||||
|
||||
auto page = add_options_page(_(L("General")), "printer");
|
||||
auto optgroup = page->new_optgroup(_(L("Size and coordinates")));
|
||||
|
||||
@ -2129,6 +2581,9 @@ void TabPrinter::build_sla()
|
||||
{
|
||||
if (!m_pages.empty())
|
||||
m_pages.resize(0);
|
||||
|
||||
if (create_pages("printer_sla.ui")) return;
|
||||
|
||||
auto page = add_options_page(_(L("General")), "printer");
|
||||
auto optgroup = page->new_optgroup(_(L("Size and coordinates")));
|
||||
|
||||
@ -2260,16 +2715,20 @@ void TabPrinter::extruders_count_changed(size_t extruders_count)
|
||||
if (is_count_changed) {
|
||||
on_value_change("extruders_count", extruders_count);
|
||||
wxGetApp().sidebar().update_objects_list_extruder_column(extruders_count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TabPrinter::append_option_line(ConfigOptionsGroupShp optgroup, const std::string opt_key)
|
||||
void TabPrinter::append_option_line_kinematics(ConfigOptionsGroupShp optgroup, const std::string opt_key)
|
||||
{
|
||||
auto option = optgroup->get_option(opt_key, 0);
|
||||
auto line = Line{ _(option.opt.full_label), "" };
|
||||
Option option = optgroup->get_option(opt_key, 0);
|
||||
Line line = Line{ _(option.opt.full_label), "" };
|
||||
option.opt.width = 10;
|
||||
line.append_option(option);
|
||||
if (m_use_silent_mode)
|
||||
line.append_option(optgroup->get_option(opt_key, 1));
|
||||
if (m_use_silent_mode) {
|
||||
option = optgroup->get_option(opt_key, 1);
|
||||
option.opt.width = 10;
|
||||
line.append_option(option);
|
||||
}
|
||||
optgroup->append_line(line);
|
||||
}
|
||||
|
||||
@ -2286,7 +2745,7 @@ PageShp TabPrinter::build_kinematics_page()
|
||||
|
||||
ConfigOptionDef def;
|
||||
def.type = coString;
|
||||
def.width = 15;
|
||||
def.width = 18;
|
||||
def.gui_type = "legend";
|
||||
def.mode = comAdvanced;
|
||||
def.tooltip = L("Values in this column are for Normal mode");
|
||||
@ -2306,24 +2765,24 @@ PageShp TabPrinter::build_kinematics_page()
|
||||
std::vector<std::string> axes{ "x", "y", "z", "e" };
|
||||
auto optgroup = page->new_optgroup(_(L("Maximum feedrates")));
|
||||
for (const std::string &axis : axes) {
|
||||
append_option_line(optgroup, "machine_max_feedrate_" + axis);
|
||||
append_option_line_kinematics(optgroup, "machine_max_feedrate_" + axis);
|
||||
}
|
||||
|
||||
optgroup = page->new_optgroup(_(L("Maximum accelerations")));
|
||||
for (const std::string &axis : axes) {
|
||||
append_option_line(optgroup, "machine_max_acceleration_" + axis);
|
||||
append_option_line_kinematics(optgroup, "machine_max_acceleration_" + axis);
|
||||
}
|
||||
append_option_line(optgroup, "machine_max_acceleration_extruding");
|
||||
append_option_line(optgroup, "machine_max_acceleration_retracting");
|
||||
append_option_line_kinematics(optgroup, "machine_max_acceleration_extruding");
|
||||
append_option_line_kinematics(optgroup, "machine_max_acceleration_retracting");
|
||||
|
||||
optgroup = page->new_optgroup(_(L("Jerk limits")));
|
||||
for (const std::string &axis : axes) {
|
||||
append_option_line(optgroup, "machine_max_jerk_" + axis);
|
||||
append_option_line_kinematics(optgroup, "machine_max_jerk_" + axis);
|
||||
}
|
||||
|
||||
optgroup = page->new_optgroup(_(L("Minimum feedrates")));
|
||||
append_option_line(optgroup, "machine_min_extruding_rate");
|
||||
append_option_line(optgroup, "machine_min_travel_rate");
|
||||
append_option_line_kinematics(optgroup, "machine_min_extruding_rate");
|
||||
append_option_line_kinematics(optgroup, "machine_min_travel_rate");
|
||||
|
||||
return page;
|
||||
}
|
||||
@ -2816,7 +3275,7 @@ void Tab::rebuild_page_tree()
|
||||
if (item) {
|
||||
m_treectrl->SelectItem(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Tab::update_page_tree_visibility()
|
||||
@ -3563,6 +4022,8 @@ void TabSLAMaterial::build()
|
||||
m_presets = &m_preset_bundle->sla_materials;
|
||||
load_initial_data();
|
||||
|
||||
if (create_pages("sla_material.ui")) return;
|
||||
|
||||
auto page = add_options_page(_(L("Material")), "resin");
|
||||
|
||||
auto optgroup = page->new_optgroup(_(L("Material")));
|
||||
@ -3687,6 +4148,8 @@ void TabSLAPrint::build()
|
||||
m_presets = &m_preset_bundle->sla_prints;
|
||||
load_initial_data();
|
||||
|
||||
if (create_pages("sla_print.ui")) return;
|
||||
|
||||
auto page = add_options_page(_(L("Layers and perimeters")), "layers");
|
||||
|
||||
auto optgroup = page->new_optgroup(_(L("Layers")));
|
||||
@ -3796,7 +4259,7 @@ void TabSLAPrint::update()
|
||||
wxGetApp().obj_list()->update_and_show_object_settings_item();
|
||||
|
||||
wxGetApp().mainframe->on_config_changed(m_config);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ConfigManipulation Tab::get_config_manipulation()
|
||||
|
@ -315,6 +315,8 @@ protected:
|
||||
void fill_icon_descriptions();
|
||||
void set_tooltips_text();
|
||||
|
||||
bool create_pages(std::string setting_type_name);
|
||||
|
||||
ConfigManipulation m_config_manipulation;
|
||||
ConfigManipulation get_config_manipulation();
|
||||
};
|
||||
@ -338,10 +340,11 @@ public:
|
||||
};
|
||||
class TabFilament : public Tab
|
||||
{
|
||||
public:
|
||||
ogStaticText* m_volumetric_speed_description_line;
|
||||
ogStaticText* m_cooling_description_line;
|
||||
|
||||
void add_filament_overrides_page();
|
||||
protected:
|
||||
void update_filament_overrides_page();
|
||||
void update_volumetric_flow_preset_hints();
|
||||
|
||||
@ -361,16 +364,18 @@ public:
|
||||
|
||||
class TabPrinter : public Tab
|
||||
{
|
||||
bool m_has_single_extruder_MM_page = false;
|
||||
bool m_use_silent_mode = false;
|
||||
void append_option_line(ConfigOptionsGroupShp optgroup, const std::string opt_key);
|
||||
bool m_rebuild_kinematics_page = false;
|
||||
|
||||
std::vector<PageShp> m_pages_fff;
|
||||
std::vector<PageShp> m_pages_sla;
|
||||
|
||||
void build_printhost(ConfigOptionsGroup *optgroup);
|
||||
public:
|
||||
void build_printhost(ConfigOptionsGroup *optgroup);
|
||||
|
||||
bool m_has_single_extruder_MM_page = false;
|
||||
bool m_use_silent_mode = false;
|
||||
void append_option_line_kinematics(ConfigOptionsGroupShp optgroup, const std::string opt_key);
|
||||
bool m_rebuild_kinematics_page = false;
|
||||
|
||||
wxButton* m_serial_test_btn = nullptr;
|
||||
ScalableButton* m_print_host_test_btn = nullptr;
|
||||
ScalableButton* m_printhost_browse_btn = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user