Class TimeForceUtil
- Namespace
- Hi.MillingForces.Fittings
- Assembly
- HiMech.dll
Utility class for reading and processing time-based force measurement data.
public static class TimeForceUtil
- Inheritance
-
TimeForceUtil
- Inherited Members
Methods
ReadCsv(string)
Reads time-force data from a CSV file.
public static List<TimeForce> ReadCsv(string file)
Parameters
filestringThe path to the CSV file containing time-force data.
Returns
- List<TimeForce>
A list of TimeForce objects containing the parsed data. The CSV file should have at least 4 columns:
- Column 1: Time in seconds
- Column 2: X-component of force in Newtons
- Column 3: Y-component of force in Newtons
- Column 4: Z-component of force in Newtons
Remarks
The method:
- Skips the first line (assumed to be headers)
- Parses each subsequent line into time and force components
- Validates that each line has at least 4 numeric values
- Creates a TimeForce object for each valid line
The cells are read in the invariant culture ('.' decimal), as ReadRows(string, Action<int>, CancellationToken?, Func<DateTime, TimeSpan>, MapSeriesCsvConfig) reads them: under the thread culture a comma-decimal host dropped every row of a '.' file (fr-FR) or read 1.5 as 15 (de-DE), with nothing to say so.