Revert "Fix of #9399 Thick layers + thick raft + lightning infill = crash"

This reverts commit 402affb035.
This commit is contained in:
Lukas Matena 2023-06-08 12:46:09 +02:00
parent 169024fefa
commit f044a111f1
3 changed files with 3 additions and 7 deletions

View File

@ -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());

View File

@ -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) {

View File

@ -22,7 +22,6 @@ public:
~Filler() override = default;
Generator *generator { nullptr };
size_t num_raft_layers { 0 };
protected:
Fill* clone() const override { return new Filler(*this); }