Add GCode debug panel, add accessors for current render feature

This commit is contained in:
John Lewin 2019-02-22 09:22:13 -08:00
parent 0cf45edd16
commit a848b0fb41
4 changed files with 156 additions and 3 deletions

View file

@ -177,6 +177,22 @@ namespace MatterHackers.GCodeVisualizer
return renderFeatures[layerToCountFeaturesOn].Count;
}
public RenderFeatureBase this[int layerIndex, int featureIndex]
{
get
{
try
{
return renderFeatures[layerIndex][featureIndex - 1];
}
catch
{
// Lazy guard for invalid indexes - callers should test for non-null values
return null;
}
}
}
public void Render(Graphics2D graphics2D, GCodeRenderInfo renderInfo)
{
if (renderFeatures.Count > 0)