Got the per layer info to show up in gcode view

Fixed bugs with gcode parsing
Moved classes into separate files
This commit is contained in:
Lars Brubaker 2018-05-08 15:19:06 -07:00
parent ab560448aa
commit c2d2509195
14 changed files with 500 additions and 200 deletions

View file

@ -68,11 +68,11 @@ namespace MatterControl.Printing
public abstract double GetFilamentWeightGrams(double filamentDiameterMm, double density);
public abstract double GetFirstLayerHeight();
public abstract int GetInstructionIndexAtLayer(int layerIndex);
public abstract double GetLayerHeight();
public abstract double GetLayerHeight(int layerIndex);
public abstract double GetLayerZOffset(int layerIndex);
public abstract int GetLayerIndex(int instructionIndex);
@ -142,7 +142,7 @@ namespace MatterControl.Printing
int stringPos = stringWithNumber.IndexOf(stringToCheckAfter, startIndex);
int stopPos = stringWithNumber.IndexOf(stopCheckingString);
if (stringPos != -1
&& (stopPos == -1 || stringPos < stopPos))
&& (stopPos == -1 || stringPos < stopPos || string.IsNullOrEmpty(stopCheckingString)))
{
stringPos += stringToCheckAfter.Length;
readValue = agg_basics.ParseDouble(stringWithNumber, ref stringPos, true);