Table of Contents

Class ProfileMillingParaMap

Namespace
Hi.MillingForces.ProfileMillingParas
Assembly
HiMech.dll

Represents a mapping of milling parameters for profile milling operations. This class manages cutting parameters for both side and bottom milling operations.

public class ProfileMillingParaMap : ICuttingPara, IGetCuttingPara, IMakeXmlSource, INameNote
Inheritance
ProfileMillingParaMap
Implements
Inherited Members
Extension Methods

Constructors

ProfileMillingParaMap(LocalProfileMillingPara, LocalProfileMillingPara, bool)

Ctor for single LocalProfileMillingPara.

public ProfileMillingParaMap(LocalProfileMillingPara sidePara, LocalProfileMillingPara bottomPara = null, bool containUpperSide = false)

Parameters

sidePara LocalProfileMillingPara

milling parameter on side

bottomPara LocalProfileMillingPara

milling parameter on bottom

containUpperSide bool

Whether to include upper side parameters

ProfileMillingParaMap(ProfileMillingParaMap)

Copy ctor.

public ProfileMillingParaMap(ProfileMillingParaMap src)

Parameters

src ProfileMillingParaMap

src

ProfileMillingParaMap(int, int, int, bool)

Initializes a new instance of the ProfileMillingParaMap class with specified dimensions.

public ProfileMillingParaMap(int fluteNum, int yDivisionNum, int zDivisionNum, bool isUpperSideContained = false)

Parameters

fluteNum int

The number of flutes.

yDivisionNum int

The number of divisions in Y direction.

zDivisionNum int

The number of divisions in Z direction.

isUpperSideContained bool

Whether to include the upper side of the milling profile.

ProfileMillingParaMap(XElement, string, bool)

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

public ProfileMillingParaMap(XElement src, string baseDirectory, bool isRtaVersion)

Parameters

src XElement

The XML element containing the parameter data.

baseDirectory string

The base directory for resolving relative paths.

isRtaVersion bool

Whether the data is in RTA format.

Properties

BottomShearParas

Gets the bottom shear parameters array. Each element contains cutting coefficients for each flute.

public Vec3d[] BottomShearParas { get; }

Property Value

Vec3d[]

ElementNum

Gets the total number of elements in the parameter map.

public int ElementNum { get; }

Property Value

int

FluteFormNum

Gets the number of flute forms in the parameter map. The number should be 1 or be equal to the flute number of the cutter.

public int FluteFormNum { get; }

Property Value

int

IsUpperSideContained

Gets a value indicating whether the upper side of the milling profile is included in calculations.

public bool IsUpperSideContained { get; }

Property Value

bool

Name

Gets or sets the name of the parameter map.

public string Name { get; set; }

Property Value

string

Note

Gets or sets additional notes or descriptions for the parameter map.

public string Note { get; set; }

Property Value

string

PloughPara

Gets the ploughing force coefficients (Kpr, Kpt, Kpa) for the entire tool.

public Vec3d PloughPara { get; }

Property Value

Vec3d

SideShearParas

Gets the side shear parameters array. The dimensions represent [flute form, Y division, Z division]. Each element contains cutting coefficients (Ksr, Kst, Ksa) for the corresponding position.

public Vec3d[,,] SideShearParas { get; }

Property Value

Vec3d[,,]

SideYParaNum

Gets the number of divisions in the Y direction for side milling parameters.

public int SideYParaNum { get; }

Property Value

int

SideZParaNum

Gets the number of divisions in the Z direction for side milling parameters.

public int SideZParaNum { get; }

Property Value

int

XName

Name for XML IO.

public static string XName { get; }

Property Value

string

XmlSourceFile

public string XmlSourceFile { get; set; }

Property Value

string

Methods

CloneTemplate()

Creates a template clone of this parameter map.

public ICuttingPara CloneTemplate()

Returns

ICuttingPara

A new instance with the same dimensions but zero values.

GenUnitParas()

Generates a list of unit cutting parameters.

public List<ICuttingPara> GenUnitParas()

Returns

List<ICuttingPara>

A list of unit cutting parameters.

GetBottomMillingPara(int)

Gets the milling parameters for the bottom of a specific flute.

public LocalProfileMillingPara GetBottomMillingPara(int fluteIndex)

Parameters

fluteIndex int

The index of the flute.

Returns

LocalProfileMillingPara

The local milling parameters for the bottom of the specified flute.

GetCuttingPara()

Gets the cutting parameter interface for this instance.

public ICuttingPara GetCuttingPara()

Returns

ICuttingPara

The cutting parameter interface.

GetElementByIndex(int)

Gets a parameter value by its element index.

public double GetElementByIndex(int elementIndex)

Parameters

elementIndex int

The index of the element to get.

Returns

double

The value at the specified index.

GetElements()

Gets the elements as an array of values.

public double[] GetElements()

Returns

double[]

An array containing all parameter values.

GetSideMillingPara(int, double, double)

Gets the milling parameters for a specific side position.

public LocalProfileMillingPara GetSideMillingPara(int fluteIndex, double atanYX_rad, double atanZX_rad)

Parameters

fluteIndex int

The index of the flute.

atanYX_rad double

The YX angle in radians.

atanZX_rad double

The ZX angle in radians.

Returns

LocalProfileMillingPara

The local milling parameters for the specified position.

MakeXmlSource(string, string)

Creates an XML element representing the current parameter map.

public XElement MakeXmlSource(string baseDirectory, string relFile)

Parameters

baseDirectory string

The base directory for resolving relative paths.

relFile string

The relative file path.

Returns

XElement

An XML element containing the parameter data.

SetElementByIndex(int, double)

Sets a parameter value by its element index.

public void SetElementByIndex(int elementIndex, double v)

Parameters

elementIndex int

The index of the element to set.

v double

The value to set.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

ToTemplateXElement()

Creates a template XML element for the parameter map.

public XElement ToTemplateXElement()

Returns

XElement

A template XML element.