FIX: tree support crashes when there is no overhang

Default infill pattern is lightning now, which has
a crash bug when no overhang is provided.

Change-Id: I1e70b8458d1eef670a78d698c68b21d7f48bc3eb
(cherry picked from commit 777af3aa1dbb9869209945f3a6dbcc07cba0b84a)
This commit is contained in:
Arthur 2022-11-30 12:15:40 +08:00 committed by Lane.Wei
parent ec66e7750f
commit 65766ba30a
3 changed files with 9 additions and 5 deletions

View file

@ -213,6 +213,8 @@ void Generator::generateTrees(const PrintObject &print_object)
void Generator::generateTreesforSupport(std::vector<Polygons>& contours)
{
if (contours.empty()) return;
m_lightning_layers.resize(contours.size());
bboxs.resize(contours.size());