mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 10:51:22 +00:00
tests: adapt belt brim coverage to upstream validation
This commit is contained in:
@@ -446,7 +446,10 @@ int role_passes(const std::string &gcode, const std::string &role)
|
||||
bool in_role = false;
|
||||
GCodeReader reader;
|
||||
reader.parse_buffer(gcode, [&](GCodeReader &self, const GCodeReader::GCodeLine &line) {
|
||||
if (! line.extruding(self)) return;
|
||||
// E-only unretraction moves have positive E but do not lay down material. Ignoring
|
||||
// them keeps a role pass contiguous across travel/retraction bookkeeping.
|
||||
if (! line.extruding(self) || (line.dist_XY(self) <= EPSILON && std::abs(line.dist_Z(self)) <= EPSILON))
|
||||
return;
|
||||
const bool is_role = line.comment().find(role) != std::string_view::npos;
|
||||
if (is_role && ! in_role) ++passes;
|
||||
in_role = is_role;
|
||||
|
||||
Reference in New Issue
Block a user