Class SoftNcUtil
- Namespace
- Hi.Numerical.SoftParsers
- Assembly
- HiMech.dll
public static class SoftNcUtil
- Inheritance
-
SoftNcUtil
- Inherited Members
Methods
GetFlagDoubles(string, IEnumerable<string>)
public static IEnumerable<(string Flag, double Value, string OriginalText)> GetFlagDoubles(string unManagedText, IEnumerable<string> flags)
Parameters
unManagedTextstringflagsIEnumerable<string>
Returns
GetFlagDoublesXyz(string)
public static IEnumerable<(string Flag, double Value, string OriginalText)> GetFlagDoublesXyz(string unManagedText)
Parameters
unManagedTextstring
Returns
GrabDouble(ref string, string, bool)
Grab double value with decimal point judgement: The text is changed by replacing tag and value to empty string.
If enableIntegerShrink is true and no decimal point, the value should be scale by 0.001.
public static double GrabDouble(ref string text, string tag, bool enableIntegerShrink)
Parameters
textstringtext
tagstringtag
enableIntegerShrinkboolIf true and no decimal point exists, the value will be scaled by 0.001.
Returns
- double
double value
GrabFlag(ref string, string)
Grabs and removes a flag from the NC text.
public static bool GrabFlag(ref string text, string regexTag)
Parameters
Returns
- bool
True if the flag was found and removed; otherwise, false.
GrabFlags(ref string, IEnumerable<string>)
public static bool GrabFlags(ref string text, IEnumerable<string> tags)
Parameters
textstringtagsIEnumerable<string>
Returns
HasAnyFlag(string, IEnumerable<string>)
public static bool HasAnyFlag(string text, IEnumerable<string> flags)
Parameters
textstringflagsIEnumerable<string>
Returns
HasAnyFlag(string, string)
public static bool HasAnyFlag(string text, string flag)