Table of Contents

Class GeneralXyzabcChain

Namespace
Hi.Numerical.Xyzabc
Assembly
HiMech.dll

Represents a general XYZABC chain that can be constructed from a general mechanism.

public class GeneralXyzabcChain : IXyzabcChain, IGetXyzabcChain, IMachiningChain, IGetAsmb, IGetAnchor, IGetTopoIndex, IGetAnchorToSolidDictionary, IGetAnchoredDisplayeeList, IExpandToBox3d, IMakeXmlSource
Inheritance
GeneralXyzabcChain
Implements
Derived
Inherited Members
Extension Methods

Constructors

GeneralXyzabcChain(GeneralMechanism)

Initializes a new instance of the GeneralXyzabcChain class with the specified general mechanism.

public GeneralXyzabcChain(GeneralMechanism generalMechanism)

Parameters

generalMechanism GeneralMechanism

The general mechanism to use for the chain.

GeneralXyzabcChain(XElement, string, IProgress<IMessage>)

Initializes a new instance of the GeneralXyzabcChain class from XML.

public GeneralXyzabcChain(XElement src, string baseDirectory, IProgress<IMessage> progress)

Parameters

src XElement

The XML source element.

baseDirectory string

The base directory for resolving relative paths.

progress IProgress<IMessage>

Progress reporter for loading the nested mechanism.

Properties

Asmb

Asmb.

public Asmb Asmb { get; }

Property Value

Asmb

GeneralMechanism

The mechanism this chain reads — the entity holding the topology, transformers and solids. Assigning a different instance re-runs UpdateByMechanism().

public GeneralMechanism GeneralMechanism { get; set; }

Property Value

GeneralMechanism

GeneralMechanismFile

Gets or sets the file path for the general mechanism.

public string GeneralMechanismFile { get; set; }

Property Value

string

McCodes

Gets the machine coordinate code sequence for decoding the MC array.

public string[] McCodes { get; }

Property Value

string[]

McTransformers

Gets the machine coordinate transformers.

public IDynamicRegular[] McTransformers { get; }

Property Value

IDynamicRegular[]

TableBuckleTransformer

Gets or sets the static transformer for the table buckle. Hosted on the unique branch arriving at the “w” anchor; null when the mechanism has no such branch.

public IStaticTransformer TableBuckleTransformer { get; set; }

Property Value

IStaticTransformer

ToolBuckleTransformer

Gets or sets the static transformer for the tool buckle. Hosted on the unique branch arriving at the “t” anchor; null when the mechanism has no such branch.

public IStaticTransformer ToolBuckleTransformer { get; set; }

Property Value

IStaticTransformer

TransformerA

Transformer A.

public DynamicRotation TransformerA { get; }

Property Value

DynamicRotation

TransformerB

Transformer B.

public DynamicRotation TransformerB { get; }

Property Value

DynamicRotation

TransformerC

Transformer C.

public DynamicRotation TransformerC { get; }

Property Value

DynamicRotation

TransformerX

Transformer X.

public DynamicTranslation TransformerX { get; }

Property Value

DynamicTranslation

TransformerY

Transformer Y.

public DynamicTranslation TransformerY { get; }

Property Value

DynamicTranslation

TransformerZ

Transformer Z.

public DynamicTranslation TransformerZ { get; }

Property Value

DynamicTranslation

XName

Gets the XML element name for serialization.

public static string XName { get; }

Property Value

string

Methods

ExpandToBox3d(Box3d)

Expands the destination box. This function is usually used to compute the bounding box of elements.

public void ExpandToBox3d(Box3d dst)

Parameters

dst Box3d

Destination box

GetAnchor()

Get key anchor. (i.e. root anchor)

public Anchor GetAnchor()

Returns

Anchor

key anchor

GetAnchorToSolidDictionary()

Gets a dictionary that maps Anchor objects to their corresponding Solid objects.

public Dictionary<Anchor, Solid> GetAnchorToSolidDictionary()

Returns

Dictionary<Anchor, Solid>

A dictionary where keys are anchors and values are their associated solids.

GetAnchoredDisplayeeList()

Gets a list of anchored displayable objects.

public List<IAnchoredDisplayee> GetAnchoredDisplayeeList()

Returns

List<IAnchoredDisplayee>

A list of IAnchoredDisplayee objects

GetAsmb()

Gets the key asmb.

public Asmb GetAsmb()

Returns

Asmb

The key asmb.

GetTableBuckle()

Gets the table buckle anchor point.

public IGetAnchor GetTableBuckle()

Returns

IGetAnchor

The table buckle anchor point.

GetToolBuckle()

Gets the tool buckle anchor point.

public IGetAnchor GetToolBuckle()

Returns

IGetAnchor

The tool buckle anchor point.

GetTransformerA()

Get transformer A.

public DynamicRotation GetTransformerA()

Returns

DynamicRotation

transformer A

GetTransformerB()

Get transformer B.

public DynamicRotation GetTransformerB()

Returns

DynamicRotation

transformer B

GetTransformerC()

Get transformer C.

public DynamicRotation GetTransformerC()

Returns

DynamicRotation

transformer C

GetTransformerX()

Get transformer X.

public DynamicTranslation GetTransformerX()

Returns

DynamicTranslation

transformer X

GetTransformerY()

Get transformer Y.

public DynamicTranslation GetTransformerY()

Returns

DynamicTranslation

transformer Y

GetTransformerZ()

Get transformer Z.

public DynamicTranslation GetTransformerZ()

Returns

DynamicTranslation

transformer Z

GetXyzabcChain()

public IXyzabcChain GetXyzabcChain()

Returns

IXyzabcChain

IXyzabcChain

MakeXmlSource(string, string, bool)

Creates an XML representation of the object. This method may also generate additional resources such as related files.

public virtual XElement MakeXmlSource(string baseDirectory, string relFile, bool exhibitionOnly)

Parameters

baseDirectory string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

exhibitionOnly bool

if true, the extended file creation is suppressed.

Returns

XElement

An XML element representing the object's state

Remarks

For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied. The baseDirectory is typically the folder at the nearest configuration file folder. Since the folder can be moving with the configuration file.

Reg(XFactory)

Registers this type's deserializer with the given XFactory and chains Reg(factory) on dependents. Idempotent.

public static void Reg(XFactory factory = null)

Parameters

factory XFactory

UpdateByMechanism()

Updates the XYZABC chain components based on the current general mechanism.

public void UpdateByMechanism()

Remarks

Names are matched EXACTLY: the motion-axis branches are upper-case X / Y / Z / A / B / C, and the two end anchors are lower-case t (tool end) and w (worktable end). A name differing only in case names nothing, so the axis or buckle it was meant to be stays null. XyzabcUtil strips the same canonical spellings — O, base, t, w — when it generates the default collision pairs, so the vocabulary reads one way everywhere.