Merge branch 'lm_lighting_crash'
This commit is contained in:
commit
ea72770680
@ -468,11 +468,8 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive:
|
|||||||
f->print_config = &this->object()->print()->config();
|
f->print_config = &this->object()->print()->config();
|
||||||
f->print_object_config = &this->object()->config();
|
f->print_object_config = &this->object()->config();
|
||||||
|
|
||||||
if (surface_fill.params.pattern == ipLightning) {
|
if (surface_fill.params.pattern == ipLightning)
|
||||||
auto *lf = dynamic_cast<FillLightning::Filler*>(f.get());
|
dynamic_cast<FillLightning::Filler*>(f.get())->generator = lightning_generator;
|
||||||
lf->generator = lightning_generator;
|
|
||||||
lf->num_raft_layers = this->object()->slicing_parameters().raft_layers();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (surface_fill.params.pattern == ipEnsuring) {
|
if (surface_fill.params.pattern == ipEnsuring) {
|
||||||
auto *fill_ensuring = dynamic_cast<FillEnsuring *>(f.get());
|
auto *fill_ensuring = dynamic_cast<FillEnsuring *>(f.get());
|
||||||
@ -649,18 +646,15 @@ Polylines Layer::generate_sparse_infill_polylines_for_anchoring(FillAdaptive::Oc
|
|||||||
// Create the filler object.
|
// Create the filler object.
|
||||||
std::unique_ptr<Fill> f = std::unique_ptr<Fill>(Fill::new_from_type(surface_fill.params.pattern));
|
std::unique_ptr<Fill> f = std::unique_ptr<Fill>(Fill::new_from_type(surface_fill.params.pattern));
|
||||||
f->set_bounding_box(bbox);
|
f->set_bounding_box(bbox);
|
||||||
f->layer_id = this->id();
|
f->layer_id = this->id() - this->object()->get_layer(0)->id(); // We need to subtract raft layers.
|
||||||
f->z = this->print_z;
|
f->z = this->print_z;
|
||||||
f->angle = surface_fill.params.angle;
|
f->angle = surface_fill.params.angle;
|
||||||
f->adapt_fill_octree = (surface_fill.params.pattern == ipSupportCubic) ? support_fill_octree : adaptive_fill_octree;
|
f->adapt_fill_octree = (surface_fill.params.pattern == ipSupportCubic) ? support_fill_octree : adaptive_fill_octree;
|
||||||
f->print_config = &this->object()->print()->config();
|
f->print_config = &this->object()->print()->config();
|
||||||
f->print_object_config = &this->object()->config();
|
f->print_object_config = &this->object()->config();
|
||||||
|
|
||||||
if (surface_fill.params.pattern == ipLightning) {
|
if (surface_fill.params.pattern == ipLightning)
|
||||||
auto *lf = dynamic_cast<FillLightning::Filler *>(f.get());
|
dynamic_cast<FillLightning::Filler *>(f.get())->generator = lightning_generator;
|
||||||
lf->generator = lightning_generator;
|
|
||||||
lf->num_raft_layers = this->object()->slicing_parameters().raft_layers();
|
|
||||||
}
|
|
||||||
|
|
||||||
// calculate flow spacing for infill pattern generation
|
// calculate flow spacing for infill pattern generation
|
||||||
double link_max_length = 0.;
|
double link_max_length = 0.;
|
||||||
|
@ -13,7 +13,7 @@ void Filler::_fill_surface_single(
|
|||||||
ExPolygon expolygon,
|
ExPolygon expolygon,
|
||||||
Polylines &polylines_out)
|
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));
|
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) {
|
if (params.dont_connect() || fill_lines.size() <= 1) {
|
||||||
|
@ -22,7 +22,6 @@ public:
|
|||||||
~Filler() override = default;
|
~Filler() override = default;
|
||||||
|
|
||||||
Generator *generator { nullptr };
|
Generator *generator { nullptr };
|
||||||
size_t num_raft_layers { 0 };
|
|
||||||
protected:
|
protected:
|
||||||
Fill* clone() const override { return new Filler(*this); }
|
Fill* clone() const override { return new Filler(*this); }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user