diff --git a/ApplicationView/ApplicationController.cs b/ApplicationView/ApplicationController.cs index ef1bb5d3d..8e92d6ae2 100644 --- a/ApplicationView/ApplicationController.cs +++ b/ApplicationView/ApplicationController.cs @@ -414,11 +414,11 @@ namespace MatterHackers.MatterControl HoldChildProportional.AddSelectionAsChildren(scene, new ArrayObject3D(), nameof(ArrayObject3D), "Array Part"); if(scene.SelectedItem is ArrayObject3D array) { - array.SetCopy(); + array.Rebuild(); } }, //Icon = AggContext.StaticData.LoadIcon("subtract.png").SetPreMultiply(), - IsEnabled = (scene) => scene.HasSelection, + IsEnabled = (scene) => scene.HasSelection && !(scene.SelectedItem is SelectionGroup), }, new SceneSelectionOperation() { diff --git a/DesignTools/Operations/ArrayObject3D.cs b/DesignTools/Operations/ArrayObject3D.cs index a6b2fb24b..107a5d232 100644 --- a/DesignTools/Operations/ArrayObject3D.cs +++ b/DesignTools/Operations/ArrayObject3D.cs @@ -36,11 +36,13 @@ namespace MatterHackers.MatterControl.DesignTools.Operations { public class ArrayObject3D : Object3D, IRebuildable { - IObject3D item; - public int Count { get; set; } = 3; public double XOffset { get; set; } = 30; - public double YOffset { get; set; } = 30; + public double YOffset { get; set; } = 0; + public double Rotate { get; set; } = 0; + public double Scale { get; set; } = 1; + public bool RotatePart { get; set; } = false; + public bool ScaleOffset { get; set; } = false; public override string ActiveEditor => "PublicPropertyEditor"; @@ -52,21 +54,33 @@ namespace MatterHackers.MatterControl.DesignTools.Operations { this.Children.Modify(list => { + IObject3D lastChild = list.First(); list.Clear(); - for(int i=0; i