Adding support for Fuzzy and starting to think about Holes
This commit is contained in:
parent
53ba0aaaf0
commit
c5da58cb77
7 changed files with 48 additions and 35 deletions
|
|
@ -146,9 +146,9 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Natural path
|
||||
private async Task<string> GCodePath(PrinterConfig printer)
|
||||
|
||||
// Natural path
|
||||
private async Task<string> GCodePath(PrinterConfig printer)
|
||||
{
|
||||
if (File.Exists(this.SourceFilePath))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -857,11 +857,9 @@ namespace MatterHackers.MatterControl
|
|||
Visible = OperationGroup.GetVisible("Path", false),
|
||||
Operations = new List<SceneOperation>()
|
||||
{
|
||||
#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")
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
BIN
StaticData/Icons/fuzzy_region.png
Normal file
BIN
StaticData/Icons/fuzzy_region.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6 KiB |
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit cf9cf3cd84dbfadf1ba221700ac269667cc5c27d
|
||||
Subproject commit 5aaffe6755cb571da356678bcb468bd2b62c38f6
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit a4a900756db5e0c310c6ff49762aa4414320854c
|
||||
Subproject commit 93bcdc151fc9a3916c321d0453a6b0ef33248a30
|
||||
Loading…
Add table
Add a link
Reference in a new issue