From 1a63c26a831145d5556ab717b6ecd72356d89136 Mon Sep 17 00:00:00 2001 From: LarsBrubaker Date: Thu, 15 Mar 2018 19:19:05 -0700 Subject: [PATCH] Made subtract and replace ensure contrast with the inserted part --- PartPreviewWindow/View3D/Actions/MeshWrapperObject3D.cs | 2 ++ PartPreviewWindow/View3D/Actions/SubtractAndReplace.cs | 2 ++ Submodules/agg-sharp | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/PartPreviewWindow/View3D/Actions/MeshWrapperObject3D.cs b/PartPreviewWindow/View3D/Actions/MeshWrapperObject3D.cs index e21ac59b8..a968cf175 100644 --- a/PartPreviewWindow/View3D/Actions/MeshWrapperObject3D.cs +++ b/PartPreviewWindow/View3D/Actions/MeshWrapperObject3D.cs @@ -138,6 +138,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D item.Visible = true; // set the mesh back to the child mesh item.Mesh = item.Children.First().Mesh; + // and set the color back + item.Color = item.Children.First().Color; } } } diff --git a/PartPreviewWindow/View3D/Actions/SubtractAndReplace.cs b/PartPreviewWindow/View3D/Actions/SubtractAndReplace.cs index f354989cd..a53b76ecf 100644 --- a/PartPreviewWindow/View3D/Actions/SubtractAndReplace.cs +++ b/PartPreviewWindow/View3D/Actions/SubtractAndReplace.cs @@ -252,6 +252,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D paint.Mesh = paintMesh; + paint.Color = paint.WorldColor().AdjustContrast(keepObjects.First().WorldColor(), 2).ToColor(); + // now set it to the new solid color paint.OutputType = PrintOutputTypes.Solid; } diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index 6e7df2a84..11144110b 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit 6e7df2a849ad4028c4f451dea4b1fa220ef368e8 +Subproject commit 11144110b2f997f2b107ff7c598ec243a9f4109a