Documentation on how to use the {<name>}-variables in Cura 15.* G-Code?

Discussion of Ultimaker's open-source Cura software
Post Reply
reibuehl
Reactions:
Posts: 506
Joined: February 9th, 2016, 9:56 am
Location: Stuttgart, Germany
3D Printer(s): Ultimaker 2

Documentation on how to use the {<name>}-variables in Cura 15.* G-Code?

Post by reibuehl »

Hi all,

I am trying to write some custom start and end G-code to use my Fabrikator Mini with Cura. I tried to find out how the variables like {print_temperature} and {TEMP0} differ and tried to lookup that in the documentation but unfortunately the Help->Documentation in Cura 15.04.6 just points to https://ultimaker.com/en/resources/1871 ... er-manuals where I do not see any Cura manuals (anymore?).
Can somebody here explain me how these variables work, what ones are available and especially what the difference between {print_temperature} and {TEMP0} is? ;-)

Reiner
User avatar
Amedee
Reactions:
Posts: 599
Joined: February 15th, 2016, 11:10 am
Location: Brussels, Belgium
3D Printer(s): UMO / UMO+
Contact:

Re: Documentation on how to use the {<name>}-variables in Cura 15.* G-Code?

Post by Amedee »

You can look at the source here...

It extends the string Formatter class to parse the start/end GCode and replace any Cura parameter found in it.

It passes the complete settings dictionary to the formatter (see _buildGlobalSettingsMessage()) so it looks like there are a gazillion possibilities ;)
It would be good to have indeed the most common ones documented.

But a good start is to look at the DictionaryOfDoom (in the default dict) -- that should give you all you need.

Re. the TEMP0, ... variables (all the ones in capital) I think they are coming from old Legacy Cura.
reibuehl
Reactions:
Posts: 506
Joined: February 9th, 2016, 9:56 am
Location: Stuttgart, Germany
3D Printer(s): Ultimaker 2

Re: Documentation on how to use the {<name>}-variables in Cura 15.* G-Code?

Post by reibuehl »

Image

:lol:
reibuehl
Reactions:
Posts: 506
Joined: February 9th, 2016, 9:56 am
Location: Stuttgart, Germany
3D Printer(s): Ultimaker 2

Re: Documentation on how to use the {<name>}-variables in Cura 15.* G-Code?

Post by reibuehl »

Has this functionality - the variables - been removed from Cura 2.x? I just tried to setup the printer in Cura 2.3.1 with the same start and end g-code as in 15.04.1, but the resulting g-code contains the variables and not the values:

Code: Select all

;FLAVOR:RepRap
;TIME:6446
;Generated with Cura_SteamEngine 2.3.1
M190 S60
M104 S200
M109 S200
G28 ; Home extruder
G1 Z15 F{Z_TRAVEL_SPEED}
M107 ; Turn off fan
G90 ; Absolute positioning
M82 ; Extruder in absolute mode
M140 S70 ; turn on bed heater
M190 S70 ; wait for bed to heat
; Activate all used extruder
{IF_EXT0}M104 T0 S{print_temperature}
G92 E0 ; Reset extruder position
; Wait for all used extruders to reach temperature
{IF_EXT0}M109 T0 S{print_temperature}
User avatar
Amedee
Reactions:
Posts: 599
Joined: February 15th, 2016, 11:10 am
Location: Brussels, Belgium
3D Printer(s): UMO / UMO+
Contact:

Re: Documentation on how to use the {<name>}-variables in Cura 15.* G-Code?

Post by Amedee »

Here are the parameters you can substitute:

