Skip to content

Commit

Permalink
Revert "Fix of #9399 Thick layers + thick raft + lightning infill = c…
Browse files Browse the repository at this point in the history
…rash"

This reverts commit 402affb.
  • Loading branch information
lukasmatena committed Jun 9, 2023
1 parent 169024f commit f044a11
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
7 changes: 2 additions & 5 deletions src/libslic3r/Fill/Fill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,11 +468,8 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
f->print_config = &this->object()->print()->config();
f->print_object_config = &this->object()->config();

if (surface_fill.params.pattern == ipLightning) {
auto *lf = dynamic_cast<FillLightning::Filler*>(f.get());
lf->generator = lightning_generator;
lf->num_raft_layers = this->object()->slicing_parameters().raft_layers();
}
if (surface_fill.params.pattern == ipLightning)
dynamic_cast<FillLightning::Filler*>(f.get())->generator = lightning_generator;

if (surface_fill.params.pattern == ipEnsuring) {
auto *fill_ensuring = dynamic_cast<FillEnsuring *>(f.get());
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/Fill/FillLightning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void Filler::_fill_surface_single(
ExPolygon expolygon,
Polylines &polylines_out)
{
const Layer &layer = generator->getTreesForLayer(this->layer_id - this->num_raft_layers);
const Layer &layer = generator->getTreesForLayer(this->layer_id);
Polylines fill_lines = layer.convertToLines(to_polygons(expolygon), scaled<coord_t>(0.5 * this->spacing - this->overlap));

if (params.dont_connect() || fill_lines.size() <= 1) {
Expand Down
1 change: 0 additions & 1 deletion src/libslic3r/Fill/FillLightning.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class Filler : public Slic3r::Fill
~Filler() override = default;

Generator *generator { nullptr };
size_t num_raft_layers { 0 };
protected:
Fill* clone() const override { return new Filler(*this); }

Expand Down

0 comments on commit f044a11

Please sign in to comment.