Class MachineEvaluatorHelper
Helper methods for ICamApiMachineEvaluator
Inherited Members
Namespace: CAMAPI.DotnetHelper
Assembly: CAMAPI.DotnetHelper.dll
Syntax
public static class MachineEvaluatorHelper
Methods
AxisCount(ComWrapper<ICamApiMachineEvaluator>)
Number of machine axes
Declaration
public static int AxisCount(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom |
Returns
| Type | Description |
|---|---|
| int |
CalcNextPos(ComWrapper<ICamApiMachineEvaluator>, TST5DPoint, bool, bool, bool)
Calculate machine position by 5D point and AngleAroundTool. Result in NextPos
Declaration
public static bool CalcNextPos(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom, TST5DPoint p, bool alternate, bool checkAllVariants, bool ignoreRailsLimits)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom | Machine evaluator |
| TST5DPoint | p | 5D point |
| bool | alternate | take alternative solution |
| bool | checkAllVariants | check all solutions |
| bool | ignoreRailsLimits | ignore rails limits |
Returns
| Type | Description |
|---|---|
| bool | true if succeeded |
CalcNextPos5D(ComWrapper<ICamApiMachineEvaluator>, TST5DPoint, bool, bool, bool)
Calculate machine position by 5D point. Result in NextPos
Declaration
public static bool CalcNextPos5D(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom, TST5DPoint p, bool alternate, bool checkAllVariants, bool ignoreRailsLimits)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom | Machine evaluator |
| TST5DPoint | p | 5D point |
| bool | alternate | take alternative solution |
| bool | checkAllVariants | check all solutions |
| bool | ignoreRailsLimits | ignore rails limits |
Returns
| Type | Description |
|---|---|
| bool | true if succeeded |
CalcNextPos6D(ComWrapper<ICamApiMachineEvaluator>, TST3DMatrix, bool, bool)
Calculate machine position by 6D point. Result in NextPos
Declaration
public static bool CalcNextPos6D(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom, TST3DMatrix p, bool alternate, bool checkAllVariants)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom | Machine evaluator |
| TST3DMatrix | p | 6D point |
| bool | alternate | take alternative solution |
| bool | checkAllVariants | check all solutions |
Returns
| Type | Description |
|---|---|
| bool | true if succeeded |
GeomToNC(ComWrapper<ICamApiMachineEvaluator>, TST3DMatrix)
Convert matrix from geometry to NC coordinates
Declaration
public static TST3DMatrix GeomToNC(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom, TST3DMatrix matrix)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom | |
| TST3DMatrix | matrix |
Returns
| Type | Description |
|---|---|
| TST3DMatrix |
GetAbsoluteMatrix(ComWrapper<ICamApiMachineEvaluator>)
Get the absolute position of the current tool's coordinate system relative to the current workpiece coordinate system
Declaration
public static TST3DMatrix GetAbsoluteMatrix(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom |
Returns
| Type | Description |
|---|---|
| TST3DMatrix |
GetAxisDefined(ComWrapper<ICamApiMachineEvaluator>, int)
Whether the axis at the given index has a defined value
Declaration
public static bool GetAxisDefined(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom | |
| int | index |
Returns
| Type | Description |
|---|---|
| bool |
GetAxisInfo(ComWrapper<ICamApiMachineEvaluator>, int)
Static information about the axis at the given index (0..AxisCount-1)
Declaration
public static TCamApiMachineAxisInfo GetAxisInfo(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom | |
| int | index |
Returns
| Type | Description |
|---|---|
| TCamApiMachineAxisInfo |
GetAxisValue(ComWrapper<ICamApiMachineEvaluator>, int)
Current value of the axis at the given index (0..AxisCount-1)
Declaration
public static double GetAxisValue(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom | |
| int | index |
Returns
| Type | Description |
|---|---|
| double |
GetCurrentWorkpieceCSID(ComWrapper<ICamApiMachineEvaluator>)
Returns the current workpiece CS (G54) identifier, e.g. "G54"
Declaration
public static string GetCurrentWorkpieceCSID(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom |
Returns
| Type | Description |
|---|---|
| string |
GetCurrentWorkpieceCSMatrix(ComWrapper<ICamApiMachineEvaluator>)
Returns the current workpiece CS (G54) matrix relative to the workpiece connector
Declaration
public static TST3DMatrix GetCurrentWorkpieceCSMatrix(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom |
Returns
| Type | Description |
|---|---|
| TST3DMatrix |
GetCurrentWorkpieceCSWorldMatrix(ComWrapper<ICamApiMachineEvaluator>)
Returns the current workpiece CS (G54) matrix relative to the world CS. The result depends on TCPM mode.
Declaration
public static TST3DMatrix GetCurrentWorkpieceCSWorldMatrix(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom |
Returns
| Type | Description |
|---|---|
| TST3DMatrix |
GetFlip(ComWrapper<ICamApiMachineEvaluator>, TCamApiRobotFlip)
Robot joint configuration flag: false - direct, true - inverted
Declaration
public static bool GetFlip(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom, TCamApiRobotFlip flip)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom | |
| TCamApiRobotFlip | flip |
Returns
| Type | Description |
|---|---|
| bool |
GetRailControlMode(ComWrapper<ICamApiMachineEvaluator>, int)
How the redundant rail at the given index (0..RailCount-1) is resolved
Declaration
public static TCamApiRailControlMode GetRailControlMode(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom | |
| int | index |
Returns
| Type | Description |
|---|---|
| TCamApiRailControlMode |
GetWorldWorkpieceConnectorMatrix(ComWrapper<ICamApiMachineEvaluator>, int)
Get the world position of workpiece connector with specific index
Declaration
public static TST3DMatrix GetWorldWorkpieceConnectorMatrix(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom, int workpieceConnectorIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom | Machine evaluator |
| int | workpieceConnectorIndex | Index of the workpiece connector |
Returns
| Type | Description |
|---|---|
| TST3DMatrix |
IsRobot(ComWrapper<ICamApiMachineEvaluator>)
Whether the machine schema is a robot (robot flips and rails apply)
Declaration
public static bool IsRobot(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom |
Returns
| Type | Description |
|---|---|
| bool |
NCToGeom(ComWrapper<ICamApiMachineEvaluator>, TST3DMatrix)
Convert matrix from NC to geometry coordinates
Declaration
public static TST3DMatrix NCToGeom(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom, TST3DMatrix matrix)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom | |
| TST3DMatrix | matrix |
Returns
| Type | Description |
|---|---|
| TST3DMatrix |
NextPosOutOfLimits(ComWrapper<ICamApiMachineEvaluator>)
True when the position found by the last CalcNextPos call is unreachable: either no solution was found, or an axis, a robot joint or a positioner axis is beyond its limit. This is the same check that turns an axis value red in the machine control panel.
Declaration
public static bool NextPosOutOfLimits(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom |
Returns
| Type | Description |
|---|---|
| bool |
PutNextPosInLimits(ComWrapper<ICamApiMachineEvaluator>)
Bring the position computed by CalcNextPos into the axis travel limits. False when no in-limits solution exists
Declaration
public static bool PutNextPosInLimits(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom |
Returns
| Type | Description |
|---|---|
| bool |
RailCount(ComWrapper<ICamApiMachineEvaluator>)
Number of redundant robot rail axes
Declaration
public static int RailCount(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom |
Returns
| Type | Description |
|---|---|
| int |
SetAxisDefined(ComWrapper<ICamApiMachineEvaluator>, int, bool)
Mark the axis at the given index as defined or undefined, without changing its value
Declaration
public static void SetAxisDefined(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom, int index, bool defined)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom | |
| int | index | |
| bool | defined |
SetAxisValue(ComWrapper<ICamApiMachineEvaluator>, int, double)
Set the value of the axis at the given index (0..AxisCount-1) and mark it defined
Declaration
public static void SetAxisValue(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom, int index, double value)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom | |
| int | index | |
| double | value |
SetFlip(ComWrapper<ICamApiMachineEvaluator>, TCamApiRobotFlip, bool)
Set the robot joint configuration flag. Affects the solution picked by CalcNextPos
Declaration
public static void SetFlip(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom, TCamApiRobotFlip flip, bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom | |
| TCamApiRobotFlip | flip | |
| bool | value |
SetNextPos(ComWrapper<ICamApiMachineEvaluator>, bool)
Set the machine to the position by the previous call of CalcNextPos
Declaration
public static void SetNextPos(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom, bool rotaryOnly)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom | Machine evaluator |
| bool | rotaryOnly | If true, only rotary axes are moved |
SetRailControlMode(ComWrapper<ICamApiMachineEvaluator>, int, TCamApiRailControlMode)
Set how the redundant rail at the given index is resolved
Declaration
public static void SetRailControlMode(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom, int index, TCamApiRailControlMode mode)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom | |
| int | index | |
| TCamApiRailControlMode | mode |
SetTCPMEnabled(ComWrapper<ICamApiMachineEvaluator>, bool)
Set state of the Tool center point management (TCPM) mode
Declaration
public static void SetTCPMEnabled(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom, bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom | |
| bool | value |
TCPMEnabled(ComWrapper<ICamApiMachineEvaluator>)
Current state of the Tool center point management (TCPM) mode
Declaration
public static bool TCPMEnabled(this ComWrapper<ICamApiMachineEvaluator> evaluatorCom)
Parameters
| Type | Name | Description |
|---|---|---|
| ComWrapper<ICamApiMachineEvaluator> | evaluatorCom |
Returns
| Type | Description |
|---|---|
| bool |