Table of Contents

Class MillingForce

Namespace
Hi.MillingForces
Assembly
HiMech.dll

Milling force.

public class MillingForce : IGetFeedrate, IGetSpindleSpeed, IGetMillingForce, IGetQuantityByKey, IGetCsvDictionary, IWriteBin
Inheritance
MillingForce
Implements
Inherited Members
Extension Methods

Remarks

The data list such as CuttingForcesToToolOnToolRunningCoordinate in this class is in sequence of time. If step-limited version is using, the milling force ctor is limited to call 2000 times.

Constructors

MillingForce(BinaryReader)

Initializes a new instance of the MillingForce class from binary data.

public MillingForce(BinaryReader reader)

Parameters

reader BinaryReader

The binary reader containing the serialized milling force data.

Fields

DefaultRotationDivisionNum

Gets the default number of divisions for one complete rotation.

public const int DefaultRotationDivisionNum = 36

Field Value

int

Remarks

This value determines the resolution of force calculations during tool rotation. A higher value provides more detailed force analysis but requires more computational resources.

Properties

AbsAvgForce

Absolute average force.

public double AbsAvgForce { get; }

Property Value

double

AbsAxialPower_W

Gets the absolute axial power in watts.

public double AbsAxialPower_W { get; }

Property Value

double

AvgAbsMomentsAboutSpindle_Nm

Gets the average absolute moments about spindle on the spindle sensor coordinate system.

public Vec3d AvgAbsMomentsAboutSpindle_Nm { get; }

Property Value

Vec3d

Remarks

Calculates the average of absolute values for each component (X, Y, Z) of the moments about the spindle.

AvgAxialTorque_Nm

Get avg axial torque in N*m. The observation point is at tool tip. The torque is taken by tool.

public double AvgAxialTorque_Nm { get; }

Property Value

double

AvgBendingMomentsAboutSpindle_Nm

Gets the average bending moments about spindle in Newton-meters.

public double? AvgBendingMomentsAboutSpindle_Nm { get; }

Property Value

double?

Remarks

Calculates the magnitude of the average bending moment by taking the square root of the sum of squares of the X and Y components of the average absolute moments.

AvgContactEdgeLengthPerFlute_mm

Gets the average contact edge length per flute in millimeters.

public double AvgContactEdgeLengthPerFlute_mm { get; }

Property Value

double

AvgForceToToolOnToolRunningCoordinate

Avg cutting force to tool on tool running coordinate.

public Vec3d AvgForceToToolOnToolRunningCoordinate { get; }

Property Value

Vec3d

AvgForceToWorkpieceOnWorkpieceCoordinate

Avg cutting force on workpiece coordinate.

public Vec3d AvgForceToWorkpieceOnWorkpieceCoordinate { get; }

Property Value

Vec3d

AvgIntersectedContactArea_mm2

contact area along cutter outside contact point to circle center direction. The average is for each rotation angle. This property is for computing heat transfer.

public double AvgIntersectedContactArea_mm2 { get; }

Property Value

double

AvgMomentToToolAboutObservationPointOnToolRunningZero_Nm

Gets the average moment to tool about observation point on tool running zero in Newton-meters.

public Vec3d AvgMomentToToolAboutObservationPointOnToolRunningZero_Nm { get; }

Property Value

Vec3d

AxialPowerTakenByWorkpiece_W

Axial Power that the spindle has to create due to axial torque. The empowered item is workpiece. The fulcrum is at the tool tip. Unit is Watt.

public double AxialPowerTakenByWorkpiece_W { get; }

Property Value

double

CdnTransformFromToolRunningZeroToWorkpieceGeom

Tool running coordinate to workpiece geom coordinate.

public Mat4d CdnTransformFromToolRunningZeroToWorkpieceGeom { get; }

Property Value

Mat4d

ChipVolume_mm3

Gets the chip volume in cubic millimeters.

public double ChipVolume_mm3 { get; }

Property Value

double

CuttingForcesToToolOnToolRunningCoordinate

Cutting forces on tool running coordinate. The forced item is tool.

public List<Vec3d> CuttingForcesToToolOnToolRunningCoordinate { get; }

Property Value

List<Vec3d>

CuttingForcesToToolOnWorkpieceCoodinate

Cutting forces on workpiece coordinate. The forced item is tool.

public List<Vec3d> CuttingForcesToToolOnWorkpieceCoodinate { get; }

Property Value

List<Vec3d>

CuttingForcesToWorkpieceOnWorkpieceCoordinate

Cutting forces on workpiece coordinate. The forced item is workpiece.

public List<Vec3d> CuttingForcesToWorkpieceOnWorkpieceCoordinate { get; }

Property Value

List<Vec3d>

CyclePeriod_s

Gets the cycle period in seconds, calculated as 60 / SpindleSpeed_rpm.

public double CyclePeriod_s { get; }

Property Value

double

DAngle_deg

