Added in a pause gcode script object, fixed gcode injection timing
This commit is contained in:
parent
677a1a9b12
commit
e63f95ddad
5 changed files with 20 additions and 6 deletions
|
|
@ -118,14 +118,17 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
&& lineToWrite.StartsWith("; LAYER_HEIGHT:"))
|
||||
{
|
||||
double layerHeight = 0;
|
||||
// this gives us the layer height we will be at AFTER this layer is done printing
|
||||
if (GCodeFile.GetFirstNumberAfter("; LAYER_HEIGHT", lineToWrite, ref layerHeight, out _, stopCheckingString: ":"))
|
||||
{
|
||||
accumulatedLayerHeight += layerHeight;
|
||||
// check if we are above the accumulated at the start of the layer but before adding in this layer height
|
||||
if (accumulatedLayerHeight > WorldZ)
|
||||
{
|
||||
hasBeenReached = true;
|
||||
yield return $"{GCodeToSend} ; G-Code from Scene Object";
|
||||
}
|
||||
|
||||
accumulatedLayerHeight += layerHeight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue