Migrate ApplyAtCenter to IObject3D extension method

- Rename to ApplyAtBoundCenter
- Change to return void and apply to instance
This commit is contained in:
John Lewin 2018-02-01 12:24:56 -08:00
parent 68348dfc78
commit 3331748239
6 changed files with 34 additions and 26 deletions

View file

@ -69,14 +69,17 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
nextOffset *= Scale;
}
}
nextOffset.Rotate(rotateRadians * i);
var next = lastChild.Clone();
next.Matrix *= Matrix4X4.CreateTranslation(nextOffset.X, nextOffset.Y, 0);
if (RotatePart)
{
next.Matrix = PlatingHelper.ApplyAtCenter(next, Matrix4X4.CreateRotationZ(rotateRadians));
next.ApplyAtBoundsCenter(Matrix4X4.CreateRotationZ(rotateRadians));
}
next.Matrix = PlatingHelper.ApplyAtCenter(next, Matrix4X4.CreateScale(Scale));
next.ApplyAtBoundsCenter(Matrix4X4.CreateScale(Scale));
list.Add(next.Clone());
lastChild = next;
}