Rotate can be scripted
This commit is contained in:
parent
c7ebd45267
commit
252a00989a
1 changed files with 6 additions and 2 deletions
|
|
@ -94,14 +94,14 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
|
||||
[MaxDecimalPlaces(2)]
|
||||
[DisplayName("Angle")]
|
||||
public double AngleDegrees { get; set; } = 0;
|
||||
public DoubleOrExpression AngleDegrees { get; set; } = 0;
|
||||
|
||||
[JsonIgnore]
|
||||
public Matrix4X4 RotationMatrix
|
||||
{
|
||||
get
|
||||
{
|
||||
var angleRadians = MathHelper.DegreesToRadians(AngleDegrees);
|
||||
var angleRadians = MathHelper.DegreesToRadians(AngleDegrees.Value(this));
|
||||
var rotation = Matrix4X4.CreateTranslation(-RotateAbout.Origin)
|
||||
* Matrix4X4.CreateRotation(RotateAbout.Normal, angleRadians)
|
||||
* Matrix4X4.CreateTranslation(RotateAbout.Origin);
|
||||
|
|
@ -129,6 +129,10 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
{
|
||||
await Rebuild();
|
||||
}
|
||||
else if (SheetObject3D.NeedsRebuild(this, invalidateArgs))
|
||||
{
|
||||
await Rebuild();
|
||||
}
|
||||
else if (invalidateArgs.InvalidateType.HasFlag(InvalidateType.Properties)
|
||||
&& invalidateArgs.Source == this)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue