Adding to the other Diameter objects
This commit is contained in:
parent
ec41a2b6aa
commit
ce49dadb13
3 changed files with 45 additions and 3 deletions
|
|
@ -32,10 +32,12 @@ using MatterHackers.Agg;
|
|||
using MatterHackers.Agg.VertexSource;
|
||||
using MatterHackers.DataConverters3D;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.PartPreviewWindow;
|
||||
using MatterHackers.Plugins.EditorTools;
|
||||
|
||||
namespace MatterHackers.MatterControl.DesignTools
|
||||
{
|
||||
public class ConeObject3D : PrimitiveObject3D, IObjectWithHeight
|
||||
public class ConeObject3D : PrimitiveObject3D, IObjectWithHeight, IObject3DControlsProvider
|
||||
{
|
||||
public ConeObject3D()
|
||||
{
|
||||
|
|
@ -98,5 +100,17 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
Parent?.Invalidate(new InvalidateArgs(this, InvalidateType.Children));
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -33,11 +33,13 @@ using MatterHackers.Agg;
|
|||
using MatterHackers.Agg.VertexSource;
|
||||
using MatterHackers.DataConverters3D;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.PartPreviewWindow;
|
||||
using MatterHackers.Plugins.EditorTools;
|
||||
using MatterHackers.VectorMath;
|
||||
|
||||
namespace MatterHackers.MatterControl.DesignTools
|
||||
{
|
||||
public class HalfSphereObject3D : PrimitiveObject3D
|
||||
public class HalfSphereObject3D : PrimitiveObject3D, IObject3DControlsProvider
|
||||
{
|
||||
public HalfSphereObject3D()
|
||||
{
|
||||
|
|
@ -115,5 +117,17 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
Parent?.Invalidate(new InvalidateArgs(this, InvalidateType.Mesh));
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -33,12 +33,14 @@ using MatterHackers.Agg;
|
|||
using MatterHackers.Agg.VertexSource;
|
||||
using MatterHackers.DataConverters3D;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.PartPreviewWindow;
|
||||
using MatterHackers.Plugins.EditorTools;
|
||||
using MatterHackers.PolygonMesh;
|
||||
using MatterHackers.VectorMath;
|
||||
|
||||
namespace MatterHackers.MatterControl.DesignTools
|
||||
{
|
||||
public class SphereObject3D : PrimitiveObject3D, IPropertyGridModifier
|
||||
public class SphereObject3D : PrimitiveObject3D, IPropertyGridModifier, IObject3DControlsProvider
|
||||
{
|
||||
public SphereObject3D()
|
||||
{
|
||||
|
|
@ -157,5 +159,17 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
change.SetRowVisible(nameof(EndingAngle), () => Advanced);
|
||||
change.SetRowVisible(nameof(LatitudeSides), () => 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue