diff options
author | enricoturri1966 <enricoturri@seznam.cz> | 2021-02-17 13:23:17 +0300 |
---|---|---|
committer | enricoturri1966 <enricoturri@seznam.cz> | 2021-02-17 13:23:17 +0300 |
commit | 50c6fc17196a0650ec89f6002b3497f8eeac5c4f (patch) | |
tree | 0658d6b1318bdb970984164d86f285a36f821caf /src/slic3r/GUI | |
parent | 23b6a597a8c06baab0e90ae2d8d287cab2dbaa3e (diff) |
Tech ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE set as default
Diffstat (limited to 'src/slic3r/GUI')
-rw-r--r-- | src/slic3r/GUI/GCodeViewer.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index efa290f3a..f46217816 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -127,11 +127,9 @@ void GCodeViewer::IBuffer::reset() bool GCodeViewer::Path::matches(const GCodeProcessor::MoveVertex& move) const { -#if ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE auto matches_percent = [](float value1, float value2, float max_percent) { return std::abs(value2 - value1) / value1 <= max_percent; }; -#endif // ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE switch (move.type) { @@ -144,29 +142,15 @@ bool GCodeViewer::Path::matches(const GCodeProcessor::MoveVertex& move) const case EMoveType::Extrude: { // use rounding to reduce the number of generated paths #if ENABLE_SPLITTED_VERTEX_BUFFER -#if ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE return type == move.type && extruder_id == move.extruder_id && cp_color_id == move.cp_color_id && role == move.extrusion_role && move.position[2] <= sub_paths.front().first.position[2] && feedrate == move.feedrate && fan_speed == move.fan_speed && height == round_to_nearest(move.height, 2) && width == round_to_nearest(move.width, 2) && matches_percent(volumetric_rate, move.volumetric_rate(), 0.05f); #else - return type == move.type && move.position[2] <= sub_paths.front().position[2] && role == move.extrusion_role && height == round_to_nearest(move.height, 2) && - width == round_to_nearest(move.width, 2) && feedrate == move.feedrate && fan_speed == move.fan_speed && - volumetric_rate == round_to_nearest(move.volumetric_rate(), 2) && extruder_id == move.extruder_id && - cp_color_id == move.cp_color_id; -#endif // ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE -#else -#if ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE return type == move.type && extruder_id == move.extruder_id && cp_color_id == move.cp_color_id && role == move.extrusion_role && move.position[2] <= first.position[2] && feedrate == move.feedrate && fan_speed == move.fan_speed && height == round_to_nearest(move.height, 2) && width == round_to_nearest(move.width, 2) && matches_percent(volumetric_rate, move.volumetric_rate(), 0.05f); -#else - return type == move.type && move.position[2] <= first.position[2] && role == move.extrusion_role && height == round_to_nearest(move.height, 2) && - width == round_to_nearest(move.width, 2) && feedrate == move.feedrate && fan_speed == move.fan_speed && - volumetric_rate == round_to_nearest(move.volumetric_rate(), 2) && extruder_id == move.extruder_id && - cp_color_id == move.cp_color_id; -#endif // ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE #endif // ENABLE_SPLITTED_VERTEX_BUFFER } case EMoveType::Travel: { @@ -195,25 +179,13 @@ void GCodeViewer::TBuffer::add_path(const GCodeProcessor::MoveVertex& move, unsi Path::Endpoint endpoint = { b_id, i_id, s_id, move.position }; // use rounding to reduce the number of generated paths #if ENABLE_SPLITTED_VERTEX_BUFFER -#if ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE paths.push_back({ move.type, move.extrusion_role, move.delta_extruder, round_to_nearest(move.height, 2), round_to_nearest(move.width, 2), move.feedrate, move.fan_speed, move.volumetric_rate(), move.extruder_id, move.cp_color_id, { { endpoint, endpoint } } }); #else - paths.push_back({ move.type, move.extrusion_role, move.delta_extruder, - round_to_nearest(move.height, 2), round_to_nearest(move.width, 2), move.feedrate, move.fan_speed, - round_to_nearest(move.volumetric_rate(), 2), move.extruder_id, move.cp_color_id, { { endpoint, endpoint } } }); -#endif // ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE -#else -#if ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE paths.push_back({ move.type, move.extrusion_role, endpoint, endpoint, move.delta_extruder, round_to_nearest(move.height, 2), round_to_nearest(move.width, 2), move.feedrate, move.fan_speed, move.volumetric_rate(), move.extruder_id, move.cp_color_id }); -#else - paths.push_back({ move.type, move.extrusion_role, endpoint, endpoint, move.delta_extruder, - round_to_nearest(move.height, 2), round_to_nearest(move.width, 2), move.feedrate, move.fan_speed, - round_to_nearest(move.volumetric_rate(), 2), move.extruder_id, move.cp_color_id }); -#endif // ENABLE_TOOLPATHS_WIDTH_HEIGHT_FROM_GCODE #endif // ENABLE_SPLITTED_VERTEX_BUFFER } |