Delta angle in degree. The value is 360 / RotationDivisionNum.

public double DAngle_deg { get; }

Property Value

double

DAngle_rad

Delta angle in radian. The value is 2 * pi / RotationDivisionNum.

public double DAngle_rad { get; }

Property Value

double

Feedrate_mmds

Gets the feed rate in millimeters per second.

public double Feedrate_mmds { get; }

Property Value

double

FluteNum

Gets the number of flutes on the cutting tool.

public int FluteNum { get; }

Property Value

int

FrictionPower_W

friction power to workpiece. the unit is watt.

public double FrictionPower_W { get; }

Property Value

double

IndexAtMaxCuttingForce

Gets the index at which the maximum cutting force occurs.

public int IndexAtMaxCuttingForce { get; }

Property Value

int

IsCw

Gets a value indicating whether the spindle rotation is clockwise.

public bool IsCw { get; }

Property Value

bool

KinematicPowerDivDensity_Wmm3dg

Gets the kinematic power divided by density in watts per cubic millimeter per degree.

public double KinematicPowerDivDensity_Wmm3dg { get; }

Property Value

double

MaxAbsForce

Gets the maximum absolute force magnitude.

public double MaxAbsForce { get; }

Property Value

double

MaxAbsForceSlope_NdDeg

Absolute max force changed per degree.

public double MaxAbsForceSlope_NdDeg { get; }

Property Value

double

MaxAbsMomentAboutObservationPoint_Nm

Gets the maximum absolute moment about observation point in Newton-meters.

public double MaxAbsMomentAboutObservationPoint_Nm { get; }

Property Value

double

MaxAxialTorqueToToolByToolTip_Nm

Get max axial torque in N*m. The observation point is at tool tip. The torque is taken by tool.

public double MaxAxialTorqueToToolByToolTip_Nm { get; }

Property Value

double

MaxForceToToolOnToolRunningCoordinate

Max cutting force on tool running coordinate.

public Vec3d MaxForceToToolOnToolRunningCoordinate { get; }

Property Value

Vec3d

MaxMomentToToolAboutObservationPointOnToolRunningZero_Nm

Gets the maximum moment to tool about observation point on tool running zero in Newton-meters.

public Vec3d MaxMomentToToolAboutObservationPointOnToolRunningZero_Nm { get; }

Property Value

Vec3d

MaxMomentToToolAboutObservationPointOnWorkpiceGeom_Nm

Gets the maximum moment to tool about observation point on workpiece geometry in Newton-meters.

public Vec3d MaxMomentToToolAboutObservationPointOnWorkpiceGeom_Nm { get; }

Property Value

Vec3d

MinAbsMomentAboutObservationPoint_Nm

Gets the minimum absolute moment about the observation point in Newton-meters.

public double MinAbsMomentAboutObservationPoint_Nm { get; }

Property Value

double

MomentsAboutObservationPointOnObservationCoordinate_Nm

Gets the moments about observation point on observation coordinate in Newton-meters.

public List<Vec3d> MomentsAboutObservationPointOnObservationCoordinate_Nm { get; }

Property Value

List<Vec3d>

MomentsAboutObservationPointOnToolRunningZero_Nm

Gets the minimum absolute moment about the observation point in Newton-meters.

public List<Vec3d> MomentsAboutObservationPointOnToolRunningZero_Nm { get; }

Property Value

List<Vec3d>

MomentsAboutSpindle_Nm

Gets the moments about spindle on the spindle sensor coordinate system.

public List<Vec3d> MomentsAboutSpindle_Nm { get; }

Property Value

List<Vec3d>

Remarks

The moments are calculated by transforming the moments about the observation point to the spindle sensor coordinate system using the current rotation angle.

MomentsToToolAboutObservationPointOnSpindleRotationZero_Nm

Gets the moments to tool about observation point on spindle rotation zero in Newton-meters.

public List<Vec3d> MomentsToToolAboutObservationPointOnSpindleRotationZero_Nm { get; }

Property Value

List<Vec3d>

MomentsToToolAboutToolTipOnToolRunningZero_Nm

Moments on tool running coordinate in N*m. The fulcrum is at the coordinate zero. The moment is taken by tool. The size is RotationDivisionNum.

public List<Vec3d> MomentsToToolAboutToolTipOnToolRunningZero_Nm { get; }

Property Value

List<Vec3d>

ObservationPositionFromToolTip

Specific fulcrum position relative coordinate zero on tool running coordinate.

public Vec3d ObservationPositionFromToolTip { get; }

Property Value

Vec3d

PloughForcesOnTr

plough force on tool running coordinate. The force is taken by tool. In sequence of time.

public List<Vec3d> PloughForcesOnTr { get; }

Property Value

List<Vec3d>

PowerWithoutFriction_W

Gets the power without friction in watts, calculated as axial power taken by workpiece minus friction power.

public double PowerWithoutFriction_W { get; }

Property Value

double

