Table of Contents

Class NcOptOption

Namespace
Hi.NcOpt
Assembly
HiMech.dll

Represents the optimization options for NC operations.

public class NcOptOption : IMakeXmlSource, IEquatable<NcOptOption>, IToXElement
Inheritance
NcOptOption
Implements
Inherited Members
Extension Methods

Constructors

NcOptOption()

Ctor.

public NcOptOption()

NcOptOption(NcOptOption)

Copy Ctor.

public NcOptOption(NcOptOption src)

Parameters

src NcOptOption

src

NcOptOption(XElement)

Initializes a new instance of the NcOptOption class from XML.

public NcOptOption(XElement src)

Parameters

src XElement

The XML element containing the option data.

Properties

CompensationMask

Internal Use Only. Gets or sets the compensation mask for axis compensation.

public int CompensationMask { get; set; }

Property Value

int

EnableDepthCompensation

Gets or sets whether depth compensation is enabled.

public bool EnableDepthCompensation { get; set; }

Property Value

bool

EnableDepthSplition

Enables or disables depth splitting optimization.

public bool EnableDepthSplition { get; set; }

Property Value

bool

EnableForwardCompensation

Gets or sets whether forward compensation is enabled.

public bool EnableForwardCompensation { get; set; }

Property Value

bool

EnableInterpolation

Enables or disables interpolation.

public bool EnableInterpolation { get; set; }

Property Value

bool

EnableOpt

Enables or disables the optimization process.

public bool EnableOpt { get; set; }

Property Value

bool

EnableOptFeedrate

Enables or disables feedrate optimization.

public bool EnableOptFeedrate { get; set; }

Property Value

bool

EnableSideCompensation

Gets or sets whether side compensation is enabled.

public bool EnableSideCompensation { get; set; }

Property Value

bool

ExtendedPostDistance_mm

Gets or sets the extended post-distance in millimeters.

public double ExtendedPostDistance_mm { get; set; }

Property Value

double

ExtendedPreDistance_mm

Gets or sets the extended pre-distance in millimeters.

public double ExtendedPreDistance_mm { get; set; }

Property Value

double

FeedrateAssignmentRatio

The option takes effect if EnableInterpolation is true. If the feedrate changing exceeds this ratio, the Feedrate in the NC line will be updated.

public double FeedrateAssignmentRatio { get; set; }

Property Value

double

IsPreferFuncIndexDictionaryCalled

Internal Use Only.

public bool IsPreferFuncIndexDictionaryCalled { get; }

Property Value

bool

MaxAcceleration_mmds2

Gets or sets the maximum acceleration in millimeters per second squared. The typical CNC lathe or machining center has an acceleration of 0.2g (2 m/sec2). High speed machines have accelerations up to 2g (20 m/sec2). An arbitrary value 10mm/s2 is chosen for initial value. Note: 600mm/min=10mm/s.

public double MaxAcceleration_mmds2 { get; set; }

Property Value

double

MaxFeedPerTooth_mm

Gets or sets the maximum feed per tooth in millimeters. By the principle of conservation, if the value is different from the IFeedPerToothOptLimit.GetMaxFeedPerTooth_mm(), The smaller value will be applied in the optimization process.

public double MaxFeedPerTooth_mm { get; set; }

Property Value

double

MaxFeedrate_mmdmin

Gets or sets the maximum feedrate in millimeters per minute.

public double MaxFeedrate_mmdmin { get; set; }

Property Value

double

MaxFeedrate_mmds

Gets or sets the maximum feedrate in millimeters per second.

public double MaxFeedrate_mmds { get; set; }

Property Value

double

MaxJerk_mmds3

Gets or sets the maximum jerk in millimeters per second cubed.

public double MaxJerk_mmds3 { get; set; }

Property Value

double

MinFeedPerTooth_mm

Gets or sets the minimum feed per tooth in millimeters. By the principle of conservation, if the value is different from the IFeedPerToothOptLimit.GetMinFeedPerTooth_mm(), The larger value will be applied in the optimization process.

public double MinFeedPerTooth_mm { get; set; }

Property Value

double

MinFeedrate_mmdmin

Gets or sets the minimum feedrate in millimeters per minute.

public double MinFeedrate_mmdmin { get; set; }

Property Value

double

MinFeedrate_mmds

Gets or sets the minimum feedrate in millimeters per second. The principle of conversation is applied for feedrate setting (MinFeedrate_mmds and MaxFeedrate_mmds) and feed per tooth setting (MinFeedPerTooth_mm and MaxFeedPerTooth_mm). If feed per tooth setting is not in the range of feedrate setting, The feedrate setting takes priority.

public double MinFeedrate_mmds { get; set; }

Property Value

double

PreferedForce_N

Gets or sets the preferred force in Newtons.

public double PreferedForce_N { get; set; }

Property Value

double

RapidFeed_mmdmin

Gets or sets the rapid feed rate in millimeters per minute.

public double RapidFeed_mmdmin { get; set; }

Property Value

double

RapidFeed_mmds

Gets or sets the rapid feed rate in millimeters per second.

public double RapidFeed_mmds { get; set; }

Property Value

double

SpindlePowerSafetyFactor

Gets or sets the safety factor for spindle power.

public double SpindlePowerSafetyFactor { get; set; }

Property Value

double

SpindlePowerUtilizationFactor

Gets or sets the utilization factor for spindle power. It is the reciprocal of SpindlePowerSafetyFactor.

public double SpindlePowerUtilizationFactor { get; set; }

Property Value

double

SpindleTorqueSafetyFactor

Gets or sets the safety factor for spindle torque.

public double SpindleTorqueSafetyFactor { get; set; }

Property Value

double

SpindleTorqueUtilizationFactor

Gets or sets the utilization factor for spindle torque. It is the reciprocal of SpindleTorqueSafetyFactor.

public double SpindleTorqueUtilizationFactor { get; set; }

Property Value

double

ThermalYieldSafetyFactor

Gets or sets the safety factor for cutter thermal yield.

public double ThermalYieldSafetyFactor { get; set; }

Property Value

double

ThermalYieldUtilizationFactor

Gets or sets the safety bound for cutter thermal yield. It is the reciprocal of ThermalYieldSafetyFactor.

public double ThermalYieldUtilizationFactor { get; set; }

Property Value

double

XName

Name for XML IO.

public static string XName { get; }

Property Value

string

YieldingSafetyFactor

Gets or sets the safety factor for yielding. By the principle of conservation, if the value is different from the MillingCutterOptOption.YieldingSafetyFactor, The larger value will be applied in the optimization process.

public double YieldingSafetyFactor { get; set; }

Property Value

double

YieldingUtilizationFactor

Gets or sets the utilization factor for yielding. It is the reciprocal of YieldingSafetyFactor.

public double YieldingUtilizationFactor { get; set; }

Property Value

double

Methods

CallPreferFuncIndexDictionary()

Calls and returns the prefer function index dictionary, initializing it if it is null.

public Dictionary<Func<MillingPhysicsBrief, double>, double> CallPreferFuncIndexDictionary()

Returns

Dictionary<Func<MillingPhysicsBrief, double>, double>

The prefer function index dictionary.

Duplicate()

Creates a new instance of NcOptOption by duplicating the current instance.

public NcOptOption Duplicate()

Returns

NcOptOption

A new NcOptOption instance with the same values as the current instance.

Equals(NcOptOption)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(NcOptOption other)

Parameters

other NcOptOption

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

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 string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

exhibitionOnly bool

if 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.

ToXElement()

Get the XElement to represent the object.

public XElement ToXElement()

Returns

XElement

XElement to represent the object.