Put in the ability to specify bottom and top layers in mm

Also interface layers and z gap
improved the slice settings layout
improved intermediate settings to be much more useful
Added a new mm setting and improved the optional % editing.
This commit is contained in:
Lars Brubaker 2015-04-24 13:09:25 -07:00
parent 9b5722b702
commit 9ed545ad22
10 changed files with 211 additions and 36 deletions

View file

@ -75,8 +75,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
//layer0extrusionWidth
new ScaledSingleNumber("extrusionWidth", "nozzle_diameter", 1000),
new MapItem("insetCount", "perimeters"),
new MapItem("downSkinCount", "bottom_solid_layers"),
new MapItem("upSkinCount", "top_solid_layers"),
new AsLayerCountOrDistance("downSkinCount", "bottom_solid_layers"),
new AsLayerCountOrDistance("upSkinCount", "top_solid_layers"),
new ScaledSingleNumber("skirtDistance", "skirt_distance", 1000),
new MapItem("skirtLineCount", "skirts"),
new SkirtLengthMaping("skirtMinLength", "min_skirt_length"),

View file

@ -177,13 +177,13 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
//multiVolumeOverlapPercent=0
//numberOfBottomLayers=6
new MapItem("numberOfBottomLayers", "bottom_solid_layers"),
new AsLayerCountOrDistance("numberOfBottomLayers", "bottom_solid_layers"),
//numberOfSkirtLoops=1 # The number of loops to draw around objects. Can be used to help hold them down.
new MapItem("numberOfSkirtLoops", "skirts"),
//numberOfTopLayers=6
new MapItem("numberOfTopLayers", "top_solid_layers"),
new AsLayerCountOrDistance("numberOfTopLayers", "top_solid_layers"),
//outsidePerimeterSpeed=50 # The speed of the first perimeter. mm/s.
new AsPercentOfReferenceOrDirect("outsidePerimeterSpeed", "external_perimeter_speed", "perimeter_speed"),
@ -262,9 +262,9 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
new MapItem("supportXYDistanceFromObject", "support_material_xy_distance"),
//supportZDistanceFromObject=1 # The number of layers to skip in z. The gap between the support and the model.
new MapItem("supportNumberOfLayersToSkipInZ", "support_material_z_gap_layers"),
new AsLayerCountOrDistance("supportNumberOfLayersToSkipInZ", "support_material_z_gap_layers"),
new MapItem("supportInterfaceLayers", "support_material_interface_layers"),
new AsLayerCountOrDistance("supportInterfaceLayers", "support_material_interface_layers"),
//travelSpeed=200 # The speed to move when not extruding material. mm/s.
new MapItem("travelSpeed", "travel_speed"),

View file

@ -339,6 +339,29 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
}
}
public class AsLayerCountOrDistance : MapItem
{
public AsLayerCountOrDistance(string mappedKey, string originalKey)
: base(mappedKey, originalKey)
{
}
public override string MappedValue
{
get
{
if (OriginalValue.Contains("mm"))
{
string withoutMm = OriginalValue.Replace("mm", "");
int layers = (int)(MapItem.ParseValueString(withoutMm) / ActiveSliceSettings.Instance.LayerHeight + .5);
return layers.ToString();
}
return base.MappedValue;
}
}
}
public class AsPercentOfReferenceOrDirect : ScaledSingleNumber
{
internal string originalReference;