FIX: crash when support type and style are inconsistent

jira: STUDIO-5428
Change-Id: Ib1e79c71736810099e15282c30524e55e8f60f34
(cherry picked from commit aefb7fbaf25146c03bd2eb336f58ed2eb0e83ea6)
(cherry picked from commit 697a7bbee3)
This commit is contained in:
Arthur 2023-12-01 10:12:22 +08:00 committed by Noisyfox
parent c443951f30
commit 8c51f3e693

View file

@ -677,7 +677,9 @@ public:
m_extrusion_width(params.extrusion_width),
m_support_material_closing_radius(params.support_closing_radius)
{
if (m_style != smsSnug) m_style = smsGrid;
if (m_style == smsDefault) m_style = smsGrid;
if (std::set<SupportMaterialStyle>{smsTreeSlim, smsTreeStrong, smsTreeHybrid, smsOrganic}.count(m_style))
m_style = smsGrid;
switch (m_style) {
case smsGrid:
{
@ -769,6 +771,13 @@ public:
)
{
switch (m_style) {
case smsTreeSlim:
case smsTreeStrong:
case smsTreeHybrid:
case smsOrganic:
assert(false);
//[[fallthrough]];
return Polygons();
case smsGrid:
{
#ifdef SUPPORT_USE_AGG_RASTERIZER