Code: Select all

    "acceleration_enabled": false,
    "acceleration_infill": 3000,
    "acceleration_layer_0": 3000,
    "acceleration_prime_tower": 3000,
    "acceleration_print": 3000,
    "acceleration_print_layer_0": 3000,
    "acceleration_skirt_brim": 3000,
    "acceleration_support": 3000,
    "acceleration_support_infill": 3000,
    "acceleration_support_interface": 3000,
    "acceleration_topbottom": 3000,
    "acceleration_travel": 5000,
    "acceleration_travel_layer_0": 5000.0,
    "acceleration_wall": 3000,
    "acceleration_wall_0": 3000,
    "acceleration_wall_x": 3000,
    "adhesion_extruder_nr": "0",
    "adhesion_type": "brim",
    "alternate_extra_perimeter": false,
    "blackmagic": 0,
    "bottom_layers": 8,
    "bottom_thickness": 0.8,
    "brim_line_count": 20,
    "brim_outside_only": true,
    "brim_width": 8.0,
    "coasting_enable": false,
    "coasting_min_volume": 0.8,
    "coasting_speed": 90,
    "coasting_volume": 0.064,
    "conical_overhang_angle": 50,
    "conical_overhang_enabled": false,
    "cool_fan_enabled": true,
    "cool_fan_full_at_height": 0.3,
    "cool_fan_full_layer": 2,
    "cool_fan_speed": 100.0,
    "cool_fan_speed_max": 100.0,
    "cool_fan_speed_min": 100.0,
    "cool_lift_head": false,
    "cool_min_layer_time": 5,
    "cool_min_layer_time_fan_speed_max": 10,
    "cool_min_speed": 10,
    "cooling": 0,
    "draft_shield_dist": 10,
    "draft_shield_enabled": false,
    "draft_shield_height": 10,
    "draft_shield_height_limitation": "full",
    "dual": 0,
    "experimental": 0,
    "extruder_prime_pos_abs": false,
    "extruder_prime_pos_x": 0,
    "extruder_prime_pos_y": 0,
    "extruder_prime_pos_z": 0,
    "gantry_height": 55,
    "gradual_infill_step_height": 5.0,
    "gradual_infill_steps": 0,
    "infill": 0,
    "infill_before_walls": true,
    "infill_line_distance": 4.0,
    "infill_line_width": 0.4,
    "infill_mesh": false,
    "infill_mesh_order": 0,
    "infill_overlap": 10,
    "infill_overlap_mm": 0.04,
    "infill_pattern": "grid",
    "infill_sparse_density": 20,
    "infill_sparse_thickness": 0.1,
    "infill_wipe_dist": 0.1,
    "jerk_enabled": false,
    "jerk_infill": 20,
    "jerk_layer_0": 20,
    "jerk_prime_tower": 20,
    "jerk_print": 20,
    "jerk_print_layer_0": 20,
    "jerk_skirt_brim": 20,
    "jerk_support": 20,
    "jerk_support_infill": 20,
    "jerk_support_interface": 20,
    "jerk_topbottom": 20,
    "jerk_travel": 30,
    "jerk_travel_layer_0": 30.0,
    "jerk_wall": 20,
    "jerk_wall_0": 20,
    "jerk_wall_x": 20,
    "layer_0_z_overlap": 0.15,
    "layer_height": 0.1,
    "layer_height_0": 0.3,
    "line_width": 0.4,
    "machine_acceleration": 4000,
    "machine_center_is_zero": false,
    "machine_depth": 205,
    "machine_extruder_count": 1,
    "machine_gcode_flavor": "RepRap (Marlin/Sprinter)",
    "machine_heat_zone_length": 16,
    "machine_heated_bed": true,
    "machine_height": 200,
    "machine_max_acceleration_e": 10000,
    "machine_max_acceleration_x": 9000,
    "machine_max_acceleration_y": 9000,
    "machine_max_acceleration_z": 100,
    "machine_max_feedrate_e": 45,
    "machine_max_feedrate_x": 500,
    "machine_max_feedrate_y": 500,
    "machine_max_feedrate_z": 30,
    "machine_max_jerk_e": 5.0,
    "machine_max_jerk_xy": 20.0,
    "machine_max_jerk_z": 0.4,
    "machine_min_cool_heat_time_window": 50.0,
    "machine_minimum_feedrate": 0.0,
    "machine_name": "Ultimaker Original+",
    "machine_nozzle_cool_down_speed": 2,
    "machine_nozzle_expansion_angle": 45,
    "machine_nozzle_head_distance": 3,
    "machine_nozzle_heat_up_speed": 2,
    "machine_nozzle_size": 0.4,
    "machine_nozzle_tip_outer_diameter": 1,
    "machine_settings": 0,
    "machine_show_variants": false,
    "machine_use_extruder_offset_to_offset_coords": true,
    "machine_width": 205,
    "magic_fuzzy_skin_enabled": false,
    "magic_fuzzy_skin_point_density": 1.25,
    "magic_fuzzy_skin_point_dist": 0.8,
    "magic_fuzzy_skin_thickness": 0.3,
    "magic_mesh_surface_mode": "normal",
    "magic_spiralize": false,
    "material": 0,
    "material_bed_temp_prepend": true,
    "material_bed_temp_wait": true,
    "material_bed_temperature": 60,
    "material_diameter": 2.85,
    "material_extrusion_cool_down_speed": 0.5,
    "material_flow": 100,
    "material_flow_dependent_temperature": false,
    "material_flow_temp_graph": "[[3.5,200],[7.0,240]]",
    "material_guid": "",
    "material_print_temp_prepend": true,
    "material_print_temp_wait": true,
    "material_print_temperature": 200,
    "material_standby_temperature": 175,
    "max_feedrate_z_override": 0,
    "meshfix": 0,
    "meshfix_extensive_stitching": false,
    "meshfix_keep_open_polygons": false,
    "meshfix_union_all": true,
    "meshfix_union_all_remove_holes": false,
    "multiple_mesh_overlap": 0.15,
    "ooze_shield_angle": 60,
    "ooze_shield_dist": 2,
    "ooze_shield_enabled": false,
    "outer_inset_first": false,
    "platform_adhesion": 0,
    "prime_tower_enable": false,
    "prime_tower_flow": 100,
    "prime_tower_line_width": 0.4,
    "prime_tower_position_x": 200,
    "prime_tower_position_y": 200,
    "prime_tower_size": 0,
    "prime_tower_wipe_enabled": true,
    "print_sequence": "all_at_once",
    "raft_acceleration": 3000,
    "raft_airgap": 0.3,
    "raft_base_acceleration": 3000,
    "raft_base_fan_speed": 0,
    "raft_base_jerk": 20,
    "raft_base_line_spacing": 1.6,
    "raft_base_line_width": 0.8,
    "raft_base_speed": 22.5,
    "raft_base_thickness": 0.36,
    "raft_fan_speed": 0,
    "raft_interface_acceleration": 3000,
    "raft_interface_fan_speed": 0,
    "raft_interface_jerk": 20,
    "raft_interface_line_spacing": 1.0,
    "raft_interface_line_width": 0.8,
    "raft_interface_speed": 22.5,
    "raft_interface_thickness": 0.15000000000000002,
    "raft_jerk": 20,
    "raft_margin": 15,
    "raft_speed": 30.0,
    "raft_surface_acceleration": 3000,
    "raft_surface_fan_speed": 0,
    "raft_surface_jerk": 20,
    "raft_surface_layers": 2,
    "raft_surface_line_spacing": 0.4,
    "raft_surface_line_width": 0.4,
    "raft_surface_speed": 30.0,
    "raft_surface_thickness": 0.1,
    "resolution": 0,
    "retraction_amount": 6.5,
    "retraction_combing": "all",
    "retraction_count_max": 90,
    "retraction_enable": true,
    "retraction_extra_prime_amount": 0,
    "retraction_extrusion_window": 6.5,
    "retraction_hop": 1,
    "retraction_hop_after_extruder_switch": true,
    "retraction_hop_enabled": false,
    "retraction_hop_only_when_collides": false,
    "retraction_min_travel": 0.8,
    "retraction_prime_speed": 25,
    "retraction_retract_speed": 25,
    "retraction_speed": 25,
    "shell": 0,
    "skin_alternate_rotation": false,
    "skin_line_width": 0.4,
    "skin_no_small_gaps_heuristic": true,
    "skin_outline_count": 0,
    "skin_overlap": 5,
    "skin_overlap_mm": 0.02,
    "skirt_brim_line_width": 0.4,
    "skirt_brim_minimal_length": 250,
    "skirt_brim_speed": 30,
    "skirt_gap": 3,
    "skirt_line_count": 1,
    "speed": 0,
    "speed_equalize_flow_enabled": false,
    "speed_equalize_flow_max": 150,
    "speed_infill": 60,
    "speed_layer_0": 30,
    "speed_prime_tower": 60,
    "speed_print": 60,
    "speed_print_layer_0": 30,
    "speed_slowdown_layers": 2.0,
    "speed_support": 60,
    "speed_support_infill": 60,
    "speed_support_interface": 40.0,
    "speed_topbottom": 30.0,
    "speed_travel": 120,
    "speed_travel_layer_0": 60.0,
    "speed_wall": 30.0,
    "speed_wall_0": 30.0,
    "speed_wall_x": 60.0,
    "support": 0,
    "support_angle": 50,
    "support_bottom_distance": 0.1,
    "support_bottom_height": 1,
    "support_bottom_stair_step_height": 0.3,
    "support_conical_angle": 30,
    "support_conical_enabled": false,
    "support_conical_min_width": 5.0,
    "support_connect_zigzags": true,
    "support_enable": false,
    "support_extruder_nr": "0",
    "support_extruder_nr_layer_0": "0",
    "support_infill_extruder_nr": "0",
    "support_infill_rate": 15,
    "support_interface_density": 100,
    "support_interface_enable": false,
    "support_interface_extruder_nr": "0",
    "support_interface_height": 1,
    "support_interface_line_distance": 0.4,
    "support_interface_line_width": 0.4,
    "support_interface_pattern": "concentric",
    "support_interface_skip_height": 0.3,
    "support_join_distance": 2.0,
    "support_line_distance": 2.6666666666666665,
    "support_line_width": 0.4,
    "support_minimal_diameter": 3.0,
    "support_offset": 0.2,
    "support_pattern": "zigzag",
    "support_roof_height": 1,
    "support_top_distance": 0.1,
    "support_tower_diameter": 3.0,
    "support_tower_roof_angle": 65,
    "support_type": "everywhere",
    "support_use_towers": true,
    "support_xy_distance": 0.7,
    "support_xy_distance_overhang": 0.2,
    "support_xy_overrides_z": "z_overrides_xy",
    "support_z_distance": 0.1,
    "switch_extruder_prime_speed": 20,
    "switch_extruder_retraction_amount": 16,
    "switch_extruder_retraction_speed": 20,
    "switch_extruder_retraction_speeds": 20,
    "top_bottom_pattern": "lines",
    "top_bottom_thickness": 0.8,
    "top_layers": 8,
    "top_thickness": 0.8,
    "travel": 0,
    "travel_avoid_distance": 0.625,
    "travel_avoid_other_parts": true,
    "travel_compensate_overlapping_walls_0_enabled": true,
    "travel_compensate_overlapping_walls_enabled": true,
    "travel_compensate_overlapping_walls_x_enabled": true,
    "wall_0_inset": 0,
    "wall_line_count": 2,
    "wall_line_width": 0.4,
    "wall_line_width_0": 0.4,
    "wall_line_width_x": 0.4,
    "wall_thickness": 0.8,
    "wireframe_bottom_delay": 0,
    "wireframe_drag_along": 0.6,
    "wireframe_enabled": false,
    "wireframe_fall_down": 0.5,
    "wireframe_flat_delay": 0.1,
    "wireframe_flow": 100,
    "wireframe_flow_connection": 100,
    "wireframe_flow_flat": 100,
    "wireframe_height": 3,
    "wireframe_nozzle_clearance": 1,
    "wireframe_printspeed": 5,
    "wireframe_printspeed_bottom": 5,
    "wireframe_printspeed_down": 5,
    "wireframe_printspeed_flat": 5,
    "wireframe_printspeed_up": 5,
    "wireframe_roof_drag_along": 0.8,
    "wireframe_roof_fall_down": 2,
    "wireframe_roof_inset": 3,
    "wireframe_roof_outer_delay": 0.2,
    "wireframe_straight_before_down": 20,
    "wireframe_strategy": "compensate",
    "wireframe_top_delay": 0,
    "wireframe_top_jump": 0.6,
    "wireframe_up_half_speed": 0.3,
    "xy_offset": 0,
    "z_seam_type": "shortest"
Post Reply

Return to “Cura”