Table of Contents

Class Workpiece

Namespace
Hi.NcMech.Workpieces
Assembly
HiMech.dll

Workpiece.

public class Workpiece : IDisplayee, IExpandToBox3d, IDisposable, IGetRootAnchor, IGetAnchoredDisplayeeList, IAnchoredCollidableLeaf, IAnchoredCollidableNode, IAnchoredCollidableBased, ICollidable, IGetCuttingPara, IMakeXmlSource
Inheritance
Workpiece
Implements
Inherited Members
Extension Methods

Constructors

Workpiece()

Initializes a new instance of the Workpiece class.

public Workpiece()

Workpiece(XElement, string, string)

Initializes a new instance of the Workpiece class.

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

Parameters

src XElement

XML element source.

baseDirectory string

Base directory.

relFile string

Relative file path.

Properties

Asmb

Asmb.

public Asmb Asmb { get; }

Property Value

Asmb

BottomResolution

Resolution.

public double BottomResolution { get; }

Property Value

double

CollidableName

Gets the name of the collidable object.

public string CollidableName { get; }

Property Value

string

CollisionFlag

Gets or sets the collision flag.

public CollisionFlag CollisionFlag { get; set; }

Property Value

CollisionFlag

DiffRangeColorRule

Internal used.

public RangeColorRule DiffRangeColorRule { get; set; }

Property Value

RangeColorRule

DiffVisualRadius_mm

Visual radius for difference visualization.

public double DiffVisualRadius_mm { get; set; }

Property Value

double

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

HasDiff

Indicates whether there are differences between ideal and actual geometry.

public bool HasDiff { get; }

Property Value

bool

IdealGeom

Ideal geometry representation.

public IGetStl IdealGeom { get; set; }

Property Value

IGetStl

IdealGeomFaceDrawing

Gets the drawing representing the ideal geometry faces of the workpiece.

public Drawing IdealGeomFaceDrawing { get; }

Property Value

Drawing

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

IsRuntimeGeomInit

Indicates whether the runtime geometry is initialized.

public bool IsRuntimeGeomInit { get; }

Property Value

bool

MillingPara

Milling parameters.

public ICuttingPara MillingPara { get; set; }

Property Value

ICuttingPara

MillingParaFile

File path for milling parameters.

public string MillingParaFile { get; set; }

Property Value

string

ProgramZeroAnchor

Anchor of geometry zero and cutter location zero.

public Anchor ProgramZeroAnchor { get; }

Property Value

Anchor

RawGeomDrawing

Gets the drawing representing the raw geometry of the workpiece.

public Drawing RawGeomDrawing { get; }

Property Value

Drawing

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

ClearIdealGeomCache()

Clears the ideal geometry cache.

public void ClearIdealGeomCache()

ClearRawGeomCache()

Clears the raw geometry cache.

public void ClearRawGeomCache()

Diff(double, CancellationToken, Progress<IProgressReport>)

Calculates the difference between ideal and actual geometry.

public void Diff(double detectionRadius, CancellationToken token, Progress<IProgressReport> progress = null)

Parameters

detectionRadius double

Detection radius.

token CancellationToken

Cancellation token.

progress Progress<IProgressReport>

Progress reporting interface.

Display(Bind)

Display function called in DispEngine rendering loop.

public void Display(Bind bind)

Parameters

bind Bind

Bind with DispEngine. See Bind.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

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

GetAnchoredCollidableNode()

Gets the anchored collidable node associated with this object.

public IAnchoredCollidableNode GetAnchoredCollidableNode()

Returns

IAnchoredCollidableNode

The anchored collidable node.

GetAnchoredDisplayeeList()

Gets a list of anchored displayable objects.

public List<IAnchoredDisplayee> GetAnchoredDisplayeeList()

Returns

List<IAnchoredDisplayee>

A list of IAnchoredDisplayee objects

GetCollidableAnchor()

Gets the anchor associated with this collidable leaf.

public Anchor GetCollidableAnchor()

Returns

Anchor

The anchor for this collidable leaf.

GetCollidee()

Get ICollidee.

public ICollidee GetCollidee()

Returns

ICollidee

ICollidee

GetCuttingPara()

public ICuttingPara GetCuttingPara()

Returns

ICuttingPara

ICuttingPara

GetRootAnchor()

Get root anchor.

public Anchor GetRootAnchor()

Returns

Anchor

root anchor.

GetRuntimeGeom(CancellationToken, IProgress<IProgressReport>)

Gets the runtime geometry.

public CubeTree GetRuntimeGeom(CancellationToken token, IProgress<IProgressReport> progress = null)

Parameters

token CancellationToken

Cancellation token.

progress IProgress<IProgressReport>

Progress reporting interface.

Returns

CubeTree

Cube tree representing the runtime geometry.

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

ReadRuntimeGeom(string)

Reads the runtime geometry from a file.

public void ReadRuntimeGeom(string file)

Parameters

file string

Source file path.

ResetRuntimeGeom(ClStrip)

Resets the runtime geometry.

public void ResetRuntimeGeom(ClStrip clStrip)

Parameters

clStrip ClStrip

Cutter location strip.

WriteRuntimeGeom(string, CancellationToken, Progress<IProgressReport>)

Writes the runtime geometry to a file.

public void WriteRuntimeGeom(string file, CancellationToken token, Progress<IProgressReport> progress = null)

Parameters

file string

Target file path.

token CancellationToken

Cancellation token.

progress Progress<IProgressReport>

Progress reporting interface.