Class RakeFaceCuttingPara2d
- Namespace
- Hi.MillingForces.RakeFaceCuttingParas
- Assembly
- HiMech.dll
Represents a 2D cutting parameter for rake face cutting operations.
public class RakeFaceCuttingPara2d : IRakeFaceCuttingPara, ICuttingPara, IGetCuttingPara, IMakeXmlSource, INameNote, IDuplicate
- Inheritance
-
RakeFaceCuttingPara2d
- Implements
- Inherited Members
- Extension Methods
Constructors
RakeFaceCuttingPara2d()
Initializes a new instance of the RakeFaceCuttingPara2d class.
public RakeFaceCuttingPara2d()
RakeFaceCuttingPara2d(RakeFaceCuttingPara2d)
Initializes a new instance of the RakeFaceCuttingPara2d class by copying from another instance.
public RakeFaceCuttingPara2d(RakeFaceCuttingPara2d src)
Parameters
src
RakeFaceCuttingPara2dThe source instance to copy from.
RakeFaceCuttingPara2d(XElement, string)
Initializes a new instance of the RakeFaceCuttingPara2d class from XML.
public RakeFaceCuttingPara2d(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
AnchorRakeAngle_deg
Gets or sets the anchor rake angle in degrees.
public double AnchorRakeAngle_deg { get; set; }
Property Value
AnchorRakeAngle_rad
Gets or sets the anchor rake angle in radians. Different rake angles may have different ploughing parameters but share the same shearing parameters.
public double AnchorRakeAngle_rad { get; set; }
Property Value
ElementNum
Element number.
public int ElementNum { get; }
Property Value
FluteFormNum
Flute form number.
public int FluteFormNum { get; }
Property Value
Kp
Gets the ploughing coefficient vector in ECN coordinates.
public Vec2d Kp { get; set; }
Property Value
Kpc
Gets or sets the ploughing coefficient along the rake face cross line (c). Unit: N/mm.
public double Kpc { get; set; }
Property Value
Kpn
Gets or sets the ploughing coefficient along the rake face normal direction (n). Unit: N/mm.
public double Kpn { get; set; }
Property Value
Ks
Gets the shear coefficient vector in ECN coordinates.
public Vec2d Ks { get; set; }
Property Value
Ksc
Gets or sets the shear coefficient along the rake face cross line (c). Direction is from outer to center on side cutting. Unit: N/mm².
public double Ksc { get; set; }
Property Value
Ksn
Gets or sets the shear coefficient along the rake face normal direction (n). Unit: N/mm².
public double Ksn { get; set; }
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
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
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
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, 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
stringThe base directory for resolving relative paths
relFile
stringThe relative file path for the XML source
exhibitionOnly
boolif 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.
SetElementByIndex(int, double)
Sets the value of an element at the specified index.
public void SetElementByIndex(int elementIndex, double v)
Parameters
Remarks
Index mapping: 0 - Kse (N/mm²) 1 - Ksc (N/mm²) 2 - Ksn (N/mm²) 3 - Kpe (N/mm) 4 - Kpc (N/mm) 5 - Kpn (N/mm)
ToTemplateXElement()
Get XElement for templating.
public XElement ToTemplateXElement()