Skip to content

Commit

Permalink
Remove none option
Browse files Browse the repository at this point in the history
  • Loading branch information
casperlamboo committed Feb 23, 2024
1 parent 30ebfa4 commit 01a46f3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 18 deletions.
5 changes: 0 additions & 5 deletions include/settings/EnumSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,6 @@ enum class InsetDirection
*/
enum class PrimeTowerMethod
{
/*!
* No prime tower is generated.
*/
NONE,

/*!
* Prime tower that minimizes time and used filament as much as possible.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/FffGcodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1602,8 +1602,6 @@ std::vector<ExtruderUse>

switch (method)
{
case PrimeTowerMethod::NONE:
break;

case PrimeTowerMethod::NORMAL:
if (extruder_is_used_on_this_layer[extruder_nr] && extruder_nr != last_extruder)
Expand Down
4 changes: 2 additions & 2 deletions src/FffPolygonGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ void FffPolygonGenerator::processOozeShield(SliceDataStorage& storage)
{
storage.oozeShield[layer_nr].removeSmallAreas(largest_printed_area);
}
if (mesh_group_settings.get<PrimeTowerMethod>("prime_tower_mode") != PrimeTowerMethod::NONE)
if (mesh_group_settings.get<bool>("prime_tower_enable"))
{
coord_t max_line_width = 0;
{ // compute max_line_width
Expand Down Expand Up @@ -1024,7 +1024,7 @@ void FffPolygonGenerator::processDraftShield(SliceDataStorage& storage)
maximum_deviation = std::min(maximum_deviation, extruder.settings_.get<coord_t>("meshfix_maximum_deviation"));
}
storage.draft_protection_shield = Simplify(maximum_resolution, maximum_deviation, 0).polygon(storage.draft_protection_shield);
if (mesh_group_settings.get<PrimeTowerMethod>("prime_tower_mode") != PrimeTowerMethod::NONE)
if (mesh_group_settings.get<bool>("prime_tower_enable"))
{
coord_t max_line_width = 0;
{ // compute max_line_width
Expand Down
2 changes: 1 addition & 1 deletion src/PrimeTower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PrimeTower::PrimeTower()
&& ((adhesion_type != EPlatformAdhesion::SKIRT) && (adhesion_type != EPlatformAdhesion::BRIM)));
}

enabled_ = method != PrimeTowerMethod::NONE && scene.current_mesh_group->settings.get<coord_t>("prime_tower_min_volume") > 10
enabled_ = scene.current_mesh_group->settings.get<bool>("prime_tower_enable") && scene.current_mesh_group->settings.get<coord_t>("prime_tower_min_volume") > 10
&& scene.current_mesh_group->settings.get<coord_t>("prime_tower_size") > 10;

would_have_actual_tower_ = enabled_; // Assume so for now.
Expand Down
10 changes: 2 additions & 8 deletions src/settings/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,14 +686,8 @@ PrimeTowerMethod Settings::get<PrimeTowerMethod>(const std::string& key) const
{
return PrimeTowerMethod::INTERLEAVED;
}
else if (value == "normal")
{
return PrimeTowerMethod::NORMAL;
}
else // Default.
{
return PrimeTowerMethod::NONE;
}

return PrimeTowerMethod::NORMAL;
}

template<>
Expand Down

0 comments on commit 01a46f3

Please sign in to comment.