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
XElementThe XML element containing the equipment configuration.
baseDirectory
stringThe base directory for resolving relative file paths.
relFile
stringThe relative file path for XML serialization.
Properties
Asmb
Asmb of the entire equipment.
public Asmb Asmb { get; }
Property Value
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
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
CoolantHeatCondition
Gets or sets the coolant heat condition settings. This includes coolant temperature and heat transfer coefficients.
public CoolantHeatCondition CoolantHeatCondition { get; set; }
Property Value
Fixture
Fixture.
public Fixture Fixture { get; set; }
Property Value
MachiningTool
Milling tool.
public IMachiningTool MachiningTool { get; set; }
Property Value
SolidMachiningChain
Body of the equipment.
public ISolidMachiningChain SolidMachiningChain { get; set; }
Property Value
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
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
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
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
Workpiece
Workpiece.
public Workpiece Workpiece { get; set; }
Property Value
XName
Name for XML IO.
public static string XName { get; }
Property Value
Methods
Detect(bool)
Performs collision detection.
public MechCollisionResult Detect(bool addFluteAndWorkpieceDetection)
Parameters
addFluteAndWorkpieceDetection
boolWhether 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
BindBind 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
Box3dDestination 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()
Get MachiningEquipment.
public MachiningEquipment GetMillingEquipment()
Returns
GetProgramCl()
public DVec3d GetProgramCl()
Returns
- DVec3d
CL
GetRootAnchor()
Get root anchor.
public Anchor GetRootAnchor()
Returns
- Anchor
root anchor.
GetSolidMachiningChain()
Get ISolidMachiningChain.
public ISolidMachiningChain GetSolidMachiningChain()
Returns
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
stringThe base directory for resolving relative paths
relFile
stringThe 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
inttoolHouse
MachiningToolHouse
Exceptions
- ToolNotFoundException
Throw If
toolId
does not exist ontoolHouse
.
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
WorkpieceChanged
Event that is raised when the workpiece is changed.
public event Action<SeqPair<Workpiece>> WorkpieceChanged
Event Type
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.