Class NcOptOption
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
srcNcOptOptionsrc
NcOptOption(XElement)
Initializes a new instance of the NcOptOption class from XML.
public NcOptOption(XElement src)
Parameters
srcXElementThe 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
EnableDepthCompensation
Gets or sets whether depth compensation is enabled.
public bool EnableDepthCompensation { get; set; }
Property Value
EnableDepthSplition
Enables or disables depth splitting optimization.
public bool EnableDepthSplition { get; set; }
Property Value
EnableForwardCompensation
Gets or sets whether forward compensation is enabled.
public bool EnableForwardCompensation { get; set; }
Property Value
EnableInterpolation
Enables or disables interpolation.
public bool EnableInterpolation { get; set; }
Property Value
EnableOpt
Enables or disables the optimization process.
public bool EnableOpt { get; set; }
Property Value
EnableOptFeedrate
Enables or disables feedrate optimization.
public bool EnableOptFeedrate { get; set; }
Property Value
EnableSideCompensation
Gets or sets whether side compensation is enabled.
public bool EnableSideCompensation { get; set; }
Property Value
ExtendedPostDistance_mm
Gets or sets the extended post-distance in millimeters.
public double ExtendedPostDistance_mm { get; set; }
Property Value
ExtendedPreDistance_mm
Gets or sets the extended pre-distance in millimeters.
public double ExtendedPreDistance_mm { get; set; }
Property Value
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
IsPreferFuncIndexDictionaryCalled
Internal Use Only.
public bool IsPreferFuncIndexDictionaryCalled { get; }
Property Value
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
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
MaxFeedrate_mmdmin
Gets or sets the maximum feedrate in millimeters per minute.
public double MaxFeedrate_mmdmin { get; set; }
Property Value
MaxFeedrate_mmds
Gets or sets the maximum feedrate in millimeters per second.
public double MaxFeedrate_mmds { get; set; }
Property Value
MaxJerk_mmds3
Gets or sets the maximum jerk in millimeters per second cubed.
public double MaxJerk_mmds3 { get; set; }
Property Value
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
MinFeedrate_mmdmin
Gets or sets the minimum feedrate in millimeters per minute.
public double MinFeedrate_mmdmin { get; set; }
Property Value
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
PreferedForce_N
Gets or sets the preferred force in Newtons.
public double PreferedForce_N { get; set; }
Property Value
RapidFeed_mmdmin
Gets or sets the rapid feed rate in millimeters per minute.
public double RapidFeed_mmdmin { get; set; }
Property Value
RapidFeed_mmds
Gets or sets the rapid feed rate in millimeters per second.
public double RapidFeed_mmds { get; set; }
Property Value
SpindlePowerSafetyFactor
Gets or sets the safety factor for spindle power.
public double SpindlePowerSafetyFactor { get; set; }
Property Value
SpindlePowerUtilizationFactor
Gets or sets the utilization factor for spindle power. It is the reciprocal of SpindlePowerSafetyFactor.
public double SpindlePowerUtilizationFactor { get; set; }
Property Value
SpindleTorqueSafetyFactor
Gets or sets the safety factor for spindle torque.
public double SpindleTorqueSafetyFactor { get; set; }
Property Value
SpindleTorqueUtilizationFactor
Gets or sets the utilization factor for spindle torque. It is the reciprocal of SpindleTorqueSafetyFactor.
public double SpindleTorqueUtilizationFactor { get; set; }
Property Value
ThermalYieldSafetyFactor
Gets or sets the safety factor for cutter thermal yield.
public double ThermalYieldSafetyFactor { get; set; }
Property Value
ThermalYieldUtilizationFactor
Gets or sets the safety bound for cutter thermal yield. It is the reciprocal of ThermalYieldSafetyFactor.
public double ThermalYieldUtilizationFactor { get; set; }
Property Value
XName
Name for XML IO.
public static string XName { get; }
Property Value
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
YieldingUtilizationFactor
Gets or sets the utilization factor for yielding. It is the reciprocal of YieldingSafetyFactor.
public double YieldingUtilizationFactor { get; set; }
Property Value
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
otherNcOptOptionAn object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current object.
Returns
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
baseDirectorystringThe base directory for resolving relative paths
relFilestringThe relative file path for the XML source
exhibitionOnlyboolif 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()