Read MaterialLib.PierceNozzleStandoffRampTo

This commit is contained in:
AJ
2018-11-16 09:34:32 -05:00
parent c19c7ffae7
commit 1618884cd9
2 changed files with 5 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ namespace CincyLib.Laser
public double PierceNozzleStandoffRampFrom { get; set; }
//public float PierceNozzleStandoffRampTo { get; set; }
public double PierceNozzleStandoffRampTo { get; set; }
public AssistGasType PierceAssistGas { get; set; }

View File

@@ -125,15 +125,18 @@ namespace CincyLib.Laser
MaterialLib.PierceFocusFarField = Math.Round(reader.ReadSingle(), 4);
// older files wont go this far...
const int seek = 76;
const int seek = 18;
var hasExtendedInfo = reader.BaseStream.Length > reader.BaseStream.Position + seek;
if (hasExtendedInfo)
{
reader.BaseStream.Seek(seek, SeekOrigin.Current);
MaterialLib.PierceNozzleStandoffRampTo = Math.Round(reader.ReadSingle(), 4);
reader.BaseStream.Seek(54, SeekOrigin.Current);
var lensType = reader.ReadByte();
switch (lensType)
{
case 0: