Working on mesh wrapper and rebuild issues

This commit is contained in:
Lars Brubaker 2018-05-30 16:42:17 -07:00
parent a0ff7fa653
commit 25883fc0bc
18 changed files with 247 additions and 79 deletions

View file

@ -140,8 +140,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
return "---";
}
int startInstruction = loadedGCode.GetInstructionIndexAtLayer(startLayer);
int endInstruction = loadedGCode.GetInstructionIndexAtLayer(endLayer);
int startInstruction = loadedGCode.GetFirstLayerInstruction(startLayer);
int endInstruction = loadedGCode.GetFirstLayerInstruction(endLayer);
var secondsToEndFromStart = loadedGCode.Instruction(startInstruction).secondsToEndFromHere;
var secondsToEndFromEnd = loadedGCode.Instruction(endInstruction).secondsToEndFromHere;
return SecondsToTime(secondsToEndFromStart - secondsToEndFromEnd);
@ -154,12 +154,12 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
return "---";
}
int startInstruction = loadedGCode.GetInstructionIndexAtLayer(activeLayerIndex);
int startInstruction = loadedGCode.GetFirstLayerInstruction(activeLayerIndex);
if(activeLayerIndex == 0)
{
startInstruction = 0;
}
int endInstruction = loadedGCode.GetInstructionIndexAtLayer(activeLayerIndex + 1);
int endInstruction = loadedGCode.GetFirstLayerInstruction(activeLayerIndex + 1);
string separator = "";
string fanSpeeds = "";