Table of Contents

Class FreeformCutter

Namespace
Hi.Machining
Assembly
HiMech.dll

Represents a freeform cutting tool that can be used in machining operations. This cutter type supports complex geometries for both the noble (upper) part and the shaper (cutting) part.

public class FreeformCutter : ICutter, IGetSweptable, IVolumeRemover, ITopoDisplayee, IGetAsmb, IGetTopoIndex, IAnchoredDisplayee, IGetRootAnchor, IDisplayee, IGetAnchoredDisplayeeList, IGetFletchBuckle, IMakeXmlSource, IAbstractNote, IAnchoredCollidableStem, IAnchoredCollidableNode, IAnchoredCollidableBased, IExpandToBox3d, IDuplicate, IDisposable, IClearCache
Inheritance
FreeformCutter
Implements
Inherited Members
Extension Methods

Remarks

The FreeformCutter class provides functionality for:

  • Managing complex cutting tool geometries
  • Supporting both spinning and non-spinning cutting operations
  • Handling collision detection and display
  • Managing tool assembly and anchoring
  • Supporting XML serialization and deserialization

Constructors

FreeformCutter()

Initializes a new instance of the FreeformCutter class.

public FreeformCutter()

Remarks

This constructor initializes the cutter with default settings and creates the necessary anchors and topology bricks for both the noble and shaper parts.

FreeformCutter(XElement, string, string, params object[])

Initializes a new instance of the FreeformCutter class from XML data.

public FreeformCutter(XElement src, string baseDirectory, string relFile, params object[] res)

Parameters

src XElement

The XML element containing the cutter data.

baseDirectory string

The base directory for resolving relative paths.

relFile string

The relative file path for resolving references.

res object[]

Additional resources for initialization.

Properties

AbstractNote

Gets a brief description of the cutter, including its height.

public string AbstractNote { get; }

Property Value

string

Remarks

The abstract note includes the cutter type and its height dimension, formatted as "Freeform-H{height}".

CollidableName

Gets the name used for collision detection purposes.

public string CollidableName { get; }

Property Value

string

CutterTip

Gets the cutter tip anchor point.

public Anchor CutterTip { get; }

Property Value

Anchor

Remarks

The cutter tip represents the reference point for the cutting edge or surface. This point is used for positioning and orientation calculations during machining operations.

IsSpinningCutter

Gets or sets a value indicating whether this is a spinning cutting tool.

public bool IsSpinningCutter { get; set; }

Property Value

bool

Remarks

This property affects how the cutter interacts with the workpiece during machining operations. Spinning cutters typically perform rotary cutting operations, while non-spinning cutters may be used for other types of machining.

NobleGeom

Gets or sets the noble (upper) part geometry of the cutter.

public IGetStl NobleGeom { get; set; }

Property Value

IGetStl

Remarks

The noble geometry represents the non-cutting portion of the tool, typically including the tool holder and shank. This geometry is important for collision checking and visualization.

ShaperGeom

Gets or sets the shaper (cutting) part geometry of the cutter.

public IGetStl ShaperGeom { get; set; }

Property Value

IGetStl

Remarks

The shaper geometry represents the cutting portion of the tool that directly interacts with the workpiece during machining operations.

ShaperTopoBrick

Gets the topology brick representing the shaper (cutting) part of the cutter.

public ITopoBrick ShaperTopoBrick { get; }

Property Value

ITopoBrick

UpperBeamTopoBrick

Gets the topology brick representing the upper (noble) part of the cutter.

public ITopoBrick UpperBeamTopoBrick { get; }

Property Value

ITopoBrick

XName

Name for XML IO.

public static string XName { get; }

Property Value

string

Methods

ClearCache()

Clears all cached data associated with the cutter.

public void ClearCache()

Remarks

This includes clearing the cached sweptable and solid representations of both the noble and shaper parts of the cutter.

Display(Bind)

Displays the cutter using the provided binding context.

public void Display(Bind bind)

Parameters

bind Bind

The binding context for display operations.

Dispose()

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

public void Dispose()

Dispose(bool)

Releases the unmanaged resources used by the FreeformCutter 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(params object[])

Creates a deep copy of the current FreeformCutter instance.

public object Duplicate(params object[] res)

Parameters

res object[]

Additional resources for duplication.

Returns

object

A new FreeformCutter instance with copied geometry data.

ExpandToBox3d(Box3d)

Expands the given bounding box to include the cutter's geometry.

public void ExpandToBox3d(Box3d dst)

Parameters

dst Box3d

The bounding box to expand.

GetAnchoredCollidableNode()

Gets the anchored collidable node associated with this object.

public IAnchoredCollidableNode GetAnchoredCollidableNode()

Returns

IAnchoredCollidableNode

The anchored collidable node.

GetAnchoredCollidables()

Gets the list of anchored collidable nodes contained by this stem.

public List<IAnchoredCollidableNode> GetAnchoredCollidables()

Returns

List<IAnchoredCollidableNode>

A list of anchored collidable nodes.

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.

GetFletchBuckle()

Get fletch buckle anchor. the anchor that generally connect to fixed part such as ground and triggering(motor)-side.

public Anchor GetFletchBuckle()

Returns

Anchor

buckle anchor

GetNobleAnchoredDisplayee()

Gets the noble (upper) part displayee for visualization purposes.

public AnchoredDisplayee GetNobleAnchoredDisplayee()

Returns

AnchoredDisplayee

An AnchoredDisplayee representing the noble part of the cutter with modified display properties.

Remarks

This method creates a display representation of the noble geometry with slightly darker coloring to distinguish it from the shaper part during visualization.

GetRootAnchor()

Get root anchor.

public Anchor GetRootAnchor()

Returns

Anchor

root anchor.

GetShaperDisplayee()

Gets the shaper displayee for visualization purposes.

public IAnchoredDisplayee GetShaperDisplayee()

Returns

IAnchoredDisplayee

An IAnchoredDisplayee representing the shaper (cutting) part of the cutter.

Remarks

This method creates a display representation of the shaper geometry, which can be either the raw geometry if it implements IDisplayee, or the topology brick representation.

GetSweptable(double)

Gets the sweptable representation of the cutter for swept volume calculations.

public Sweptable GetSweptable(double fractionTolerance)

Parameters

fractionTolerance double

The tolerance value for swept volume calculations.

Returns

Sweptable

A Sweptable object representing the cutter's swept volume, or null if the shaper geometry is not available.

Remarks

The sweptable representation is cached for performance. Use ClearCache to reset the cached data.

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