Public Member Functions | List of all members
Axis Class Reference

Inherits ScriptObject, and UnitConsumer.

Public Member Functions

 Axis ()
 
 Axis (Boolean _table, Vector _axis, Vector _offset, Integer _coordinate)
 
 Axis (Boolean _table, Vector _axis, Vector _offset, Integer _coordinate, Range _range)
 
String getName ()
 
 setName (String name)
 
Integer getActuator ()
 
 setActuator (Integer actuator)
 
Boolean isLinear ()
 
Boolean isRotational ()
 
Boolean isAggregate ()
 
Number getResolution ()
 
 setResolution (Number resolution)
 
Number clampToResolution (Number _value)
 
Number getResolutionError (Number _value)
 
Number getMaximumFeed ()
 
 setMaximumFeed (Number _maximumFeed)
 
Number getRapidFeed ()
 
 setRapidFeed (Number _rapidFeed)
 
Integer getPreference ()
 
 setPreference (Integer preference)
 
Integer getReset ()
 
 setReset (Integer reset)
 
Boolean isEnabled ()
 
Boolean isHead ()
 
Boolean isTable ()
 
Vector getEffectiveAxis ()
 
Vector getAxis ()
 
Vector getOffset ()
 
Number getHomePosition ()
 
Number getDisplacement ()
 
Boolean isCyclic ()
 
Boolean isTCPEnabled ()
 
Range getRange ()
 
Integer getCoordinate ()
 
Boolean isSupported (Number value)
 
Number clamp (Number value)
 
Number reduce (Number value)
 
Number remapToRange (Number angle)
 
Number remapToRange2 (Number angle, Number current)
 
Matrix getAxisRotation (Number position)
 

Detailed Description

Machine axis specification.

Constructor & Destructor Documentation

◆ Axis() [1/3]

Axis ( )

Constructs an invalid axis.

◆ Axis() [2/3]

Axis ( Boolean  _table,
Vector  _axis,
Vector  _offset,
Integer  _coordinate 
)

Constructs a rotational axis.

Parameters
_tableSpecifies the axis is located in the table as opposed to the head.
_axisThe axis vector.
_offsetThe axis offset.
_coordinateThe coordinate to which the axis coordinate is bound (0:X, 1:Y, 2:Z).

◆ Axis() [3/3]

Axis ( Boolean  _table,
Vector  _axis,
Vector  _offset,
Integer  _coordinate,
Range  _range 
)

Constructs a rotational axis.

Parameters
_tableSpecifies the axis is located in the table as opposed to the head.
_axisThe axis vector.
_offsetThe axis offset.
_coordinateThe coordinate to which the axis coordinate is bound (0:X, 1:Y, 2:Z).
_rangeThe valid range.

Member Function Documentation

◆ clamp()

Number clamp ( Number  value)

Returns the closest valid angle/offset.

Parameters
valueThe coordinate (angular for rotational axis and spatial for linear axis).

◆ clampToResolution()

Number clampToResolution ( Number  _value)

Returns the axis value clamped to the resolution.

◆ getActuator()

Integer getActuator ( )

Returns the actuator type.

0: linear actuator. 1: rotational actuator.

◆ getAxis()

Vector getAxis ( )

Returns the axis direction.

◆ getAxisRotation()

Matrix getAxisRotation ( Number  position)

Returns the rotation for the given axis position. Returns the identity matrix for a linear axis.

◆ getCoordinate()

Integer getCoordinate ( )

Returns the coordinate to which the axis coordinate is bound (0:X, 1:Y, 2:Z). Returns -1 if the axis is invalid.

◆ getDisplacement()

Number getDisplacement ( )

Returns the axis displacement.

◆ getEffectiveAxis()

Vector getEffectiveAxis ( )

Returns the effective axis direction. Flipped for head.

◆ getHomePosition()

Number getHomePosition ( )

Returns the axis home position.

◆ getMaximumFeed()

Number getMaximumFeed ( )

