From feff13b21a8713d07ba99b3ab8a06c71d0b65482 Mon Sep 17 00:00:00 2001 From: larsbrubaker Date: Fri, 21 Mar 2014 09:52:24 -0700 Subject: [PATCH] Put in infillAngle for MatterSlice Other name refactoring in MatterSlice --- .../SlicerMapping/EngineMappingMatterSlice.cs | 7 ++++--- .../SlicerMapping/MappingClasses.cs | 21 +++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/SlicerConfiguration/SlicerMapping/EngineMappingMatterSlice.cs b/SlicerConfiguration/SlicerMapping/EngineMappingMatterSlice.cs index d4e974612..fde333d87 100644 --- a/SlicerConfiguration/SlicerMapping/EngineMappingMatterSlice.cs +++ b/SlicerConfiguration/SlicerMapping/EngineMappingMatterSlice.cs @@ -98,14 +98,14 @@ namespace MatterHackers.MatterControl.SlicerConfiguration new MapItem("upSkinCount", "top_solid_layers"), new FanTranslator("fanFullOnLayerNr", "disable_fan_first_layers"), - new MapItem("coolHeadLift", "cool_extruder_lift"), + new MapItemToBool("coolHeadLift", "cool_extruder_lift"), new ScaledSingleNumber("retractionAmount", "retract_length", 1000), new MapItem("retractionSpeed", "retract_speed"), new ScaledSingleNumber("retractionMinimalDistance", "retract_before_travel", 1000), new ScaledSingleNumber("minimalExtrusionBeforeRetraction", "min_extrusion_before_retract", 1000), - new MapItem("spiralizeMode", "spiral_vase"), + new MapItemToBool("spiralizeMode", "spiral_vase"), new NotPassedItem("", "bed_size"), @@ -116,7 +116,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration // needs testing, not working new ScaledSingleNumber("supportLineDistance", "support_material_spacing", 1000), - new SupportMatterial("supportAngle", "support_material"), + new SupportMatterial("supportAngleDegrees", "support_material"), new NotPassedItem("", "support_material_threshold"), new MapItem("supportEverywhere", "support_material_create_internal_support"), new ScaledSingleNumber("supportXYDistance", "support_material_xy_distance", 1000), @@ -125,6 +125,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration new MapItem("minimalLayerTime", "slowdown_below_layer_time"), new InfillTranslator("sparseInfillLineDistance", "fill_density"), + new MapItem("infillAngleDegrees", "fill_angle"), new MapStartGCode("startCode", "start_gcode"), new MapEndGCode("endCode", "end_gcode"), diff --git a/SlicerConfiguration/SlicerMapping/MappingClasses.cs b/SlicerConfiguration/SlicerMapping/MappingClasses.cs index 2e789ac81..48e6d87df 100644 --- a/SlicerConfiguration/SlicerMapping/MappingClasses.cs +++ b/SlicerConfiguration/SlicerMapping/MappingClasses.cs @@ -41,6 +41,27 @@ namespace MatterHackers.MatterControl.SlicerConfiguration } } + public class MapItemToBool : MapItem + { + public override string TranslatedValue + { + get + { + if (base.TranslatedValue == "1") + { + return "True"; + } + + return "False"; + } + } + + public MapItemToBool(string cura, string slicer) + : base(cura, slicer) + { + } + } + public class ScaledSingleNumber : MapItem { internal double scale;