Skip to content

Commit ff329fb

Browse files
author
Sven Erb
committed
Added part key to vectorblock.
1 parent 766a2d7 commit ff329fb

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

  • ReaderWriter/3rdPartyFormatAdapters/GCODE/GCodeReaderWriter

ReaderWriter/3rdPartyFormatAdapters/GCODE/GCodeReaderWriter/GCodeReader.cs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,11 @@ public void ParseGCodeFile()
186186

187187
currentVB = new VectorBlock
188188
{
189-
MarkingParamsKey = 0
189+
MarkingParamsKey = 0,
190+
MetaData = new VectorBlock.Types.VectorBlockMetaData
191+
{
192+
PartKey = 0
193+
}
190194
};
191195

192196
switch (firstGCodeCommand)
@@ -366,6 +370,13 @@ public void ParseGCodeFile()
366370
CompleteJob.MarkingParamsMap.MergeFrom(MPsMap);
367371
}
368372

373+
Part part = new Part();
374+
part.GeometryInfo = new Part.Types.GeometryInfo()
375+
{
376+
BuildHeightInMm = position.Z
377+
};
378+
CompleteJob.PartsMap.Add(0, part);
379+
369380
_cacheState = CacheState.CompleteJobCached;
370381

371382
void updatePosition(MovementCommand movementCmd)
@@ -394,7 +405,13 @@ void NewVectorBlock()
394405
currentWP.VectorBlocks.Add(currentVB);
395406
currentWP.NumBlocks++;
396407

397-
currentVB = new VectorBlock();
408+
currentVB = new VectorBlock()
409+
{
410+
MetaData = new VectorBlock.Types.VectorBlockMetaData
411+
{
412+
PartKey = 0
413+
}
414+
};
398415

399416
VBlocked = true;
400417
}

0 commit comments

Comments
 (0)