Improve debugging output

This commit is contained in:
Noisyfox 2024-09-05 09:45:59 +08:00
parent c179a57725
commit 63ebebf4a0
3 changed files with 18 additions and 15 deletions

View file

@ -447,17 +447,6 @@ void PrintObject::prepare_infill()
#endif /* SLIC3R_DEBUG_SLICE_PROCESSING */
// Debugging output.
#ifdef SLIC3R_DEBUG_SLICE_PROCESSING
for (size_t region_id = 0; region_id < this->num_printing_regions(); ++ region_id) {
for (const Layer *layer : m_layers) {
LayerRegion *layerm = layer->m_regions[region_id];
layerm->export_region_slices_to_svg_debug("3_process_external_surfaces-final");
layerm->export_region_fill_surfaces_to_svg_debug("3_process_external_surfaces-final");
} // for each layer
} // for each region
#endif /* SLIC3R_DEBUG_SLICE_PROCESSING */
// Detect, which fill surfaces are near external layers.
// They will be split in internal and internal-solid surfaces.
// The purpose is to add a configurable number of solid layers to support the TOP surfaces
@ -469,6 +458,16 @@ void PrintObject::prepare_infill()
this->discover_horizontal_shells();
m_print->throw_if_canceled();
#ifdef SLIC3R_DEBUG_SLICE_PROCESSING
for (size_t region_id = 0; region_id < this->num_printing_regions(); ++ region_id) {
for (const Layer *layer : m_layers) {
LayerRegion *layerm = layer->m_regions[region_id];
layerm->export_region_slices_to_svg_debug("5_discover_horizontal_shells-final");
layerm->export_region_fill_surfaces_to_svg_debug("5_discover_horizontal_shells-final");
} // for each layer
} // for each region
#endif /* SLIC3R_DEBUG_SLICE_PROCESSING */
// this will detect bridges and reverse bridges
// and rearrange top/bottom/internal surfaces
// It produces enlarged overlapping bridging areas.
@ -481,12 +480,13 @@ void PrintObject::prepare_infill()
this->process_external_surfaces();
m_print->throw_if_canceled();
// Debugging output.
#ifdef SLIC3R_DEBUG_SLICE_PROCESSING
for (size_t region_id = 0; region_id < this->num_printing_regions(); ++ region_id) {
for (const Layer *layer : m_layers) {
LayerRegion *layerm = layer->m_regions[region_id];
layerm->export_region_slices_to_svg_debug("7_discover_horizontal_shells-final");
layerm->export_region_fill_surfaces_to_svg_debug("7_discover_horizontal_shells-final");
layerm->export_region_slices_to_svg_debug("7_process_external_surfaces-final");
layerm->export_region_fill_surfaces_to_svg_debug("7_process_external_surfaces-final");
} // for each layer
} // for each region
#endif /* SLIC3R_DEBUG_SLICE_PROCESSING */