Class Workpiece
- Namespace
- Hi.NcMech.Workpieces
- Assembly
- HiMech.dll
Workpiece configuration data model.
public class Workpiece : IGetAnchor, IGetTopoIndex, IGetCuttingPara, IMakeXmlSource
- Inheritance
-
Workpiece
- Implements
- Inherited Members
- Extension Methods
Remarks
Workpiece holds the persistent/serializable configuration. Runtime geometry, caching, diff calculation, defect scanning, display and collision are managed by WorkpieceService.
Constructors
Workpiece()
Initializes a new instance of the Workpiece class.
public Workpiece()
Workpiece(XElement, string, string, IProgress<object>)
Initializes a new instance of the Workpiece class.
public Workpiece(XElement src, string baseDirectory, string relFile, IProgress<object> progress)
Parameters
srcXElementXML element source.
baseDirectorystringBase directory.
relFilestringRelative file path.
progressIProgress<object>
Properties
Asmb
Asmb.
public Asmb Asmb { get; }
Property Value
CollidableName
Collidable name.
public string CollidableName { get; }
Property Value
CuttingPara
Milling parameters.
public ICuttingPara CuttingPara { get; set; }
Property Value
CuttingParaFile
File path for milling parameters.
public string CuttingParaFile { get; set; }
Property Value
FixtureBuckle
Buckle anchor.
public Anchor FixtureBuckle { get; }
Property Value
FixtureToProgramZeroMat4d
Matrix transformation from fixture to program zero.
public Mat4d FixtureToProgramZeroMat4d { get; }
Property Value
GeomAnchor
Anchor of workpiece geometry.
public Anchor GeomAnchor { get; }
Property Value
IdealGeom
Ideal geometry representation.
public IGetStl IdealGeom { get; set; }
Property Value
InitGeom
Raw geometry for initiate.
public IMakeXmlSource InitGeom { get; set; }
Property Value
InitResolution
Resolution for initialization.
public double InitResolution { get; set; }
Property Value
ProgramZeroAnchor
Anchor of geometry zero and cutter location zero.
public Anchor ProgramZeroAnchor { get; }
Property Value
WorkpieceGeomToFixtureBuckleBranch
Branch connecting workpiece geometry to fixture buckle.
public Branch WorkpieceGeomToFixtureBuckleBranch { get; }
Property Value
WorkpieceGeomToFixtureBuckleTransformer
Transformer connecting workpiece geometry to fixture buckle.
public ITransformer WorkpieceGeomToFixtureBuckleTransformer { get; set; }
Property Value
WorkpieceGeomToProgramZeroBranch
Branch connecting workpiece geometry to program zero.
public Branch WorkpieceGeomToProgramZeroBranch { get; }
Property Value
WorkpieceGeomToProgramZeroTransformer
Transformer connecting workpiece geometry to program zero.
public ITransformer WorkpieceGeomToProgramZeroTransformer { get; set; }
Property Value
WorkpieceMaterial
Workpiece material.
public WorkpieceMaterial WorkpieceMaterial { get; set; }
Property Value
WorkpieceMaterialFile
File path for workpiece material.
public string WorkpieceMaterialFile { get; set; }
Property Value
XName
Name for XML IO.
public static string XName { get; }
Property Value
Methods
GetAnchor()
Get key anchor. (i.e. root anchor)
public Anchor GetAnchor()
Returns
- Anchor
key anchor
GetCuttingPara()
Get ICuttingPara.
public ICuttingPara GetCuttingPara()
Returns
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.