From fb83ad3d2962d2581bf6bb6a96d5433fc9158dea Mon Sep 17 00:00:00 2001 From: Anton Maisak Date: Thu, 13 Feb 2020 17:31:22 +0300 Subject: [PATCH] Fix2 PrusaSlicerParser --- src/Gcode.Utils/SlicerParser/PrusaSlicerParser.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Gcode.Utils/SlicerParser/PrusaSlicerParser.cs b/src/Gcode.Utils/SlicerParser/PrusaSlicerParser.cs index 2615ace..8452b23 100644 --- a/src/Gcode.Utils/SlicerParser/PrusaSlicerParser.cs +++ b/src/Gcode.Utils/SlicerParser/PrusaSlicerParser.cs @@ -23,13 +23,13 @@ public override Slic3RInfo GetSlicerInfo(string[] fileContent) var filamentUsed = fileContent.Where(x => x.StartsWith("; filament used [mm] = ")).ToArray(); if (filamentUsed.Length == 1 && filamentUsed[0] != null) { - res.FilamentUsedExtruder1 = Convert.ToDecimal(filamentUsed[0].Split('=')[1].Split(',')[0].Trim().Replace(".",",")); + res.FilamentUsedExtruder1 = Convert.ToDecimal(filamentUsed[0].Split(';')[1].Split('=')[1].Trim().Replace(".",",")); } if (filamentUsed.Length == 2 && filamentUsed[1] != null) { // filament used - res.FilamentUsedExtruder2 = Convert.ToDecimal(filamentUsed[1].Split('=')[1]?.Split('=')[1].Split(',')); + res.FilamentUsedExtruder2 = Convert.ToDecimal(filamentUsed[1].Split(';')[1].Split('=')[1].Trim().Replace(".",",")); } var filamentDiameter = fileContent.FirstOrDefault(x => x.StartsWith("; filament_diameter"));