Migrate ApplyAtCenter to IObject3D extension method
- Rename to ApplyAtBoundCenter - Change to return void and apply to instance
This commit is contained in:
parent
68348dfc78
commit
3331748239
6 changed files with 34 additions and 26 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue