Photomechanics API
Photomechanics.Photo3DStudio.TurntableControl.Interfaces.IRotationProvider Interface Reference

Provides basic turn table functions. More...

Inheritance diagram for Photomechanics.Photo3DStudio.TurntableControl.Interfaces.IRotationProvider:
[legend]

Public Member Functions

Task CancelRotation ()
 Cancel currently running rotation. More...
 
Task< Int32 > GetStepsPerRound ()
 Get steps per round. More...
 
Task RotateDegrees (Double degrees)
 Rotate fixed angle. More...
 
Task RotateSteps (Int32 steps)
 Rotate given amount of steps. More...
 
Task RotateInfinite (Boolean clockwise)
 Rotate until canceled. More...
 
Task SetTargetSpeed (Double degreesPerSecond)
 Set maximal rotation speed. More...
 
Task< Double > GetMaxAllowedSpeed ()
 Get maximal speed allowed by turn table. More...
 
Task< Double > GetInitialSpeed ()
 Get initial rotation speed. More...
 
void OverrideStepsPerRound (Int32 newStepsPerRound)
 Override default steps per round with user provided value. More...
 
void DisableStepsPerRoundOverride ()
 Revert value set by OverrideStepsPerRound. More...
 

Detailed Description

Provides basic turn table functions.

Member Function Documentation

◆ CancelRotation()

Task Photomechanics.Photo3DStudio.TurntableControl.Interfaces.IRotationProvider.CancelRotation ( )

Cancel currently running rotation.

Exceptions
TurntableOperationFailedExceptionThrown when turn table returns fail result of operation.

◆ GetStepsPerRound()

Task<Int32> Photomechanics.Photo3DStudio.TurntableControl.Interfaces.IRotationProvider.GetStepsPerRound ( )

Get steps per round.

Used by methods that are working with degrees for correct conversion.

◆ RotateDegrees()

Task Photomechanics.Photo3DStudio.TurntableControl.Interfaces.IRotationProvider.RotateDegrees ( Double  degrees)

Rotate fixed angle.

Due to the fact that most turntables use stepper motor steps instead of degrees, small rounding error might occur. Use RotateSteps with custom rounding error compensation logic to avoid error accumulation.

Parameters
degreesAmount of degrees to rotate.
Exceptions
TurntableOperationFailedExceptionThrown when turn table returns fail result of operation.

◆ RotateSteps()

Task Photomechanics.Photo3DStudio.TurntableControl.Interfaces.IRotationProvider.RotateSteps ( Int32  steps)

Rotate given amount of steps.

Useful when maximal rotation accuracy is needed and degrees-steps conversion rounding error is not acceptable. For example, to rotate 360 degrees by making 36 turns 10 degree each and return exact same location.

Parameters
stepsSteps to rotate.
Exceptions
TurntableOperationFailedExceptionThrown when turn table returns fail result of operation.

◆ RotateInfinite()

Task Photomechanics.Photo3DStudio.TurntableControl.Interfaces.IRotationProvider.RotateInfinite ( Boolean  clockwise)

Rotate until canceled.

Parameters
clockwiseRotation direction.
Exceptions
TurntableOperationFailedExceptionThrown when turn table returns fail result of operation.

◆ SetTargetSpeed()

Task Photomechanics.Photo3DStudio.TurntableControl.Interfaces.IRotationProvider.SetTargetSpeed ( Double  degreesPerSecond)

Set maximal rotation speed.

Parameters
degreesPerSecondSpeed value in degrees per second.
Exceptions
TurntableOperationFailedExceptionThrown when turn table returns fail result of operation.

◆ GetMaxAllowedSpeed()

Task<Double> Photomechanics.Photo3DStudio.TurntableControl.Interfaces.IRotationProvider.GetMaxAllowedSpeed ( )

Get maximal speed allowed by turn table.

Exceptions
TurntableOperationFailedExceptionThrown when turn table returns fail result of operation.

◆ GetInitialSpeed()

Task<Double> Photomechanics.Photo3DStudio.TurntableControl.Interfaces.IRotationProvider.GetInitialSpeed ( )

Get initial rotation speed.

Exceptions
TurntableOperationFailedExceptionThrown when turn table returns fail result of operation.

◆ OverrideStepsPerRound()

void Photomechanics.Photo3DStudio.TurntableControl.Interfaces.IRotationProvider.OverrideStepsPerRound ( Int32  newStepsPerRound)

Override default steps per round with user provided value.

All new firmwares can send their steps per round and speed restrictions, so this should not be used. However, turntables with legacy firmware usually can't do that and user may need to provide this value manually using this method.

◆ DisableStepsPerRoundOverride()

void Photomechanics.Photo3DStudio.TurntableControl.Interfaces.IRotationProvider.DisableStepsPerRoundOverride ( )

Revert value set by OverrideStepsPerRound.