diff --git a/src/libslic3r/Format/svg.cpp b/src/libslic3r/Format/svg.cpp index edca80e77..4a96274b9 100644 --- a/src/libslic3r/Format/svg.cpp +++ b/src/libslic3r/Format/svg.cpp @@ -190,6 +190,10 @@ bool get_svg_profile(const char *path, std::vector &element_infos, profile_line_points.push_back({pt1, pt2}); } } + + if (profile_line_points.empty()) + continue; + // keep the start and end points of profile connected if (shape->fill.gradient != nullptr) profile_line_points.back().second = profile_line_points[0].first; @@ -269,6 +273,9 @@ bool get_svg_profile(const char *path, std::vector &element_infos, wires.emplace_back(wire); } + if (wires.empty()) + continue; + gp_Vec dir(0, 0, 10); BRepBuilderAPI_MakeFace face_make(wires[index]); for (int i = 0; i < wires.size(); ++i) {