Put in a enable retract setting
Made slice settings disable work
This commit is contained in:
parent
e98e0d00b8
commit
d3e7d00b3e
9 changed files with 92 additions and 20 deletions
|
|
@ -78,6 +78,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
SettingsKey.recover_position_before_z_home,
|
||||
SettingsKey.resume_gcode,
|
||||
SettingsKey.temperature,
|
||||
SettingsKey.enable_retractions,
|
||||
"z_homes_to_max",
|
||||
|
||||
// TODO: merge the items below into the list above after some validation - setting that weren't previously mapped to Cura but probably should be.
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
new GCodeForSlicer(SettingsKey.end_gcode, "endCode"),
|
||||
new GCodeForSlicer("toolchange_gcode", "toolChangeCode"),
|
||||
new MapFirstValue("retract_before_travel", "minimumTravelToCauseRetraction"),
|
||||
new MapFirstValue("retract_length", "retractionOnTravel"),
|
||||
new RetractionLength("retract_length", "retractionOnTravel"),
|
||||
new MapFirstValue("retract_lift", "retractionZHop"),
|
||||
new MapFirstValue("retract_restart_extra", "unretractExtraExtrusion"),
|
||||
new MapFirstValue("retract_restart_extra_time_to_apply", "retractRestartExtraTimeToApply"),
|
||||
|
|
|
|||
|
|
@ -497,6 +497,29 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
}
|
||||
}
|
||||
|
||||
public class RetractionLength : MappedSetting
|
||||
{
|
||||
public RetractionLength(string canonicalSettingsName, string exportedName)
|
||||
: base(canonicalSettingsName, exportedName)
|
||||
{
|
||||
}
|
||||
|
||||
public override string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
if(ActiveSliceSettings.Instance.GetValue<bool>(SettingsKey.enable_retractions))
|
||||
{
|
||||
return base.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class AsPercentOfReferenceOrDirect : MappedSetting
|
||||
{
|
||||
string originalReference;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue