Added passing UndoBuffer to rebuildable

This commit is contained in:
Lars Brubaker 2018-03-08 17:23:03 -08:00
parent 4e41fa6694
commit 9cc6d5f469
43 changed files with 208 additions and 99 deletions

View file

@ -44,7 +44,7 @@ namespace MatterControl.Printing
private double amountOfAccumulatedEWhileParsing = 0;
private List<int> indexOfChangeInZ = new List<int>();
private Vector2 center = Vector2.Zero;
private MatterHackers.VectorMath.Vector2 center = MatterHackers.VectorMath.Vector2.Zero;
private double parsingLastZ;
private bool gcodeHasExplicitLayerChangeInfo = false;
private double firstLayerThickness;
@ -740,10 +740,10 @@ namespace MatterControl.Printing
public override Vector2 GetWeightedCenter()
{
Vector2 total = new Vector2();
MatterHackers.VectorMath.Vector2 total = new MatterHackers.VectorMath.Vector2();
foreach (PrinterMachineInstruction state in GCodeCommandQueue)
{
total += new Vector2(state.Position.X, state.Position.Y);
total += new MatterHackers.VectorMath.Vector2(state.Position.X, state.Position.Y);
}
return total / GCodeCommandQueue.Count;