Class RakeFace2DCuttingPara
- Namespace
- Hi.MillingForces.ProjectedRakeFaceCuttingParas
- Assembly
- HiMech.dll
Represents a 2D cutting parameter for rake face cutting operations.
public class RakeFace2DCuttingPara : ICuttingPara, IGetCuttingPara, IMakeXmlSource, INameNote
- Inheritance
-
RakeFace2DCuttingPara
- Implements
- Inherited Members
- Extension Methods
Constructors
RakeFace2DCuttingPara()
Initializes a new instance of the RakeFace2DCuttingPara class.
public RakeFace2DCuttingPara()
RakeFace2DCuttingPara(RakeFace2DCuttingPara)
Initializes a new instance of the RakeFace2DCuttingPara class by copying from another instance.
public RakeFace2DCuttingPara(RakeFace2DCuttingPara src)
Parameters
src
RakeFace2DCuttingParaThe source instance to copy from.
RakeFace2DCuttingPara(XElement, string)
Initializes a new instance of the RakeFace2DCuttingPara class from XML.
public RakeFace2DCuttingPara(XElement src, string baseDirectory)
Parameters
src
XElementThe XML source element.
baseDirectory
stringThe base directory for resolving relative paths.
Fields
element_num
Gets the number of elements in the cutting parameter.
public const int element_num = 4
Field Value
Properties
ElementNum
Element number.
public int ElementNum { get; }
Property Value
FluteFormNum
Flute form number.
public int FluteFormNum { get; }
Property Value
Name
Gets or sets the name of the cutting parameter.
public string Name { get; set; }
Property Value
Note
Gets or sets additional notes about the cutting parameter.
public string Note { get; set; }
Property Value
PloughPara
Gets or sets the plough parameter vector.
public Vec2d PloughPara { get; set; }
Property Value
ShearPara
Gets or sets the shear parameter vector.
public Vec2d ShearPara { get; set; }
Property Value
XName
Name for XML IO.
public static string XName { get; }
Property Value
XmlSourceFile
public string XmlSourceFile { get; set; }
Property Value
Methods
CloneTemplate()
Clone template.
public ICuttingPara CloneTemplate()
Returns
- ICuttingPara
clone template
GenUnitParas()
Generate ICuttingParas. The elements of each ICuttingPara are (1,0,0,0,..),(0,1,0,0,..),.… For parameter training.
public List<ICuttingPara> GenUnitParas()
Returns
- List<ICuttingPara>
unit parameters.
GetCuttingPara()
Get ICuttingPara.
public ICuttingPara GetCuttingPara()
Returns
GetElementByIndex(int)
Gets the cutting parameter element at the specified index.
public double GetElementByIndex(int index)
Parameters
index
intThe index of the element to retrieve.
Returns
- double
The cutting parameter element at the specified index.
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
stringThe base directory for resolving relative paths
relFile
stringThe relative file path for the XML source
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.
SetElementByIndex(int, double)
Set element by index. For parameter training.
public void SetElementByIndex(int elementIndex, double v)
Parameters
ToTemplateXElement()
Get XElement for templating.
public XElement ToTemplateXElement()