Table of Contents

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

unManagedText string
flags IEnumerable<string>

Returns

IEnumerable<(string Flag, double Value, string OriginalText)>

GetFlagDoublesXyz(string)

public static IEnumerable<(string Flag, double Value, string OriginalText)> GetFlagDoublesXyz(string unManagedText)

Parameters

unManagedText string

Returns

IEnumerable<(string Flag, double Value, string OriginalText)>

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

text string

text

tag string

tag

enableIntegerShrink bool

If 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

text string

The NC text to search and modify.

regexTag string

The flag tag to search for.

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

text string
tags IEnumerable<string>

Returns

bool

HasAnyFlag(string, IEnumerable<string>)

public static bool HasAnyFlag(string text, IEnumerable<string> flags)

Parameters

text string
flags IEnumerable<string>

Returns

bool

HasAnyFlag(string, string)

public static bool HasAnyFlag(string text, string flag)

Parameters

text string
flag string

Returns

bool