diff --git a/MatterControlLib/ApplicationView/EditContext.cs b/MatterControlLib/ApplicationView/EditContext.cs index 183276bbb..23bb3f6dd 100644 --- a/MatterControlLib/ApplicationView/EditContext.cs +++ b/MatterControlLib/ApplicationView/EditContext.cs @@ -146,9 +146,9 @@ namespace MatterHackers.MatterControl } } } - - // Natural path - private async Task GCodePath(PrinterConfig printer) + + // Natural path + private async Task GCodePath(PrinterConfig printer) { if (File.Exists(this.SourceFilePath)) { diff --git a/MatterControlLib/ApplicationView/SceneOperations.cs b/MatterControlLib/ApplicationView/SceneOperations.cs index 58a373aa7..1f614bad3 100644 --- a/MatterControlLib/ApplicationView/SceneOperations.cs +++ b/MatterControlLib/ApplicationView/SceneOperations.cs @@ -857,11 +857,9 @@ namespace MatterHackers.MatterControl Visible = OperationGroup.GetVisible("Path", false), Operations = new List() { -#if DEBUG - AddSliceSettingsOperation(), -#endif ToggleSupportOperation(), ToggleWipeTowerOperation(), + ToggleFuzzyOperation(), } }, new OperationGroup("Design Apps") @@ -1443,33 +1441,6 @@ namespace MatterHackers.MatterControl }; } - private static SceneOperation AddSliceSettingsOperation() - { - var isExperimental = OemSettings.Instance.WindowTitleExtra == "Experimental"; - -#if !DEBUG - if (!isExperimental) - { - return null; - } -#endif - - return new SceneOperation("Add Slice Settings") - { - OperationType = typeof(IObject3D), - ResultType = typeof(SliceSettingsObject3D), - TitleGetter = () => "Add Slice Settings".Localize(), - Action = (sceneContext) => - { - var sliceSettings = new SliceSettingsObject3D(); - sliceSettings.WrapSelectedItemAndSelect(sceneContext.Scene); - }, - Icon = (theme) => StaticData.Instance.LoadIcon("settings.png", 16, 16).SetToColor(theme.TextColor), - HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(), - IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem), - }; - } - private static SceneOperation ToggleWipeTowerOperation() { return new SceneOperation("Convert to Wipe Tower") @@ -1501,6 +1472,37 @@ namespace MatterHackers.MatterControl }; } + private static SceneOperation ToggleFuzzyOperation() + { + return new SceneOperation("Convert to Fuzzy Region") + { + TitleGetter = () => "Convert to Fuzzy Region".Localize(), + Action = (sceneContext) => + { + var scene = sceneContext.Scene; + var selectedItem = scene.SelectedItem; + if (selectedItem != null) + { + bool allAreFuzzy = false; + + if (selectedItem is SelectionGroupObject3D) + { + allAreFuzzy = selectedItem.Children.All(i => i.OutputType == PrintOutputTypes.Fuzzy); + } + else + { + allAreFuzzy = selectedItem.OutputType == PrintOutputTypes.Fuzzy; + } + + scene.UndoBuffer.AddAndDo(new SetOutputType(selectedItem, allAreFuzzy ? PrintOutputTypes.Default : PrintOutputTypes.Fuzzy)); + } + }, + Icon = (theme) => StaticData.Instance.LoadIcon("fuzzy_region.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(), + HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(), + IsEnabled = (sceneContext) => IsMeshObject(sceneContext.Scene.SelectedItem), + }; + } + private static SceneOperation TwistOperation() { return new SceneOperation("Twist") diff --git a/MatterControlLib/SlicerConfiguration/EngineMappingsMatterSlice.cs b/MatterControlLib/SlicerConfiguration/EngineMappingsMatterSlice.cs index 6ffc7fcf8..3bb6b42da 100644 --- a/MatterControlLib/SlicerConfiguration/EngineMappingsMatterSlice.cs +++ b/MatterControlLib/SlicerConfiguration/EngineMappingsMatterSlice.cs @@ -332,6 +332,14 @@ namespace MatterHackers.MatterControl.SlicerConfiguration mergeRules += ",W" + AddObjectsForExtruder(wipeTowerObjects, outputOptions, ref savedStlCount); } + var fuzzyObjects = meshItemsOnBuildPlate.Where((item) => item.WorldOutputType() == PrintOutputTypes.Fuzzy); + // if we added user generated wipe tower + if (fuzzyObjects.Any()) + { + // add a flag to the merge rules to let us know there was a wipe tower + mergeRules += ",F" + AddObjectsForExtruder(fuzzyObjects, outputOptions, ref savedStlCount); + } + mergeRules += " "; return outputOptions; diff --git a/StaticData/Icons/fuzzy_region.png b/StaticData/Icons/fuzzy_region.png new file mode 100644 index 000000000..ceaf6bef2 Binary files /dev/null and b/StaticData/Icons/fuzzy_region.png differ diff --git a/StaticData/Translations/Master.txt b/StaticData/Translations/Master.txt index fc2b1517f..5e55ca919 100644 --- a/StaticData/Translations/Master.txt +++ b/StaticData/Translations/Master.txt @@ -1012,6 +1012,9 @@ Translated:Controls the amount of extrusion English:Controls the speed of printer moves Translated:Controls the speed of printer moves +English:Convert to Fuzzy Region +Translated:Convert to Fuzzy Region + English:Convert to Support Translated:Convert to Support diff --git a/Submodules/MatterSlice b/Submodules/MatterSlice index cf9cf3cd8..5aaffe675 160000 --- a/Submodules/MatterSlice +++ b/Submodules/MatterSlice @@ -1 +1 @@ -Subproject commit cf9cf3cd84dbfadf1ba221700ac269667cc5c27d +Subproject commit 5aaffe6755cb571da356678bcb468bd2b62c38f6 diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index a4a900756..93bcdc151 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit a4a900756db5e0c310c6ff49762aa4414320854c +Subproject commit 93bcdc151fc9a3916c321d0453a6b0ef33248a30