This commit is contained in:
enricoturri1966 2021-09-22 11:38:15 +02:00
commit ef800a8547
2 changed files with 16 additions and 25 deletions
src

View file

@ -721,9 +721,9 @@ public:
#ifdef SUPPORT_USE_AGG_RASTERIZER #ifdef SUPPORT_USE_AGG_RASTERIZER
m_bbox = bbox; m_bbox = bbox;
// Oversample the grid to avoid leaking of supports through or around the object walls. // Oversample the grid to avoid leaking of supports through or around the object walls.
int oversampling = std::min(8, int(scale_(m_support_spacing) / (scale_(params.extrusion_width) + 100))); int extrusion_width_scaled = scale_(params.extrusion_width);
m_pixel_size = scale_(m_support_spacing / oversampling); int oversampling = std::clamp(int(scale_(m_support_spacing) / (extrusion_width_scaled + 100)), 1, 8);
assert(scale_(params.extrusion_width) + 20 < m_pixel_size); m_pixel_size = std::max<double>(extrusion_width_scaled + 21, scale_(m_support_spacing / oversampling));
// Add one empty column / row boundaries. // Add one empty column / row boundaries.
m_bbox.offset(m_pixel_size); m_bbox.offset(m_pixel_size);
// Grid size fitting the support polygons plus one pixel boundary around the polygons. // Grid size fitting the support polygons plus one pixel boundary around the polygons.
@ -2600,8 +2600,6 @@ void PrintObjectSupportMaterial::generate_base_layers(
// No top contacts -> no intermediate layers will be produced. // No top contacts -> no intermediate layers will be produced.
return; return;
// coordf_t fillet_radius_scaled = scale_(m_object_config->support_material_spacing);
BOOST_LOG_TRIVIAL(debug) << "PrintObjectSupportMaterial::generate_base_layers() in parallel - start"; BOOST_LOG_TRIVIAL(debug) << "PrintObjectSupportMaterial::generate_base_layers() in parallel - start";
tbb::parallel_for( tbb::parallel_for(
tbb::blocked_range<size_t>(0, intermediate_layers.size()), tbb::blocked_range<size_t>(0, intermediate_layers.size()),
@ -2696,6 +2694,7 @@ void PrintObjectSupportMaterial::generate_base_layers(
layer_intermediate.layer_type = sltBase; layer_intermediate.layer_type = sltBase;
#if 0 #if 0
// coordf_t fillet_radius_scaled = scale_(m_object_config->support_material_spacing);
// Fillet the base polygons and trim them again with the top, interface and contact layers. // Fillet the base polygons and trim them again with the top, interface and contact layers.
$base->{$i} = diff( $base->{$i} = diff(
offset2( offset2(
@ -3784,7 +3783,7 @@ void PrintObjectSupportMaterial::generate_toolpaths(
// Prepare fillers. // Prepare fillers.
SupportMaterialPattern support_pattern = m_object_config->support_material_pattern; SupportMaterialPattern support_pattern = m_object_config->support_material_pattern;
bool with_sheath = m_object_config->support_material_with_sheath; bool with_sheath = m_object_config->support_material_with_sheath;
InfillPattern infill_pattern = (support_pattern == smpHoneycomb ? ipHoneycomb : ipSupportBase); InfillPattern infill_pattern = support_pattern == smpHoneycomb ? ipHoneycomb : (support_density < 1.05 ? ipRectilinear : ipSupportBase);
std::vector<float> angles; std::vector<float> angles;
angles.push_back(base_angle); angles.push_back(base_angle);

View file

@ -3924,20 +3924,16 @@ void Plater::priv::on_slicing_update(SlicingStatusEvent &evt)
void Plater::priv::on_slicing_completed(wxCommandEvent & evt) void Plater::priv::on_slicing_completed(wxCommandEvent & evt)
{ {
switch (this->printer_technology) { if (view3D->is_dragging()) // updating scene now would interfere with the gizmo dragging
case ptFFF: delayed_scene_refresh = true;
this->update_fff_scene(); else {
break; if (this->printer_technology == ptFFF)
case ptSLA: this->update_fff_scene();
if (view3D->is_dragging())
delayed_scene_refresh = true;
else else
this->update_sla_scene(); this->update_sla_scene();
break;
default: break;
} }
} }
void Plater::priv::on_export_began(wxCommandEvent& evt) void Plater::priv::on_export_began(wxCommandEvent& evt)
{ {
if (show_warning_dialog) if (show_warning_dialog)
@ -4056,17 +4052,13 @@ void Plater::priv::on_process_completed(SlicingProcessCompletedEvent &evt)
this->object_list_changed(); this->object_list_changed();
// refresh preview // refresh preview
switch (this->printer_technology) { if (view3D->is_dragging()) // updating scene now would interfere with the gizmo dragging
case ptFFF: delayed_scene_refresh = true;
this->update_fff_scene(); else {
break; if (this->printer_technology == ptFFF)
case ptSLA: this->update_fff_scene();
if (view3D->is_dragging())
delayed_scene_refresh = true;
else else
this->update_sla_scene(); this->update_sla_scene();
break;
default: break;
} }
if (evt.cancelled()) { if (evt.cancelled()) {