Table of Contents

Class FluteContour

Namespace
Hi.Milling.FluteContours
Assembly
HiMech.dll

Represents a flute contour for milling tools.

public class FluteContour : IMakeXmlSource, IDisposable, IClearCache
Inheritance
FluteContour
Implements
Inherited Members
Extension Methods

Constructors

FluteContour()

Initializes a new instance of the FluteContour class

public FluteContour()

FluteContour(FluteContour, double)

Initializes a new instance of the FluteContour class that shares the base contours of a source flute at another angular position

public FluteContour(FluteContour src, double fluteOffsetAngle_rad)

Parameters

src FluteContour

The source flute contour to copy from

fluteOffsetAngle_rad double

The flute offset angle in radians

FluteContour(XElement, string, IProgress<IMessage>, object[])

Initializes a new instance of the FluteContour class from XML data

public FluteContour(XElement src, string baseDirectory, IProgress<IMessage> progress, object[] res)

Parameters

src XElement

The source XML element

baseDirectory string

The base directory for resolving relative paths

progress IProgress<IMessage>

Progress reporter for diagnostic messages emitted during construction.

res object[]

Additional resources for initialization

Properties

BaseBottomContour

Gets or sets the base bottom contour of the flute. This represents the original bottom profile before any transformations.

public IWorkingContour BaseBottomContour { get; set; }

Property Value

IWorkingContour

BaseSideContour

Gets or sets the base side contour of the flute. This represents the original side profile before any transformations.

public IWorkingContour BaseSideContour { get; set; }

Property Value

IWorkingContour

FluteOffsetAngle_deg

Gets or sets the flute offset angle in degrees. This is a convenience property that converts FluteOffsetAngle_rad to degrees.

public double FluteOffsetAngle_deg { get; set; }

Property Value

double

FluteOffsetAngle_rad

Gets or sets the flute offset angle in radians: the angular position of this flute about the cutter axis, measured on the cutter body from the base contour's own position. It is a property of the cutter — how the cutter is turned in the holder is SetupAngle_deg.

public double FluteOffsetAngle_rad { get; set; }

Property Value

double

ShiftedBottomContour

Gets the shifted bottom contour of the flute. This is the bottom profile turned by the flute offset angle.

public ShiftedWorkingContour ShiftedBottomContour { get; }

Property Value

ShiftedWorkingContour

ShiftedSideContour

Gets the shifted side contour of the flute. This is the side profile turned by the flute offset angle.

public ShiftedWorkingContour ShiftedSideContour { get; }

Property Value

ShiftedWorkingContour

XName

Gets the XML name for serialization

public static string XName { get; }

Property Value

string

Methods

ClearCache()

Clears any cached data in the flute contour

public void ClearCache()

Dispose()

Releases all resources used by the FluteContour

public void Dispose()

Dispose(bool)

Releases the unmanaged resources used by the FluteContour and optionally releases the managed resources

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources

Duplicate(IGetZrList)

Creates a duplicate of this flute contour

public FluteContour Duplicate(IGetZrList zrListHost)

Parameters

zrListHost IGetZrList

The host containing Z-R list information

Returns

FluteContour

A new instance of FluteContour with the same properties

ExpandToBox3d(ref box3d_t)

Expands the given bounding box to include this flute contour

public void ExpandToBox3d(ref box3d_t dst)

Parameters

dst box3d_t

The bounding box to expand

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.

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

factory XFactory

UpdateByContent()

Updates the internal state based on the current content

public void UpdateByContent()