Subtract is working now

Added child selector
got align updating correctly
got array operations working with source object
fit to bounds updating correctly
took out hole output type
improved text object

issue: MatterHackers/MCCentral#3456
Second subtract creates bad data
This commit is contained in:
Lars Brubaker 2018-06-01 17:44:46 -07:00
parent 1a7ca2d0d7
commit 99ef697d16
19 changed files with 311 additions and 324 deletions

View file

@ -444,12 +444,13 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
});
ResumeRebuild();
Invalidate(new InvalidateArgs(this, InvalidateType.Matrix));
}
public override void Remove(UndoBuffer undoBuffer)
{
SuspendRebuild();
// put everything back to where it was before the arrange started
if (OriginalChildrenBounds.Count == Children.Count)
{
@ -463,6 +464,9 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
}
base.Remove(undoBuffer);
ResumeRebuild();
Invalidate(new InvalidateArgs(this, InvalidateType.Content));
}
public void UpdateControls(PPEContext context)

View file

@ -104,15 +104,4 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
base.Remove(undoBuffer);
}
}
public class DirectionAxis
{
public Vector3 Normal { get; set; }
public Vector3 Origin { get; set; }
}
public class DirectionVector
{
public Vector3 Normal { get; set; }
}
}

View file

@ -30,6 +30,7 @@ either expressed or implied, of the FreeBSD Project.
using MatterHackers.Agg.UI;
using MatterHackers.DataConverters3D;
using MatterHackers.Localizations;
using MatterHackers.MatterControl.DesignTools.EditableTypes;
using MatterHackers.VectorMath;
using System;
using System.Linq;

View file

@ -30,6 +30,7 @@ either expressed or implied, of the FreeBSD Project.
using MatterHackers.Agg.UI;
using MatterHackers.DataConverters3D;
using MatterHackers.Localizations;
using MatterHackers.MatterControl.DesignTools.EditableTypes;
using MatterHackers.VectorMath;
using System;
using System.ComponentModel;

View file

@ -52,8 +52,8 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
public FitType FitType { get; set; } = FitType.Box;
public double Width { get; set; }
public double Diameter { get; set ; }
public double Depth { get; set; }
public double Diameter { get; set; }
public double Height { get; set; }
[Description("Set the rules for how to maintain the part while scaling.")]
@ -74,6 +74,8 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
public override void Apply(UndoBuffer undoBuffer)
{
SuspendRebuild();
// push our matrix into our children
foreach (var child in this.Children)
{
@ -89,10 +91,15 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
list.Remove(this);
list.AddRange(ScaleItem.Children);
});
ResumeRebuild();
Invalidate(new InvalidateArgs(this, InvalidateType.Content));
}
public override void Remove(UndoBuffer undoBuffer)
{
SuspendRebuild();
// push our matrix into inner children
foreach (var child in ScaleItem.Children)
{
@ -105,6 +112,9 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
list.Remove(this);
list.AddRange(ScaleItem.Children);
});
ResumeRebuild();
Invalidate(new InvalidateArgs(this, InvalidateType.Content));
}
public override void OnInvalidate(InvalidateArgs invalidateType)