Make sure we only assign the mesh when it is done

This commit is contained in:
LarsBrubaker 2018-02-09 09:40:26 -08:00
parent 1aab6ebe61
commit 9294d37194
4 changed files with 11 additions and 8 deletions

View file

@ -64,8 +64,9 @@ namespace MatterHackers.MatterControl.DesignTools
path.LineTo(Width, 0);
path.LineTo(Height, Height);
Mesh = VertexSourceToMesh.Extrude(path, Depth);
Mesh.Transform(Matrix4X4.CreateRotationX(MathHelper.Tau / 4));
var mesh = VertexSourceToMesh.Extrude(path, Depth);
mesh.Transform(Matrix4X4.CreateRotationX(MathHelper.Tau / 4));
Mesh = mesh;
if (aabb.ZSize > 0)
{
// If the part was already created and at a height, maintain the height.