Table of Contents

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

src XElement

XML element source.

baseDirectory string

Base directory.

relFile string

Relative file path.

progress IProgress<object>

Properties

Asmb

Asmb.

public Asmb Asmb { get; }

Property Value

Asmb

CollidableName

Collidable name.

public string CollidableName { get; }

Property Value

string

CuttingPara

Milling parameters.

public ICuttingPara CuttingPara { get; set; }

Property Value

ICuttingPara

CuttingParaFile

File path for milling parameters.

public string CuttingParaFile { get; set; }

Property Value

string

FixtureBuckle

Buckle anchor.

public Anchor FixtureBuckle { get; }

Property Value

Anchor

FixtureToProgramZeroMat4d

Matrix transformation from fixture to program zero.

public Mat4d FixtureToProgramZeroMat4d { get; }

Property Value

Mat4d

GeomAnchor

Anchor of workpiece geometry.

public Anchor GeomAnchor { get; }

Property Value

Anchor

IdealGeom

Ideal geometry representation.

public IGetStl IdealGeom { get; set; }

Property Value

IGetStl

InitGeom

Raw geometry for initiate.

public IMakeXmlSource InitGeom { get; set; }

Property Value

IMakeXmlSource

InitResolution

Resolution for initialization.

public double InitResolution { get; set; }

Property Value

double

ProgramZeroAnchor

Anchor of geometry zero and cutter location zero.

public Anchor ProgramZeroAnchor { get; }

Property Value

Anchor

WorkpieceGeomToFixtureBuckleBranch

Branch connecting workpiece geometry to fixture buckle.

public Branch WorkpieceGeomToFixtureBuckleBranch { get; }

Property Value

Branch

WorkpieceGeomToFixtureBuckleTransformer

Transformer connecting workpiece geometry to fixture buckle.

public ITransformer WorkpieceGeomToFixtureBuckleTransformer { get; set; }

Property Value

ITransformer

WorkpieceGeomToProgramZeroBranch

Branch connecting workpiece geometry to program zero.

public Branch WorkpieceGeomToProgramZeroBranch { get; }

Property Value

Branch

WorkpieceGeomToProgramZeroTransformer

Transformer connecting workpiece geometry to program zero.

public ITransformer WorkpieceGeomToProgramZeroTransformer { get; set; }

Property Value

ITransformer

WorkpieceMaterial

Workpiece material.

public WorkpieceMaterial WorkpieceMaterial { get; set; }

Property Value

WorkpieceMaterial

WorkpieceMaterialFile

File path for workpiece material.

public string WorkpieceMaterialFile { get; set; }

Property Value

string

XName

Name for XML IO.

public static string XName { get; }

Property Value

string

Methods

GetAnchor()

Get key anchor. (i.e. root anchor)

public Anchor GetAnchor()

Returns

Anchor

key anchor

GetCuttingPara()

public ICuttingPara GetCuttingPara()

Returns

ICuttingPara

ICuttingPara

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.