@@ -427,14 +427,26 @@ PrintObjectSupportMaterial::PrintObjectSupportMaterial(const PrintObject *object
427427 support_pattern == smpHoneycomb ? ipHoneycomb :
428428 m_support_params.support_density > 0.95 || m_support_params.with_sheath ? ipRectilinear : ipSupportBase;
429429 m_support_params.interface_fill_pattern = (m_support_params.interface_density > 0.95 ? ipRectilinear : ipSupportBase);
430- m_support_params.contact_fill_pattern = m_object_config->support_material_interface_pattern ;
431- if (m_support_params.contact_fill_pattern == ipAuto)
430+ m_support_params.contact_top_fill_pattern = m_object_config->support_material_top_interface_pattern ;
431+ m_support_params.contact_bottom_fill_pattern = m_object_config->support_material_bottom_interface_pattern ;
432+ if (m_support_params.contact_top_fill_pattern == ipAuto)
432433 if (m_slicing_params->soluble_interface )
433- m_support_params.contact_fill_pattern = ipConcentric;
434+ m_support_params.contact_top_fill_pattern = ipConcentric;
434435 else if (m_support_params.interface_density > 0.95 )
435- m_support_params.contact_fill_pattern = ipRectilinear;
436+ m_support_params.contact_top_fill_pattern = ipRectilinear;
436437 else
437- m_support_params.contact_fill_pattern = ipSupportBase;
438+ m_support_params.contact_top_fill_pattern = ipSupportBase;
439+ if (m_support_params.contact_bottom_fill_pattern == ipAuto)
440+ if (m_support_params.contact_top_fill_pattern != ipHilbertCurve
441+ && m_support_params.contact_top_fill_pattern != ipSmooth
442+ && m_support_params.contact_top_fill_pattern != ipSawtooth)
443+ m_support_params.contact_bottom_fill_pattern = m_support_params.contact_top_fill_pattern ;
444+ else if (m_slicing_params->soluble_interface )
445+ m_support_params.contact_bottom_fill_pattern = ipConcentric;
446+ else if (m_support_params.interface_density > 0.95 )
447+ m_support_params.contact_bottom_fill_pattern = ipRectilinear;
448+ else
449+ m_support_params.contact_bottom_fill_pattern = ipSupportBase;
438450}
439451
440452// Using the std::deque as an allocator.
@@ -4167,16 +4179,16 @@ void PrintObjectSupportMaterial::generate_toolpaths(
41674179 SupportLayer &support_layer = *support_layers[support_layer_id];
41684180 assert (support_layer.support_fills .entities ().empty ());
41694181 MyLayer &raft_layer = *raft_layers[support_layer_id];
4170-
4171- std::unique_ptr<Fill> filler_interface = std::unique_ptr<Fill>(Fill::new_from_type (m_support_params.contact_fill_pattern )); // m_support_params.interface_fill_pattern)); FIXME choose
4172- std::unique_ptr<Fill> filler_support = std::unique_ptr<Fill>(Fill::new_from_type (m_support_params.base_fill_pattern ));
4182+
4183+ std::unique_ptr<Fill> filler_top_interface = std::unique_ptr<Fill>(Fill::new_from_type (m_support_params.contact_top_fill_pattern ));
4184+ std::unique_ptr<Fill> filler_support = std::unique_ptr<Fill>(Fill::new_from_type (m_support_params.base_fill_pattern ));
41734185 std::unique_ptr<FillWithPerimeter> filler_support_with_sheath = std::make_unique<FillWithPerimeter>((Fill::new_from_type (m_support_params.base_fill_pattern )));
41744186 filler_support_with_sheath->overlap = m_support_params.gap_xy == 0 ? 0 : 1 ; // allow periemter overlap is not touching perimeters
41754187 filler_support_with_sheath->ratio_fill_inside = 0 .2f ;
41764188 std::unique_ptr<FillWithPerimeter> filler_dense = std::make_unique<FillWithPerimeter>((Fill::new_from_type (ipRectilinear)));
41774189 filler_dense->overlap = m_support_params.gap_xy == 0 ? 0 : 1 ;
41784190 filler_dense->ratio_fill_inside = 0 .2f ;
4179- filler_interface ->set_bounding_box (bbox_object);
4191+ filler_top_interface ->set_bounding_box (bbox_object);
41804192 filler_support->set_bounding_box (bbox_object);
41814193
41824194 // Print the support base below the support columns, or the support base for the support columns plus the contacts.
@@ -4207,7 +4219,7 @@ void PrintObjectSupportMaterial::generate_toolpaths(
42074219 }
42084220 }
42094221
4210- Fill *filler = filler_interface .get ();
4222+ Fill *filler = filler_top_interface .get ();
42114223 Flow flow = m_support_params.first_layer_flow ;
42124224 float density = 0 .f ;
42134225 double spacing = 0 .f ;
@@ -4283,7 +4295,8 @@ void PrintObjectSupportMaterial::generate_toolpaths(
42834295 size_t idx_layer_intermediate = size_t (-1 );
42844296 size_t idx_layer_interface = size_t (-1 );
42854297 size_t idx_layer_base_interface = size_t (-1 );
4286- std::unique_ptr<Fill> filler_interface = std::unique_ptr<Fill>(Fill::new_from_type (m_support_params.contact_fill_pattern ));
4298+ std::unique_ptr<Fill> filler_top_interface = std::unique_ptr<Fill>(Fill::new_from_type (m_support_params.contact_top_fill_pattern ));
4299+ std::unique_ptr<Fill> filler_bottom_interface = std::unique_ptr<Fill>(Fill::new_from_type (m_support_params.contact_bottom_fill_pattern ));
42874300 std::unique_ptr<Fill> filler_intermediate_interface = std::unique_ptr<Fill>(Fill::new_from_type (ipRectilinear));
42884301 // Filler for the base interface (to be used for soluble interface / non soluble base, to produce non soluble interface layer below soluble interface layer).
42894302 std::unique_ptr<Fill> filler_base_interface = std::unique_ptr<Fill>(base_interface_layers.empty () ? nullptr :
@@ -4296,7 +4309,8 @@ void PrintObjectSupportMaterial::generate_toolpaths(
42964309 } else {
42974310 filler_support.reset (Fill::new_from_type (m_support_params.base_fill_pattern ));
42984311 }
4299- filler_interface->set_bounding_box (bbox_object);
4312+ filler_top_interface->set_bounding_box (bbox_object);
4313+ filler_bottom_interface->set_bounding_box (bbox_object);
43004314 filler_intermediate_interface->set_bounding_box (bbox_object);
43014315 if (range.begin () == 0 )
43024316 filler_first_layer_ptr->set_bounding_box (bbox_object);
@@ -4399,7 +4413,7 @@ void PrintObjectSupportMaterial::generate_toolpaths(
43994413 Flow interface_flow = layer_ex.layer ->bridging ?
44004414 Flow::bridging_flow (layer_ex.layer ->height , m_support_params.support_material_bottom_interface_flow .nozzle_diameter ()) :
44014415 (interface_as_base ? &m_support_params.support_material_flow : &m_support_params.support_material_interface_flow )->with_height (float (layer_ex.layer ->height ));
4402- Fill *filler = i == 2 ? filler_intermediate_interface .get () : filler_interface .get ();
4416+ Fill *filler = ( i == 0 ) ? filler_top_interface .get () : (i == 1 ? filler_bottom_interface .get () : filler_intermediate_interface. get () );
44034417 // filler->layer_id = support_layer_id; // don't do that, or the filler will rotate thigns from that layerid
44044418 filler->z = support_layer.print_z ;
44054419 float supp_density = m_support_params.interface_density ;
0 commit comments