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

@ -130,11 +130,7 @@ namespace MatterHackers.GCodeVisualizer
{
if (gCodeFileToDraw.IsExtruding(instructionIndex))
{
double layerThickness = gCodeFileToDraw.GetLayerHeight();
if (layerToCreate == 0)
{
layerThickness = gCodeFileToDraw.GetFirstLayerHeight();
}
double layerThickness = gCodeFileToDraw.GetLayerHeight(layerToCreate);
Color extrusionColor = ExtrusionColors.GetColorForSpeed((float)currentInstruction.FeedRate);
renderFeaturesForLayer.Add(new RenderFeatureExtrusion(previousInstruction.Position, currentInstruction.Position, currentInstruction.ExtruderIndex, currentInstruction.FeedRate, currentInstruction.EPosition - previousInstruction.EPosition, gCodeFileToDraw.GetFilamentDiameter(), layerThickness, extrusionColor));