diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 279eeae57..96058aa5a 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -1461,22 +1461,6 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato m_enable_cooling_markers = true; this->apply_print_config(print.config()); - //BBS: generate simplified_slices if necessary - if (m_config.reduce_infill_retraction) { - for (auto object : print.objects()) { - tbb::parallel_for( - tbb::blocked_range(0, object->layers().size()), - [object](const tbb::blocked_range& range) { - for (size_t layer_idx = range.begin(); layer_idx < range.end(); ++ layer_idx) { - Layer* layer = object->layers()[layer_idx]; - if (layer) - layer->simplify_reagon_final_slices(); - } - } - ); - } - } - //m_volumetric_speed = DoExport::autospeed_volumetric_limit(print); print.throw_if_canceled(); diff --git a/src/libslic3r/GCode/RetractWhenCrossingPerimeters.cpp b/src/libslic3r/GCode/RetractWhenCrossingPerimeters.cpp index 3d3b54d45..776091adf 100644 --- a/src/libslic3r/GCode/RetractWhenCrossingPerimeters.cpp +++ b/src/libslic3r/GCode/RetractWhenCrossingPerimeters.cpp @@ -15,7 +15,7 @@ bool RetractWhenCrossingPerimeters::travel_inside_internal_regions(const Layer & m_aabbtree_internal_islands.clear(); // Collect expolygons of internal slices. for (const LayerRegion *layerm : layer.regions()) - for (const Surface &surface : layerm->get_slices_simplified().surfaces) + for (const Surface &surface : layerm->get_slices().surfaces) if (surface.is_internal()) m_internal_islands.emplace_back(&surface.expolygon); // Calculate bounding boxes of internal slices. diff --git a/src/libslic3r/Layer.hpp b/src/libslic3r/Layer.hpp index 0db7fc58c..74a7d6291 100644 --- a/src/libslic3r/Layer.hpp +++ b/src/libslic3r/Layer.hpp @@ -31,13 +31,10 @@ public: const PrintRegion& region() const { return *m_region; } const SurfaceCollection& get_slices() const { return slices; } - const SurfaceCollection& get_slices_simplified() const { return slices_simplified; } // collection of surfaces generated by slicing the original geometry // divided by type top/bottom/internal SurfaceCollection slices; - //BBS: simplifed final slices data to accelerate - SurfaceCollection slices_simplified; // Backed up slices before they are split into top/bottom/internal. // Only backed up for multi-region layers or layers with elephant foot compensation. //FIXME Review whether not to simplify the code by keeping the raw_slices all the time. @@ -78,8 +75,6 @@ public: void slices_to_fill_surfaces_clipped(); void prepare_fill_surfaces(); //BBS - inline void simplify_final_slices() { this->slices_simplified.set(this->slices); this->slices_simplified.simplify(scaled(SIMPLIFY_SLICES_RESOLUTION));} - //BBS void make_perimeters(const SurfaceCollection &slices, SurfaceCollection* fill_surfaces, ExPolygons* fill_no_overlap); void process_external_surfaces(const Layer *lower_layer, const Polygons *lower_layer_covered); double infill_area_threshold() const; @@ -196,8 +191,6 @@ public: void simplify_extrusion_path() { for (auto layerm : m_regions) layerm->simplify_extrusion_entity();} //BBS: this function calculate the maximum void grid area of sparse infill of this layer. Just estimated value coordf_t get_sparse_infill_max_void_area(); - //BBS - inline void simplify_reagon_final_slices() { for (auto* region : this->m_regions) region->simplify_final_slices();} protected: friend class PrintObject; diff --git a/src/libslic3r/libslic3r.h b/src/libslic3r/libslic3r.h index f48218494..8589d705f 100644 --- a/src/libslic3r/libslic3r.h +++ b/src/libslic3r/libslic3r.h @@ -76,8 +76,6 @@ static constexpr double BRIDGE_INFILL_MARGIN = 1; //inline coord_t scale_(coordf_t v) { return coord_t(floor(v / SCALING_FACTOR + 0.5f)); } #define scale_(val) ((val) / SCALING_FACTOR) #define unscale_(val) ((val) * SCALING_FACTOR) -//BBS -static constexpr double SIMPLIFY_SLICES_RESOLUTION = 0.1; //BBS: BBS only support relative E and can't been changed by user at the moment. because //BBS need to support skip object when printing.