Class SetupEquipment
- Namespace
- Hi.Machining.MachiningEquipmentUtils
- Assembly
- HiMech.dll
The authored (setup) face of the machining equipment: the machine chain, workpiece, fixture, environment data and the Setup-page tool selection, with the project XML IO. This is the ONLY face that persists — the runtime face (MachiningEquipment) is materialised from it and never serialized, so a mid-run save can no longer write live poses or the runner-equipped tool into the project file.
The XML wire name stays "MachiningEquipment" (see XName):
shipped project files keep their layout, only the deserialized object changed.
public class SetupEquipment : IMachiningEquipment, IDisplayee, IExpandToBox3d, IGetAnchoredDisplayeeList, IGetProgramCl, IGetAsmb, IGetAnchor, IGetTopoIndex, IGetMachiningChain, IMakeXmlSource
- Inheritance
-
SetupEquipment
- Implements
- Inherited Members
- Extension Methods
Constructors
SetupEquipment()
Ctor.
public SetupEquipment()
SetupEquipment(XElement, string, string, IProgress<IMessage>)
Initializes a new instance of the SetupEquipment class from XML data.
public SetupEquipment(XElement src, string baseDirectory, string relFile, IProgress<IMessage> progress)
Parameters
srcXElementThe XML element containing the equipment configuration.
baseDirectorystringThe base directory for resolving relative file paths.
relFilestringThe relative file path for XML serialization.
progressIProgress<IMessage>Progress reporter for diagnostic messages emitted during construction.
Properties
Asmb
Asmb of the entire authored equipment topology.
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
CoolantHeatConditionFile
Gets or sets the file path of the coolant heat condition (WorkpieceMaterial pattern: when set, XML IO externalizes CoolantHeatCondition to this side-file; when null the condition serializes inline).
public string CoolantHeatConditionFile { get; set; }
Property Value
Fixture
Fixture.
public Fixture Fixture { get; set; }
Property Value
MachiningChain
Body of the equipment — the authored machine topology instance. The runtime face gets its own instance from MaterialiseMachiningEquipment(string, IProgress<IMessage>); the two never share graph objects (only leaf Solid geometry is shared).
public IMachiningChain MachiningChain { get; set; }
Property Value
MachiningChainFile
Gets or sets the file path of the solid machining chain. This is used for XML serialization and file management.
public string MachiningChainFile { get; set; }
Property Value
MachiningTool
The Setup-page selected tool (persisted as the project's
<MillingTool>). Never the tool-house instance itself — see
Tooling(int, MachiningToolHouse).
public IMachiningTool MachiningTool { 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
WorkpieceDisplayee
Displayee for workpiece rendering. Optional on the authored face — setup views typically draw the workpiece through their own display composition instead.
public IDisplayee WorkpieceDisplayee { get; set; }
Property Value
XName
Name for XML IO. Pinned to the shipped wire name
“MachiningEquipment” — the type was split off the runtime face,
the file layout was not.
public static string XName { get; }
Property Value
Methods
Display(Bind)
Display function called in DispEngine rendering loop.
public void Display(Bind bind)
Parameters
bindBindBind 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
dstBox3dDestination box
GetAnchor()
Get key anchor. (i.e. root anchor)
public Anchor GetAnchor()
Returns
- Anchor
key anchor
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.
GetProgramCl()
public DVec3d GetProgramCl()
Returns
- DVec3d
CL
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, 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
baseDirectorystringThe base directory for resolving relative paths
relFilestringThe relative file path for the XML source
exhibitionOnlyboolif 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.
MaterialiseMachiningEquipment(string, IProgress<IMessage>)
Builds the runtime face from this authored face: a fresh MachiningEquipment whose topology is an XML round-trip copy of this one (chain, fixture, workpiece, table transformer, tool), with the heavy machine-body and fixture Solid instances SHARED (this face keeps their lifecycle), axis poses copied, and the environment data stamped by reference. Information flows one way: the returned instance never writes back into this one.
public MachiningEquipment MaterialiseMachiningEquipment(string baseDirectory, IProgress<IMessage> progress)
Parameters
baseDirectorystringThe project base directory this equipment's relative paths (e.g. MachiningChainFile) resolve against.
progressIProgress<IMessage>Progress reporter for diagnostics during the copy.
Returns
- MachiningEquipment
The materialised runtime equipment.
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
factoryXFactory
Tooling(int, MachiningToolHouse)
Selects the Setup-page tool by toolId from
toolHouse. The authored face never hosts the
tool-house instance itself: the runtime face equips house instances
(and mutates their tessellation mid-run), and one tool's Asmb cannot
live in two topologies — so this hosts a private duplicate.
Clear the selection (“do not show”) by setting
MachiningTool to null.
public bool Tooling(int toolId, MachiningToolHouse toolHouse)
Parameters
toolIdinttool ID
toolHouseMachiningToolHousetool house
Returns
- bool
true if the selection changed; otherwise, false.
Exceptions
- ToolNotFoundException
Throw If
toolIddoes not exist ontoolHouse.