diameter control is working cancel scale is working

This commit is contained in:
LarsBrubaker 2021-05-01 22:06:43 -07:00
parent 75dd3834ab
commit ec41a2b6aa
17 changed files with 524 additions and 33 deletions

View file

@ -36,11 +36,13 @@ using MatterHackers.Agg.VertexSource;
using MatterHackers.DataConverters3D;
using MatterHackers.Localizations;
using MatterHackers.MatterControl.DesignTools.Operations;
using MatterHackers.MatterControl.PartPreviewWindow;
using MatterHackers.Plugins.EditorTools;
using MatterHackers.VectorMath;
namespace MatterHackers.MatterControl.DesignTools
{
public class CylinderObject3D : PrimitiveObject3D, IPropertyGridModifier, IObjectWithHeight
public class CylinderObject3D : PrimitiveObject3D, IPropertyGridModifier, IObjectWithHeight, IObject3DControlsProvider
{
public CylinderObject3D()
{
@ -213,5 +215,17 @@ namespace MatterHackers.MatterControl.DesignTools
endingAngleWidget.Visible = Advanced;
}
}
public void AddObject3DControls(Object3DControlsLayer object3DControlsLayer)
{
object3DControlsLayer.Object3DControls.Add(new ScaleDiameterControl(object3DControlsLayer,
() => Diameter,
(diameter) => Diameter = diameter));
object3DControlsLayer.Object3DControls.Add(new ScaleHeightControl(object3DControlsLayer,
() => Diameter,
(diameter) => Diameter = diameter));
object3DControlsLayer.AddControls(ControlTypes.MoveInZ);
object3DControlsLayer.AddControls(ControlTypes.RotateXYZ);
}
}
}