Class XyzabcUtil
Utility of XYZABC device.
public static class XyzabcUtil
- Inheritance
-
XyzabcUtil
- Inherited Members
Methods
BuildAnchorToSolid(Dictionary<Anchor, Solid>, List<Anchor>, Dictionary<string, Solid>)
Builds a dictionary mapping anchors to solids.
public static void BuildAnchorToSolid(this Dictionary<Anchor, Solid> dstAnchorToSolidDictionary, List<Anchor> anchors, Dictionary<string, Solid> keyToSolid)
Parameters
dstAnchorToSolidDictionaryDictionary<Anchor, Solid>The destination dictionary to populate
anchorsList<Anchor>List of anchors
keyToSolidDictionary<string, Solid>Dictionary mapping anchor names to solids
GenerateCollisionIndexPairs(IXyzabcChain)
Generate collision index pairs for the XYZABC chain.
public static List<CollisionIndexPair> GenerateCollisionIndexPairs(this IXyzabcChain xyzabcChain)
Parameters
xyzabcChainIXyzabcChainThe XYZABC chain
Returns
- List<CollisionIndexPair>
List of collision index pairs
Remarks
The pairs are read off the two anchor chains from the ground anchor to the tool end and to
the worktable end, so both end anchors must resolve; a chain missing one fails through
RequireEndAnchors(IXyzabcChain) with the keyword named. This is the first consumer on the
machine-file load path when the file says AutoGenerate.
Exceptions
- InvalidOperationException
An end anchor is missing.
GetMc(IXyzabcChain, out DVec3d)
Get machine coordinates.
public static void GetMc(this IXyzabcChain device, out DVec3d mc)
Parameters
deviceIXyzabcChainThe XYZABC device
mcDVec3dOutput machine coordinate as DVec3d
GetMc(IXyzabcChain, out double, out double, out double, out double, out double, out double)
Get machine coordinates. The output value set to NAN if the corresponding transformer does not exist.
public static void GetMc(this IXyzabcChain device, out double mcX, out double mcY, out double mcZ, out double mcA, out double mcB, out double mcC)
Parameters
deviceIXyzabcChaindevice
mcXdoublemachine coordinate X
mcYdoublemachine coordinate Y
mcZdoublemachine coordinate Z
mcAdoublemachine coordinate A (rad)
mcBdoublemachine coordinate B (rad)
mcCdoublemachine coordinate C (rad)
GetMcAbc_rad(IXyzabcChain, out Abc)
Get machine coordinates. The output value set to NAN if the corresponding transformer does not exist.
public static void GetMcAbc_rad(this IXyzabcChain device, out Abc mcAbc_rad)
Parameters
deviceIXyzabcChaindevice
mcAbc_radAbcOutput machine coordinates ABC in radians
GetMcXyzabc(IXyzabcChain)
Get machine coordinates as DVec3d.
public static DVec3d GetMcXyzabc(this IXyzabcChain device)
Parameters
deviceIXyzabcChainThe XYZABC device
Returns
- DVec3d
Machine coordinate as DVec3d. ABC in rad.
GetNp(IXyzabcChain)
Get normal and position from Hi.Numerical.Xyzabc.IXyzabcChain.GetChainBegin to Hi.Numerical.Xyzabc.IXyzabcChain.GetChainEnd.
public static DVec3d GetNp(this IXyzabcChain src)
Parameters
srcIXyzabcChainsrc
Returns
- DVec3d
normal and position
GetTransformationMat4d(IXyzabcChain)
Get transformation matrix from Hi.Numerical.Xyzabc.IXyzabcChain.GetChainBegin to Hi.Numerical.Xyzabc.IXyzabcChain.GetChainEnd.
public static Mat4d GetTransformationMat4d(this IXyzabcChain src)
Parameters
srcIXyzabcChainsrc
Returns
- Mat4d
transformation matrix
RequireEndAnchor(IXyzabcChain, IGetAnchor, string, string)
Fails with the name of the missing end anchor instead of with a NullReferenceException somewhere past it.
public static void RequireEndAnchor(this IXyzabcChain src, IGetAnchor buckle, string keyword, string role)
Parameters
srcIXyzabcChainThe chain being validated.
buckleIGetAnchorThe end anchor accessor to validate.
keywordstringThe exact anchor name the chain requires,
torw.rolestringThe end's role, for the message.
Remarks
The topology keyword vocabulary is matched exactly — see
UpdateByMechanism() — so a chain whose end anchor is spelled
in another letter case has no end anchor at all. That is the one cause worth naming outright,
because nothing else in the application points at letter case. Every consumer that
dereferences a buckle unconditionally should pass through here first; the two today are
GenerateCollisionIndexPairs(IXyzabcChain) (the machine-file load path, where
AutoGenerate collision pairs walk from the ground anchor to each end) and
ReflectedXyzabcChain (the solver).
Exceptions
- InvalidOperationException
The chain carries no such end anchor.
RequireEndAnchors(IXyzabcChain)
Requires both end anchors — the worktable end w and the tool end t — with
RequireEndAnchor(IXyzabcChain, IGetAnchor, string, string).
public static void RequireEndAnchors(this IXyzabcChain src)
Parameters
srcIXyzabcChainThe chain being validated.
Exceptions
- InvalidOperationException
Either end anchor is missing.
SetMc(IXyzabcChain, DVec3d)
Set machine coordinate.
public static void SetMc(this IXyzabcChain device, DVec3d mc)
Parameters
deviceIXyzabcChaindevice
mcDVec3dmachine coordinate
SetMc(IXyzabcChain, Vec3d)
Set machine coordinate.
public static void SetMc(this IXyzabcChain device, Vec3d mcXyz)
Parameters
deviceIXyzabcChaindevice
mcXyzVec3dMachine coordinate XYZ
SetMc(IXyzabcChain, double, double, double)
Set machine coordinate. The input value do no effect if the corresponding transformer does not exist.
public static void SetMc(this IXyzabcChain device, double mcX, double mcY, double mcZ)
Parameters
deviceIXyzabcChaindevice
mcXdoublemachine coordinate X
mcYdoublemachine coordinate Y
mcZdoublemachine coordinate Z
SetMc(IXyzabcChain, double, double, double, double, double, double)
Set machine coordinate. The input value do no effect if the corresponding transformer does not exist.
public static void SetMc(this IXyzabcChain device, double mcX, double mcY, double mcZ, double mcA, double mcB, double mcC)
Parameters
deviceIXyzabcChaindevice
mcXdoublemachine coordinate X
mcYdoublemachine coordinate Y
mcZdoublemachine coordinate Z
mcAdoublemachine coordinate A
mcBdoublemachine coordinate B
mcCdoublemachine coordinate C
SetMcAbc_rad(IXyzabcChain, Vec3d)
Set machine coordinate. The input value do no effect if the corresponding transformer does not exist.
public static void SetMcAbc_rad(this IXyzabcChain device, Vec3d mcAbc_rad)
Parameters
deviceIXyzabcChaindevice
mcAbc_radVec3dMachine coordinate ABC in radians