Skip to content

Commit eb25b44

Browse files
authored
Apply coasting only on walls (#2174)
2 parents 68a3b17 + ecb2ae0 commit eb25b44

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/LayerPlan.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ std::tuple<size_t, Point2LL> LayerPlan::addSplitWall(
13081308
std::vector<LayerPlan::PathCoasting>
13091309
LayerPlan::calculatePathsCoasting(const Settings& extruder_settings, const std::vector<GCodePath>& paths, const Point3LL& current_position) const
13101310
{
1311-
std::vector<LayerPlan::PathCoasting> path_coastings;
1311+
std::vector<PathCoasting> path_coastings;
13121312
path_coastings.resize(paths.size());
13131313

13141314
if (extruder_settings.get<bool>("coasting_enable"))
@@ -1327,6 +1327,17 @@ std::vector<LayerPlan::PathCoasting>
13271327
return (! std::get<1>(path_a).isTravelPath()) || std::get<1>(path_b).isTravelPath();
13281328
}))
13291329
{
1330+
if (reversed_chunk.empty())
1331+
{
1332+
continue;
1333+
}
1334+
1335+
const PrintFeatureType type = reversed_chunk.front().second.config.getPrintFeatureType();
1336+
if (type != PrintFeatureType::OuterWall && type != PrintFeatureType::InnerWall)
1337+
{
1338+
continue;
1339+
}
1340+
13301341
double accumulated_volume = 0.0;
13311342
bool chunk_coasting_point_reached = false;
13321343
bool chunk_min_volume_reached = false;

0 commit comments

Comments
 (0)