Ultimaker / CuraEngine

Powerful, fast and robust engine for converting 3D models into g-code instructions for 3D printers. It is part of the larger open source project Cura.
https://ultimaker.com/en/products/cura-software
GNU Affero General Public License v3.0
1.69k stars 885 forks source link

Cubic Subdivision prints some infill lines twice #913

Closed notnyt closed 5 years ago

notnyt commented 6 years ago

Application Version Cura 3.5.1

Platform Windows

Steps to Reproduce print something using cubic subdivision

Actual Results some lines are printed twice. This causes the extruder to hit the infill during moves.

Here you can see a retract, move, reprime after retract, print line, then print again back over the same line

G1 F6000 E-0.3
G0 F18000 X279.034 Y144.461
G1 F3600 E0.3
G1 F4800 X287.709 Y159.973 E0.29557
G1 X279.034 Y144.461 E0.29557

Expected results lines should only be printed once

Additional Information

This is the visualization of the gcode above

before move.. image

moved into place... image

printed line image

printed again back over line image

settings

;End of Gcode
;SETTING_3 {"global_quality": "[general]\\nversion = 4\\nname = 0.4 right only\\
;SETTING_3 ndefinition = fdmprinter\\n\\n[metadata]\\nsetting_version = 5\\ntype
;SETTING_3  = quality_changes\\nquality_type = draft\\n\\n[values]\\nacceleratio
;SETTING_3 n_enabled = True\\nadhesion_extruder_nr = 1\\nadhesion_type = skirt\\
;SETTING_3 nbridge_wall_min_length = 1\\ndefault_material_bed_temperature = 50\\
;SETTING_3 ninfill_extruder_nr = 1\\nlayer_height = 0.1\\nlayer_height_0 = 0.3\\
;SETTING_3 nmaterial_bed_temperature = 50\\nmaterial_bed_temperature_layer_0 = 5
;SETTING_3 0\\nprime_tower_circular = False\\nprime_tower_enable = False\\nprime
;SETTING_3 _tower_position_x = 160\\nprime_tower_position_y = 165\\nprime_tower_
;SETTING_3 size = 15\\nretraction_combing = all\\nroofing_extruder_nr = 1\\nspee
;SETTING_3 d_slowdown_layers = 2\\nsupport_enable = False\\nsupport_extruder_nr 
;SETTING_3 = 1\\nsupport_tree_enable = False\\nsupport_type = everywhere\\ntop_b
;SETTING_3 ottom_extruder_nr = 1\\nwall_0_extruder_nr = =wall_extruder_nr\\nwall
;SETTING_3 _extruder_nr = 1\\nwall_min_flow = 40\\nwall_x_extruder_nr = =wall_ex
;SETTING_3 truder_nr\\n\\n", "extruder_quality": ["[general]\\nversion = 4\\nnam
;SETTING_3 e = 0.4 right only\\ndefinition = fdmprinter\\n\\n[metadata]\\npositi
;SETTING_3 on = 0\\nsetting_version = 5\\ntype = quality_changes\\nquality_type 
;SETTING_3 = draft\\n\\n[values]\\nacceleration_layer_0 = 1000\\nacceleration_pr
;SETTING_3 ime_tower = 1500\\nacceleration_print = 1500\\nacceleration_print_lay
;SETTING_3 er_0 = =acceleration_layer_0\\nacceleration_skirt_brim = 600\\naccele
;SETTING_3 ration_support = 1500\\nacceleration_support_infill = =acceleration_s
;SETTING_3 upport\\nacceleration_topbottom = 1000\\nacceleration_travel = 1500\\
;SETTING_3 nacceleration_travel_layer_0 = 1500\\nacceleration_wall_0 = 1000\\nac
;SETTING_3 celeration_wall_x = 1000\\nalternate_extra_perimeter = True\\nbottom_
;SETTING_3 layers = =999999 if infill_sparse_density == 100 else math.ceil(round
;SETTING_3 (bottom_thickness / resolveOrValue('layer_height'), 4))\\nconical_ove
;SETTING_3 rhang_angle = 65\\ncool_fan_full_layer = 30\\ncool_fan_speed = =100.0
;SETTING_3  if cool_fan_enabled else 0.0\\ncool_min_speed = 5\\ndefault_material
;SETTING_3 _print_temperature = 215\\nfill_outline_gaps = True\\nfill_perimeter_
;SETTING_3 gaps = nowhere\\ngradual_support_infill_step_height = 2\\ninfill_befo
;SETTING_3 re_walls = False\\ninfill_overlap = =10 if infill_sparse_density < 95
;SETTING_3  and infill_pattern != 'concentric' else 0\\ninfill_pattern = ='lines
;SETTING_3 ' if infill_sparse_density > 25 else 'grid'\\ninfill_sparse_density =
;SETTING_3  0\\ninfill_wipe_dist = 0.2\\ninitial_layer_line_width_factor = 100\\
;SETTING_3 nironing_enabled = False\\nironing_flow = 15.0\\nironing_inset = =wal
;SETTING_3 l_line_width_0 / 2\\nironing_line_spacing = 0.2\\nironing_pattern = z
;SETTING_3 igzag\\nlayer_start_y = 400\\nlimit_support_retractions = False\\nlin
;SETTING_3 e_width = =machine_nozzle_size\\nmagic_fuzzy_skin_point_density = 5\\
;SETTING_3 nmagic_fuzzy_skin_thickness = 0.2\\nmaterial_extrusion_cool_down_spee
;SETTING_3 d = 0\\nmaterial_final_print_temperature = 215\\nmaterial_flow = 100\
;SETTING_3 \nmaterial_initial_print_temperature = 215\\nmaterial_print_temperatu
;SETTING_3 re = =default_material_print_temperature\\nmaterial_print_temperature
;SETTING_3 _layer_0 = =material_print_temperature\\nmaterial_standby_temperature
;SETTING_3  = 192\\nmeshfix_union_all_remove_holes = False\\nmin_infill_area = 5
;SETTING_3 \\noptimize_wall_printing_order = True\\nprime_blob_enable = False\\n
;SETTING_3 raft_acceleration = 600\\nraft_airgap = 0\\nraft_base_speed = 15\\nra
;SETTING_3 ft_base_thickness = 0.4\\nraft_interface_speed = 30\\nraft_interface_
;SETTING_3 thickness = 0.3\\nraft_margin = 2\\nraft_smoothing = 10\\nraft_surfac
;SETTING_3 e_speed = 45\\nraft_surface_thickness = 0.3\\nretract_at_layer_change
;SETTING_3  = False\\nretraction_amount = 0.3\\nretraction_combing_max_distance 
;SETTING_3 = 2\\nretraction_extra_prime_amount = 0\\nretraction_extrusion_window
;SETTING_3  = =retraction_amount\\nretraction_hop = 0.1\\nretraction_hop_enabled
;SETTING_3  = True\\nretraction_retract_speed = 100\\nretraction_speed = 60\\nsk
;SETTING_3 irt_gap = 10\\nskirt_line_count = 3\\nspeed_infill = =speed_print\\ns
;SETTING_3 peed_ironing = 15\\nspeed_layer_0 = =speed_print * 30 / 60\\nspeed_pr
;SETTING_3 ime_tower = =speed_print\\nspeed_print = 60\\nspeed_support = =speed_
;SETTING_3 print\\nspeed_support_bottom = =extruderValue(support_bottom_extruder
;SETTING_3 _nr, 'speed_support_interface')\\nspeed_support_infill = =speed_suppo
;SETTING_3 rt\\nspeed_support_interface = =speed_support / 1.5\\nspeed_topbottom
;SETTING_3  = =speed_print / 2\\nspeed_travel = 200\\nspeed_travel_layer_0 = 200
;SETTING_3 \\nspeed_wall = 60\\nspeed_wall_0 = =speed_wall\\nspeed_wall_x = 60\\
;SETTING_3 nsupport_angle = 88\\nsupport_bottom_density = 50\\nsupport_bottom_pa
;SETTING_3 ttern = zigzag\\nsupport_bottom_stair_step_height = 0.5\\nsupport_bot
;SETTING_3 tom_stair_step_width = 0.2\\nsupport_connect_zigzags = True\\nsupport
;SETTING_3 _fan_enable = True\\nsupport_infill_rate = 25\\nsupport_interface_den
;SETTING_3 sity = 70\\nsupport_interface_enable = True\\nsupport_interface_heigh
;SETTING_3 t = 0.4\\nsupport_interface_skip_height = 0.05\\nsupport_join_distanc
;SETTING_3 e = 5\\nsupport_offset = 0\\nsupport_roof_density = 100\\nsupport_roo
;SETTING_3 f_enable = True\\nsupport_supported_skin_fan_speed = 0\\nsupport_towe
;SETTING_3 r_roof_angle = 3\\nsupport_tree_angle = 45\\nsupport_tree_branch_diam
;SETTING_3 eter = 3\\nsupport_tree_branch_diameter_angle = 3\\nsupport_tree_bran
;SETTING_3 ch_distance = 0.15\\nsupport_tree_collision_resolution = 0.1\\nsuppor
;SETTING_3 t_xy_distance = 0.3\\nsupport_xy_distance_overhang = =machine_nozzle_
;SETTING_3 size / 2\\nsupport_z_distance = 0\\nswitch_extruder_prime_speed = 60\
;SETTING_3 \nswitch_extruder_retraction_amount = 2\\nswitch_extruder_retraction_
;SETTING_3 speed = =switch_extruder_retraction_speeds\\nswitch_extruder_retracti
;SETTING_3 on_speeds = 100\\ntop_bottom_thickness = 0\\ntop_layers = =0 if infil
;SETTING_3 l_sparse_density == 100 else math.ceil(round(top_thickness / resolveO
;SETTING_3 rValue('layer_height'), 4))\\ntravel_avoid_other_parts = False\\ntrav
;SETTING_3 el_compensate_overlapping_walls_enabled = False\\nwall_0_wipe_dist = 
;SETTING_3 =machine_nozzle_size / 2\\nwall_line_count = =1 if magic_spiralize el
;SETTING_3 se max(1, round((wall_thickness - wall_line_width_0) / wall_line_widt
;SETTING_3 h_x) + 1) if wall_thickness != 0 else 0\\nwall_thickness = 0.6\\nxy_o
;SETTING_3 ffset = 0\\nz_seam_corner = z_seam_corner_inner\\nz_seam_relative = F
;SETTING_3 alse\\nz_seam_type = sharpest_corner\\nz_seam_x = 0\\nz_seam_y = 400\
;SETTING_3 \n\\n", "[general]\\nversion = 4\\nname = 0.4 right only\\ndefinition
;SETTING_3  = fdmprinter\\n\\n[metadata]\\nposition = 1\\nsetting_version = 5\\n
;SETTING_3 type = quality_changes\\nquality_type = draft\\n\\n[values]\\nacceler
;SETTING_3 ation_layer_0 = =acceleration_print\\nacceleration_print = 1500\\nacc
;SETTING_3 eleration_roofing = =acceleration_topbottom\\nacceleration_topbottom 
;SETTING_3 = =acceleration_print\\nacceleration_travel = 1500\\nacceleration_tra
;SETTING_3 vel_layer_0 = 1500\\nacceleration_wall = 600\\nacceleration_wall_0 = 
;SETTING_3 1500\\nacceleration_wall_x = 1500\\nalternate_extra_perimeter = True\
;SETTING_3 \nbottom_layers = =999999 if infill_sparse_density == 100 else math.c
;SETTING_3 eil(round(bottom_thickness / resolveOrValue('layer_height'), 4))\\nbr
;SETTING_3 idge_fan_speed_2 = 100\\nbridge_skin_density_2 = 100\\nbridge_skin_de
;SETTING_3 nsity_3 = 100\\nbridge_skin_material_flow = 75\\nbridge_skin_material
;SETTING_3 _flow_2 = 150\\nbridge_skin_material_flow_3 = 100\\nbridge_skin_speed
;SETTING_3 _3 = 20\\nbridge_wall_material_flow = 75\\nconical_overhang_angle = 7
;SETTING_3 0\\nconical_overhang_enabled = False\\ncool_fan_full_layer = 30\\ncoo
;SETTING_3 l_fan_speed = 50\\ncool_min_layer_time = 5\\ncool_min_layer_time_fan_
;SETTING_3 speed_max = 15\\ndefault_material_print_temperature = 235\\nfill_outl
;SETTING_3 ine_gaps = False\\nfill_perimeter_gaps = everywhere\\nfilter_out_tiny
;SETTING_3 _gaps = True\\ngradual_infill_step_height = 20\\ngradual_infill_steps
;SETTING_3  = 1\\ninfill_before_walls = False\\ninfill_pattern = cubicsubdiv\\ni
;SETTING_3 nfill_sparse_density = 10\\ninfill_wipe_dist = 0.2\\nlayer_0_z_overla
;SETTING_3 p = =raft_airgap / 2\\nlayer_start_y = 400\\nlimit_support_retraction
;SETTING_3 s = False\\nline_width = =machine_nozzle_size\\nmaterial_extrusion_co
;SETTING_3 ol_down_speed = 0\\nmaterial_final_print_temperature = 235\\nmaterial
;SETTING_3 _flow = 100\\nmaterial_flow_layer_0 = 100\\nmaterial_initial_print_te
;SETTING_3 mperature = 235\\nmaterial_print_temperature = 235\\nmaterial_standby
;SETTING_3 _temperature = 235\\nmeshfix_union_all_remove_holes = False\\nmin_inf
;SETTING_3 ill_area = 5\\noptimize_wall_printing_order = True\\nprime_tower_flow
;SETTING_3  = 140\\nprime_tower_min_volume = 8\\nraft_airgap = 0.05\\nraft_base_
;SETTING_3 fan_speed = 40\\nraft_base_line_spacing = 2.4\\nraft_base_speed = 20\
;SETTING_3 \nraft_base_thickness = 0.3\\nraft_interface_fan_speed = 40\\nraft_in
;SETTING_3 terface_speed = 40\\nraft_margin = 2\\nraft_surface_speed = 40\\nraft
;SETTING_3 _surface_thickness = 0.2\\nretraction_amount = 0.3\\nretraction_combi
;SETTING_3 ng_max_distance = 2\\nretraction_hop = 0.1\\nretraction_hop_enabled =
;SETTING_3  True\\nretraction_min_travel = =line_width * 2\\nretraction_prime_sp
;SETTING_3 eed = 60\\nretraction_speed = 100\\nroofing_layer_count = 1\\nskin_ou
;SETTING_3 tline_count = 2\\nskirt_gap = 0.2\\nskirt_line_count = 1\\nslicing_to
;SETTING_3 lerance = exclusive\\nspeed_infill = 80\\nspeed_print = 80\\nspeed_pr
;SETTING_3 int_layer_0 = 20\\nspeed_topbottom = =speed_print / 2\\nspeed_travel 
;SETTING_3 = 300\\nspeed_travel_layer_0 = 300\\nspeed_wall = =speed_print / 2\\n
;SETTING_3 speed_wall_0 = =speed_wall\\nspeed_wall_x = 60\\nsupport_angle = 80\\
;SETTING_3 nsupport_offset = 0.3\\nsupport_xy_distance = 0.4\\nswitch_extruder_p
;SETTING_3 rime_speed = 60\\nswitch_extruder_retraction_amount = 1\\nswitch_extr
;SETTING_3 uder_retraction_speed = 100\\nswitch_extruder_retraction_speeds = 100
;SETTING_3 \\ntop_bottom_thickness = 0.8\\ntop_layers = =0 if infill_sparse_dens
;SETTING_3 ity == 100 else math.ceil(round(top_thickness / resolveOrValue('layer
;SETTING_3 _height'), 4))\\ntravel_avoid_other_parts = False\\ntravel_compensate
;SETTING_3 _overlapping_walls_0_enabled = =travel_compensate_overlapping_walls_e
;SETTING_3 nabled\\ntravel_compensate_overlapping_walls_enabled = False\\nwall_0
;SETTING_3 _wipe_dist = =machine_nozzle_size / 2\\nwall_line_count = 2\\nwall_ov
;SETTING_3 erhang_angle = 60\\nwall_overhang_speed_factor = 25\\nwall_thickness 
;SETTING_3 = 0.4\\nzig_zaggify_infill = True\\n\\n", "[general]\\nversion = 4\\n
;SETTING_3 name = 0.4 right only\\ndefinition = fdmprinter\\n\\n[metadata]\\npos
;SETTING_3 ition = 2\\nsetting_version = 5\\ntype = quality_changes\\nquality_ty
;SETTING_3 pe = draft\\n\\n[values]\\n\\n", "[general]\\nversion = 4\\nname = 0.
;SETTING_3 4 right only\\ndefinition = fdmprinter\\n\\n[metadata]\\nposition = 3
;SETTING_3 \\nsetting_version = 5\\ntype = quality_changes\\nquality_type = draf
;SETTING_3 t\\n\\n[values]\\n\\n", "[general]\\nversion = 4\\nname = 0.4 right o
;SETTING_3 nly\\ndefinition = fdmprinter\\n\\n[metadata]\\nposition = 4\\nsettin
;SETTING_3 g_version = 5\\ntype = quality_changes\\nquality_type = draft\\n\\n[v
;SETTING_3 alues]\\n\\n", "[general]\\nversion = 4\\nname = 0.4 right only\\ndef
;SETTING_3 inition = fdmprinter\\n\\n[metadata]\\nposition = 5\\nsetting_version
;SETTING_3  = 5\\ntype = quality_changes\\nquality_type = draft\\n\\n[values]\\n
;SETTING_3 \\n", "[general]\\nversion = 4\\nname = 0.4 right only\\ndefinition =
;SETTING_3  fdmprinter\\n\\n[metadata]\\nposition = 6\\nsetting_version = 5\\nty
;SETTING_3 pe = quality_changes\\nquality_type = draft\\n\\n[values]\\n\\n", "[g
;SETTING_3 eneral]\\nversion = 4\\nname = 0.4 right only\\ndefinition = fdmprint
;SETTING_3 er\\n\\n[metadata]\\nposition = 7\\nsetting_version = 5\\ntype = qual
;SETTING_3 ity_changes\\nquality_type = draft\\n\\n[values]\\n\\n"]}

3mf attached d20.zip

rburema commented 5 years ago

Hi @notnyt, I've sliced the model with 3.6 and master as well, and can confirm the behaviour there as well. Seems to affect layers towards the top rather than those on the bottom. cheers, Remco.

rburema commented 5 years ago

Devs: CURA-5971

rburema commented 5 years ago

@notnyt We've finally got around this this ticket: It seems that the profile you made ('0.4 right only') has gradual infill steps forced to 1. Gradual infill isn't supported with cubic sudivision, so it should be 0 in that case. If I override this setting with the per-model settings, the 'bug' dissapears.

P.S. Out of curiosity, why have a different profile for right only when you could also either disable the first extruder and/or print the model with the 2nd extruder in the per model settings (or by right-clicking and select the extruder in the context-menu). Is it just because it then becomes one click for the profile? I ask because there might be use-cases that we're not aware of.

notnyt commented 5 years ago

@rburema Cura was behaving poorly when I had multiple extruders setup and wans't using one of them. Putting it in standby or something. I don't remember in detail why, I just had to do that to work around some bugs.

If Cubic Subdivision doesn't support gradual infill, it should ignore the setting, no?

rburema commented 5 years ago

@notnyt Thanks for the answer (though of course we can't fix any bugs if you don't remember what they are :-) ).

Gradual Infill is off when gradual_infill_steps set to 0, which is the value that'll be picked up when that setting is disabled in the interface. Unless it's overwritten by a profile of course. I guess you could make the value =0 if infill_pattern=='cubicsubdiv' else 1 instead of 0, which is sort of how we would handle things internally (see fdmprinter.def.json for examples) if for some reason the default_value needed to be 1 instead of basically 'off' anyway.

notnyt commented 5 years ago

@rburema I hadn't touched any profile specific settings, so not sure why that was set.

Anyway, part of the issue if I recall correctly, was that it would always heat the unused extruder. The only way around this was to not have it configured.