Table of Contents

Class CustomSpinningProfile

Namespace
Hi.Milling.Cutters
Assembly
HiMech.dll

Represents a custom spinning profile for a milling cutter. This profile allows for custom geometry to be used as the cutter profile.

public class CustomSpinningProfile : IShaperProfile, IMakeXmlSource, IAbstractNote, IGetZrList, IGenStl, IGetStl, IDuplicate, IClearCache, IPolarResolution2dSourceProperty
Inheritance
CustomSpinningProfile
Implements
Inherited Members
Extension Methods

Constructors

CustomSpinningProfile(IGetStl)

Ctor

public CustomSpinningProfile(IGetStl geom)

Parameters

geom IGetStl

CustomSpinningProfile(XElement, string, params object[])

Initializes a new instance of the CustomSpinningProfile class.

public CustomSpinningProfile(XElement element, string baseDirectory, params object[] res)

Parameters

element XElement

The XML element containing profile data.

baseDirectory string

The base directory for resolving relative paths.

res object[]

Additional resolution parameters.

Properties

AbstractNote

Gets the abstract note describing the profile.

public string AbstractNote { get; }

Property Value

string

Geom

Gets or sets the geometry that defines the profile.

public IGetStl Geom { get; set; }

Property Value

IGetStl

PolarResolution2dSource

public Func<IPolarResolution2d> PolarResolution2dSource { get; set; }

Property Value

Func<IPolarResolution2d>

XName

Name for XML IO.

public static string XName { get; }

Property Value

string

Methods

ClearCache()

Clears any cached data.

public void ClearCache()

Duplicate(params object[])

Creates a deep copy of the object, excluding any source file references.

public object Duplicate(params object[] res)

Parameters

res object[]

Optional parameters that may be needed during the duplication process

Returns

object

A new instance that is a deep copy of the original object

GenStl(IPolarResolution2d)

Generate a new Stl.

public Stl GenStl(IPolarResolution2d resolution)

Parameters

resolution IPolarResolution2d

Returns

Stl

newly created Stl

GetStl()

Gets the STL mesh representation of the profile.

public Stl GetStl()

Returns

Stl

The STL mesh

GetZrList()

Gets the ZR contour list for the profile. This method attempts to get the ZR list from various geometry types.

public List<PairZr> GetZrList()

Returns

List<PairZr>

The list of ZR pairs

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.