From 4e41fa6694cd0b43c87d753e9297ea9f59c7a4e7 Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Wed, 7 Mar 2018 09:55:55 -0800 Subject: [PATCH] Put 0 height objects slightly above the bed --- Library/Widgets/InsertionGroup.cs | 9 +++++++++ Submodules/agg-sharp | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Library/Widgets/InsertionGroup.cs b/Library/Widgets/InsertionGroup.cs index 6c3a2e110..11ad4d728 100644 --- a/Library/Widgets/InsertionGroup.cs +++ b/Library/Widgets/InsertionGroup.cs @@ -32,6 +32,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using MatterHackers.DataConverters3D; +using MatterHackers.MatterControl.DesignTools.Operations; using MatterHackers.MatterControl.PartPreviewWindow; using MatterHackers.PolygonMesh; using MatterHackers.VectorMath; @@ -107,6 +108,14 @@ namespace MatterHackers.MatterControl.Library // Copy scale/rotation/translation from the source and Center loadedItem.Matrix = loadedItem.Matrix * Matrix4X4.CreateTranslation((double)-aabb.Center.X, (double)-aabb.Center.Y, (double)-aabb.minXYZ.Z) * placeholderItem.Matrix; + + // check if the item has 0 height (it is probably an image) + if(loadedItem.ZSize() == 0) + { + // raise it up a bit so it is not z fighting with the bed + loadedItem.Matrix *= Matrix4X4.CreateTranslation(0, 0, .1); + } + loadedItem.Color = loadedItem.Color; // Set mesh path if tracking requested diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index 5249b55d9..19b7cdf76 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit 5249b55d99b14ecf2f62d92de64e6ad342698ae2 +Subproject commit 19b7cdf7679822e1313c1718c3587c6eaeaca697