RotationAngleInterval

Gets the rotation angle interval in radians between divisions. The value is 2 * pi / RotationDivisionNum.

public double RotationAngleInterval { get; }

Property Value

double

RotationDivisionNum

Gets the number of divisions for one complete rotation.

public int RotationDivisionNum { get; }

Property Value

int

ShearForcesOnTr

shear forces on tool running coordinate. The force is taken by tool. In sequence of time.

public List<Vec3d> ShearForcesOnTr { get; }

Property Value

List<Vec3d>

SpindleSpeed_radds

Gets the spindle speed in radians per second.

public double SpindleSpeed_radds { get; }

Property Value

double

SpindleSpeed_rpm

Gets the spindle speed in revolutions per minute.

public double SpindleSpeed_rpm { get; }

Property Value

double

StepIndex

Step index. For database saving.

[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public int StepIndex { get; set; }

Property Value

int

ToothArcDuration_s

Gets the duration of one tooth arc pass in seconds, calculated as CyclePeriod_s / FluteNum.

public double ToothArcDuration_s { get; }

Property Value

double

TransformFromWorkpieceGeomToObservationPoint

Gets the transformation matrix from workpiece geometric coordinate system to the observation point.

public Mat4d TransformFromWorkpieceGeomToObservationPoint { get; }

Property Value

Mat4d

Methods

DynamicBuildExtension()

Internal use. Build extended data. In single thread, no need to use the function. In multi thread, call it before going to un-safe area.

public void DynamicBuildExtension()

GetCsvDictionary()

Get row dictionary. It suits for CSV output.

public Dictionary<string, string> GetCsvDictionary()

Returns

Dictionary<string, string>

csv row dictionary

GetFeedrate_mmds()

Gets the program feedrate in millimeters per second.

public double GetFeedrate_mmds()

Returns

double

Feedrate in mm/s

GetForceBriefDictionary(bool)

Gets a dictionary containing force-related quantities.

public Dictionary<string, double> GetForceBriefDictionary(bool isIncludingWave = false)

Parameters

isIncludingWave bool

If true, includes wave-related force data.

Returns

Dictionary<string, double>

A dictionary mapping quantity names to their values.

GetForceToToolOnToolRunningCoordinateCsvString()

Gets the force to tool on tool running coordinate as a CSV string.

public string GetForceToToolOnToolRunningCoordinateCsvString()

Returns

string

A CSV string representation of the forces.

GetForceToWorkpieceOnWorkpieceCoordinateCsvString()

Gets the force to workpiece on workpiece coordinate as a CSV string.

public string GetForceToWorkpieceOnWorkpieceCoordinateCsvString()

Returns

string

A CSV string representation of the forces.

GetMillingForce()

public MillingForce GetMillingForce()

Returns

MillingForce

MillingForce

GetMomentsAboutObservationPointOnToolRunningCoordinate_Nm(double)

Gets moments about observation point on tool running coordinate in Newton-meters for a specific observation height.

public List<Vec3d> GetMomentsAboutObservationPointOnToolRunningCoordinate_Nm(double observationHeightFromToolTip)

Parameters

observationHeightFromToolTip double

The height from tool tip to observation point in millimeters

Returns

List<Vec3d>

List of moment vectors in Newton-meters

GetMomentsAboutObservationPointOnToolRunningZero_Nm(Vec3d)

Gets moments about observation point on tool running zero coordinate system in Newton-meters.

public List<Vec3d> GetMomentsAboutObservationPointOnToolRunningZero_Nm(Vec3d observationPosFromToolTip)

Parameters

observationPosFromToolTip Vec3d

The position vector from tool tip to observation point

Returns

List<Vec3d>

List of moment vectors in Newton-meters

GetMomentsToToolAboutObservationPointOnSpindleRotationZeroCsvString()

Gets the moments to tool about observation point on spindle rotation zero as a CSV string.

public string GetMomentsToToolAboutObservationPointOnSpindleRotationZeroCsvString()

Returns

string

A CSV string representation of the moments.

GetQuantityByKey(string)

Gets a quantity value associated with the specified key.

public double GetQuantityByKey(string key)

Parameters

key string

The key to look up

Returns

double

The quantity value associated with the key

GetSpindleDirection()

Gets the spindle rotation direction.

public SpindleDirection GetSpindleDirection()

Returns

SpindleDirection

The spindle direction (clockwise, counterclockwise, or stopped)

GetSpindleSpeed_radds()

Gets the spindle speed in radians per second.

public double GetSpindleSpeed_radds()

Returns

double

Spindle speed in rad/s

ToCuttingForcesString()

Converts the cutting forces to a string representation.

public string ToCuttingForcesString()

Returns

string

A string representation of the cutting forces.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

WriteBin(BinaryWriter)

Writes the object's data to a binary stream.

public void WriteBin(BinaryWriter writer)

Parameters

writer BinaryWriter

The binary writer to write to