Table of Contents

Class MachiningEquipmentCollisionIndex

Namespace
Hi.Machining.MachiningEquipmentUtils
Assembly
HiMech.dll

Represents a collision index for machining equipment components. This class manages collision detection between different parts of the machining equipment.

public class MachiningEquipmentCollisionIndex : ICollisionIndex, IGetCollidable, IMakeXmlSource, IToXElement
Inheritance
MachiningEquipmentCollisionIndex
Implements
Inherited Members
Extension Methods

Constructors

MachiningEquipmentCollisionIndex(MachiningEquipment, string)

Initializes a new instance of the MachiningEquipmentCollisionIndex class with the specified equipment and key.

public MachiningEquipmentCollisionIndex(MachiningEquipment equipment, string key)

Parameters

equipment MachiningEquipment

The machining equipment to associate with this collision index.

key string

The key identifying the component in the collision system.

MachiningEquipmentCollisionIndex(string)

Initializes a new instance of the MachiningEquipmentCollisionIndex class with the specified key.

public MachiningEquipmentCollisionIndex(string key)

Parameters

key string

The key identifying the component in the collision system.

MachiningEquipmentCollisionIndex(XElement, IGetMachiningEquipment)

Initializes a new instance of the MachiningEquipmentCollisionIndex class from XML data.

public MachiningEquipmentCollisionIndex(XElement src, IGetMachiningEquipment equipment)

Parameters

src XElement

The XML element containing the collision index configuration.

equipment IGetMachiningEquipment

The equipment provider interface.

Fields

XName

Gets the XML element name for serialization.

public static string XName

Field Value

string

Properties

Anchor

Gets the anchor point for the component identified by this index.

public Anchor Anchor { get; }

Property Value

Anchor

Remarks

The anchor point returned depends on the component key:

  • Workpiece: Geometry anchor
  • Fixture: Geometry anchor
  • ToolHolder: Root anchor of the holder
  • CutterShank: Root anchor of the upper beam topo brick
  • CutterFlute: Root anchor of the shaper topo brick
  • Other: Machine tool component anchor

Equipment

Gets or sets the machining equipment associated with this collision index. When set, updates the component anchor and collidable based on the equipment's solid machining chain.

public IMachiningEquipment Equipment { get; set; }

Property Value

IMachiningEquipment

Key

Gets the key identifying the component in the collision system.

public string Key { get; }

Property Value

string

Methods

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetCollidable()

Gets the collidable object for the component identified by this index.

public ICollidable GetCollidable()

Returns

ICollidable

The collidable object representing the component's geometry. The type of collidable returned depends on the component key:

  • Workpiece: Runtime geometry
  • Fixture: Solid collidable
  • ToolHolder: Cylindroid or freeform holder solid
  • CutterShank: Upper beam topo brick solid
  • CutterFlute: Shaper topo brick solid
  • Other: Machine tool component collidable

GetHashCode()

Gets a hash code for the current object.

public override int GetHashCode()

Returns

int

A hash code for the current object.

MakeXmlSource(string, string, bool)

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

public 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.

ToXElement()

Get the XElement to represent the object.

public XElement ToXElement()

Returns

XElement

XElement to represent the object.