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
LocalProfileMillingParamilling parameter on side
bottomPara
LocalProfileMillingParamilling parameter on bottom
containUpperSide
boolWhether to include upper side parameters
ProfileMillingParaMap(ProfileMillingParaMap)
Copy ctor.
public ProfileMillingParaMap(ProfileMillingParaMap src)
Parameters
src
ProfileMillingParaMapsrc
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
intThe number of flutes.
yDivisionNum
intThe number of divisions in Y direction.
zDivisionNum
intThe number of divisions in Z direction.
isUpperSideContained
boolWhether 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
XElementThe XML element containing the parameter data.
baseDirectory
stringThe base directory for resolving relative paths.
isRtaVersion
boolWhether 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
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
IsUpperSideContained
Gets a value indicating whether the upper side of the milling profile is included in calculations.
public bool IsUpperSideContained { get; }
Property Value
Name
Gets or sets the name of the parameter map.
public string Name { get; set; }
Property Value
Note
Gets or sets additional notes or descriptions for the parameter map.
public string Note { get; set; }
Property Value
PloughPara
Gets the ploughing force coefficients (Kpr, Kpt, Kpa) for the entire tool.
public Vec3d PloughPara { get; }
Property Value
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
SideZParaNum
Gets the number of divisions in the Z direction for side milling parameters.
public int SideZParaNum { get; }
Property Value
XName
Name for XML IO.
public static string XName { get; }
Property Value
XmlSourceFile
public string XmlSourceFile { get; set; }
Property Value
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
intThe 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
intThe 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
intThe index of the flute.
atanYX_rad
doubleThe YX angle in radians.
atanZX_rad
doubleThe 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
stringThe base directory for resolving relative paths.
relFile
stringThe 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
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.