Returns the maximum feed of the axis.

◆ getName()

String getName ( )

Returns the identifier for the axis.

◆ getOffset()

Vector getOffset ( )

Returns the axis offset.

◆ getPreference()

Integer getPreference ( )

Returns the angle/offset preference.

0: don't care. 1: prefer positive angles/offsets. -1: prefer negative angles/offsets.

◆ getRange()

Range getRange ( )

Returns the range of the axis coordinate.

◆ getRapidFeed()

Number getRapidFeed ( )

Returns the rapid feed of the axis.

◆ getReset()

Integer getReset ( )

Returns the axis reset behavior.

0: disabled. 1: reset to 0 at new operation. 2: reset to 0 at rewind.. 3: reset to 0 at new operation and at rewind.

◆ getResolution()

Number getResolution ( )

Returns the resolution of the axis.

◆ getResolutionError()

Number getResolutionError ( Number  _value)

Returns the signed resolution error for the specified axis value.

◆ isAggregate()

Boolean isAggregate ( )

Returns true if the axes is a fixed aggregate. That is, the axis is fixed at the given position.

◆ isCyclic()

Boolean isCyclic ( )

Returns true if the axis is cyclic. Only supported for rotational axes.

◆ isEnabled()

Boolean isEnabled ( )

Returns true if the axis is valid.

  1. The axis is non-degenerate.
  2. The coordinate is in the range [0; 2].
  3. The resolution must be >= 0.

◆ isHead()

Boolean isHead ( )

Returns true if the axis is a head axis.

◆ isLinear()

Boolean isLinear ( )

Returns true if the actuator is linear.

◆ isRotational()

Boolean isRotational ( )

Returns true if the actuator is rotational.

◆ isSupported()

Boolean isSupported ( Number  value)

Returns true if the specified angle/offset is within the required range.

Parameters
valueThe coordinate (angular for rotational axis and spatial for linear axis).

◆ isTable()

Boolean isTable ( )

Returns true if the axis is a table axis.

◆ isTCPEnabled()

Boolean isTCPEnabled ( )

Returns true if TCP is enabled for the rotary axis.

◆ reduce()

Number reduce ( Number  value)

Returns the reduced angle closest to 0 but restricted to the supported range. Actuator must be rotational.

Parameters
valueThe axis coordinate.
Returns
The output is in the range ]-PI; PI] unless axis is restricted to range.

◆ remapToRange()

Number remapToRange ( Number  angle)

Returns the preferred angle in the allowed range. An exception is raised if no valid angle exists. Actuator must be rotational.

◆ remapToRange2()

Number remapToRange2 ( Number  angle,
Number  current 
)

Returns the preferred angle in the allowed range closest to the current angle. An exception is raised if no valid angle exists. Actuator must be rotational.

◆ setActuator()

setActuator ( Integer  actuator)

Sets the actuator type.

0: linear actuator. 1: rotational actuator.

◆ setMaximumFeed()

setMaximumFeed ( Number  _maximumFeed)

Sets the maximum feed of the axis.

◆ setName()

setName ( String  name)

Sets the identifier for the axis.

◆ setPreference()

setPreference ( Integer  preference)

Sets the angle/offset preference.

0: don't care -1: prefer negative angles/offsets. 1: prefer positive angles/offsets.

Parameters
preferenceThe preference.

◆ setRapidFeed()

setRapidFeed ( Number  _rapidFeed)

Sets the rapid feed of the axis.

◆ setReset()

setReset ( Integer  reset)

Sets the axis reset behavior.

0: disabled. 1: reset to 0 at new operation. 2: reset to 0 at rewind.. 3: reset to 0 at new operation and at rewind.

Parameters
resetThe reset behavior.

◆ setResolution()

setResolution ( Number  resolution)

Sets the resolution of the axis. Radians for rotational axis.



Generated by Autodesk, Inc. 19 April 2024
Copyright (c) 2012-2024 by Autodesk, Inc.