From d5b06de172385341f5221a687a372e19a0f41544 Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Wed, 17 Oct 2018 13:49:56 -0700 Subject: [PATCH] Adding coast at end mad travel render transparent fixed layer identification in ms gcode --- .../GCodeRenderer/RenderFeatures/RenderFeatureTravel.cs | 5 +++++ MatterControl.Printing/GCode/GCodeFile.cs | 6 +++--- .../SlicerMapping/EngineMappingMatterSlice.cs | 1 + StaticData/SliceSettings/Layouts.txt | 1 + StaticData/SliceSettings/Properties.json | 9 +++++++++ Submodules/MatterSlice | 2 +- 6 files changed, 20 insertions(+), 4 deletions(-) diff --git a/MatterControl.OpenGL/GCodeRenderer/RenderFeatures/RenderFeatureTravel.cs b/MatterControl.OpenGL/GCodeRenderer/RenderFeatures/RenderFeatureTravel.cs index 2e38cc85b..5cfd13545 100644 --- a/MatterControl.OpenGL/GCodeRenderer/RenderFeatures/RenderFeatureTravel.cs +++ b/MatterControl.OpenGL/GCodeRenderer/RenderFeatures/RenderFeatureTravel.cs @@ -106,6 +106,11 @@ namespace MatterHackers.GCodeVisualizer Vector2 end = new Vector2(endF.x, endF.y); renderInfo.Transform.transform(ref end); + if (renderInfo.CurrentRenderType.HasFlag(RenderType.TransparentExtrusion)) + { + movementColor = new Color(movementColor, 200); + } + graphics2DGl.DrawAALineRounded(start, end, movementLineWidth, movementColor); } else diff --git a/MatterControl.Printing/GCode/GCodeFile.cs b/MatterControl.Printing/GCode/GCodeFile.cs index d4e88c63c..46b054209 100644 --- a/MatterControl.Printing/GCode/GCodeFile.cs +++ b/MatterControl.Printing/GCode/GCodeFile.cs @@ -106,9 +106,9 @@ namespace MatterControl.Printing public static bool IsLayerChange(string lineString) { - return lineString.StartsWith("; LAYER:", StringComparison.InvariantCultureIgnoreCase) - || lineString.StartsWith(";LAYER:", StringComparison.InvariantCultureIgnoreCase) - || lineString.StartsWith("; LAYER ", StringComparison.InvariantCultureIgnoreCase); + return lineString.StartsWith("; LAYER:") + || lineString.StartsWith(";LAYER:") + || lineString.StartsWith("; layer "); } public static bool FileTooBigToLoad(string fileName) diff --git a/MatterControlLib/SlicerConfiguration/SlicerMapping/EngineMappingMatterSlice.cs b/MatterControlLib/SlicerConfiguration/SlicerMapping/EngineMappingMatterSlice.cs index c96fa574c..94efff1de 100644 --- a/MatterControlLib/SlicerConfiguration/SlicerMapping/EngineMappingMatterSlice.cs +++ b/MatterControlLib/SlicerConfiguration/SlicerMapping/EngineMappingMatterSlice.cs @@ -175,6 +175,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration // fan settings new VisibleButNotMappedToEngine("enable_fan"), // this is considered when sending fan speeds to slicing new MappedFanSpeedSetting("min_fan_speed", "fanSpeedMinPercent"), + new MappedSetting("coast_at_end_distance", "coastAtEndDistance"), new MappedSetting("min_fan_speed_layer_time", "minFanSpeedLayerTime"), new MappedFanSpeedSetting("max_fan_speed", "fanSpeedMaxPercent"), new MappedSetting("max_fan_speed_layer_time", "maxFanSpeedLayerTime"), diff --git a/StaticData/SliceSettings/Layouts.txt b/StaticData/SliceSettings/Layouts.txt index 1b70283f7..3b91a7426 100644 --- a/StaticData/SliceSettings/Layouts.txt +++ b/StaticData/SliceSettings/Layouts.txt @@ -16,6 +16,7 @@ Advanced perimeter_start_end_overlap merge_overlapping_lines expand_thin_walls + coast_at_end_distance Infill Advanced fill_angle diff --git a/StaticData/SliceSettings/Properties.json b/StaticData/SliceSettings/Properties.json index 67e64e02c..de6365be5 100644 --- a/StaticData/SliceSettings/Properties.json +++ b/StaticData/SliceSettings/Properties.json @@ -1191,6 +1191,15 @@ "EnableIfSet": "enable_retractions", "DefaultValue": "20" }, + { + "SlicerConfigName": "coast_at_end_distance", + "PresentationName": "Coast At End", + "HelpText": "The distance to travel after completing a perimeter to improve seams.", + "DataEditType": "POSITIVE_DOUBLE", + "Units": "mm", + "ShowIfSet": "!sla_printer", + "DefaultValue": "3" + }, { "SlicerConfigName": "enable_retractions", "PresentationName": "Enable Retractions", diff --git a/Submodules/MatterSlice b/Submodules/MatterSlice index 8ef8a330d..1e731f7ca 160000 --- a/Submodules/MatterSlice +++ b/Submodules/MatterSlice @@ -1 +1 @@ -Subproject commit 8ef8a330dd159f976feea154d07490428fda2339 +Subproject commit 1e731f7caea6a66d9b494a55bda872ad408108ca