Table of Contents

Class MachiningEquipment

Namespace
Hi.Machining.MachiningEquipmentUtils
Assembly
HiMech.dll

Machining Equipment. Include the machining chain, workpiece, tool and fixture, etc..

public class MachiningEquipment : IMachiningEquipment, IDisplayee, IExpandToBox3d, IMakeXmlSource, IGetAnchoredDisplayeeList, IGetProgramCl, IGetAsmb, IGetTopoIndex, IGetRootAnchor, IGetMachiningChain, IGetSolidMachiningChain, IGetMachiningEquipment
Inheritance
MachiningEquipment
Implements
Inherited Members
Extension Methods

Constructors

MachiningEquipment()

Ctor.

public MachiningEquipment()

MachiningEquipment(XElement, string, string)

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

public MachiningEquipment(XElement src, string baseDirectory, string relFile)

Parameters

src XElement

The XML element containing the equipment configuration.

baseDirectory string

The base directory for resolving relative file paths.

relFile string

The relative file path for XML serialization.

Properties

Asmb

Asmb of the entire equipment.

public Asmb Asmb { get; }

Property Value

Asmb

BackgroundTemperature_C

Gets or sets the background temperature in Celsius. This is a convenience property that converts between Celsius and Kelvin.

public double BackgroundTemperature_C { get; set; }

Property Value

double

BackgroundTemperature_K

Gets or sets the background temperature in Kelvin. This represents the ambient temperature of the machining environment.

public double BackgroundTemperature_K { get; set; }

Property Value

double

CoolantHeatCondition

Gets or sets the coolant heat condition settings. This includes coolant temperature and heat transfer coefficients.

public CoolantHeatCondition CoolantHeatCondition { get; set; }

Property Value

CoolantHeatCondition

Fixture

Fixture.

public Fixture Fixture { get; set; }

Property Value

Fixture

MachiningTool

Milling tool.

public IMachiningTool MachiningTool { get; set; }

Property Value

IMachiningTool

SolidMachiningChain

Body of the equipment.

public ISolidMachiningChain SolidMachiningChain { get; set; }

Property Value

ISolidMachiningChain

SolidMachiningChainFile

Gets or sets the file path of the solid machining chain. This is used for XML serialization and file management.

public string SolidMachiningChainFile { get; set; }

Property Value

string

SpindleCapability

Gets or sets the spindle capability configuration. This defines the operational capabilities and limits of the spindle.

public SpindleCapability SpindleCapability { get; set; }

Property Value

SpindleCapability

SpindleCapabilityFile

Gets or sets the file path of the spindle capability configuration. This is used for XML serialization and file management.

public string SpindleCapabilityFile { get; set; }

Property Value

string

TableToComp

Transformer of the branch from table buckle to workpiece side buckle. Note that the workpiece side buckle links to Fixture if fixture exist; otherwise, it links to Workpiece if workpiece exist. If Workpiece either Fixture do not exist, this property makes no effect.

public ITransformer TableToComp { get; set; }

Property Value

ITransformer

Workpiece

Workpiece.

public Workpiece Workpiece { get; set; }

Property Value

Workpiece

XName

Name for XML IO.

public static string XName { get; }

Property Value

string

Methods

Detect(bool)

Performs collision detection.

public MechCollisionResult Detect(bool addFluteAndWorkpieceDetection)

Parameters

addFluteAndWorkpieceDetection bool

Whether to include flute and workpiece in detection.

Returns

MechCollisionResult

Significant collision result.

Display(Bind)

Display function called in DispEngine rendering loop.

public void Display(Bind bind)

Parameters

bind Bind

Bind with DispEngine. See Bind.

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

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.

GetMachiningChain()

Gets the machining chain instance.

public IMachiningChain GetMachiningChain()

Returns

IMachiningChain

The machining chain instance.

GetMillingEquipment()

public MachiningEquipment GetMillingEquipment()

Returns

MachiningEquipment

MachiningEquipment

GetProgramCl()

Get CL (Cutter Location). Where Point is tool tip position; Normal is tool orientation.

public DVec3d GetProgramCl()

Returns

DVec3d

CL

GetRootAnchor()

Get root anchor.

public Anchor GetRootAnchor()

Returns

Anchor

root anchor.

GetSolidMachiningChain()

public ISolidMachiningChain GetSolidMachiningChain()

Returns

ISolidMachiningChain

ISolidMachiningChain

GetToolTipXyzOnProgramZero()

Get tool tip xyz from workpiece geom anchor.

public Vec3d GetToolTipXyzOnProgramZero()

Returns

Vec3d

if no MachiningTool or no Workpiece equiping, return null; otherwise, return the XYZ from workpiece geomanchor to tool tip.

GetTransformFromRootToProgramZero()

Gets the transform matrix from the root coordinate system to the program zero coordinate system.

public Mat4d GetTransformFromRootToProgramZero()

Returns

Mat4d

A 4x4 transformation matrix representing the coordinate system transformation.

MakeXmlSource(string, string)

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)

Parameters

baseDirectory string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

Returns

XElement

An XML element representing the object's state

PrepareCollidableItems()

Prepares all collidable items for collision detection. This method should be called before performing collision detection.

public void PrepareCollidableItems()

ResetCollisionFlags()

Resets all collision flags to their default states. This should be called after collision detection is complete.

public void ResetCollisionFlags()

Tooling(int, MachiningToolHouse)

Set MachiningTool by toolId and toolHouse.

public void Tooling(int toolId, MachiningToolHouse toolHouse)

Parameters

toolId int
toolHouse MachiningToolHouse

Exceptions

ToolNotFoundException

Throw If toolId does not exist on toolHouse.

Events

MachiningChainChanged

Event that is raised when the machining chain is changed. Provides both the previous and new chain values.

public event Action<SeqPair<ISolidMachiningChain>> MachiningChainChanged

Event Type

Action<SeqPair<ISolidMachiningChain>>

WorkpieceChanged

Event that is raised when the workpiece is changed.

public event Action<SeqPair<Workpiece>> WorkpieceChanged

Event Type

Action<SeqPair<Workpiece>>

Remarks

This event is triggered whenever the workpiece property is modified. Subscribers can use this event to respond to changes in the workpiece configuration, such as updating visualizations or recalculating machining parameters. The event provides both the previous and new workpiece values through a SeqPair.