ENH: increase grid infill's strength

Previously grid infill may be cut, so the strength on one direction is too weak. Now we switch the order at neighboring layers, so the strength of both directions are good enough.

Change-Id: I0ba768eeee34ce430e43ea57d8f06c209d469d39
This commit is contained in:
Jianjia 2023-04-13 10:27:40 +08:00 committed by Lane.Wei
parent c7278dffeb
commit e1cfd11100
7 changed files with 105 additions and 18 deletions

View file

@ -4436,9 +4436,9 @@ void GCode::ObjectByExtruder::Island::Region::append(const Type type, const Extr
// First we append the entities, there are eec->entities.size() of them:
size_t old_size = perimeters_or_infills->size();
size_t new_size = old_size + (eec->can_reverse() ? eec->entities.size() : 1);
size_t new_size = old_size + (eec->can_sort() ? eec->entities.size() : 1);
perimeters_or_infills->reserve(new_size);
if (eec->can_reverse()) {
if (eec->can_sort()) {
for (auto* ee : eec->entities)
perimeters_or_infills->emplace_back(ee);
} else