ENH: remove tbb simplify in gcode export
Useless after importing AABB tree. Signed-off-by: salt.wei <salt.wei@bambulab.com> Change-Id: Iaec9bef4a2a6bc4d097c6fd75720cb69d9cf314f
This commit is contained in:
parent
db86541df7
commit
1278cbf461
|
@ -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<size_t>(0, object->layers().size()),
|
||||
[object](const tbb::blocked_range<size_t>& 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();
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue