DynamoVisualProgramming.ZeroTouchLibrary by Autodesk

<PackageReference Include="DynamoVisualProgramming.ZeroTouchLibrary" Version="2.17.0.3472" />

 GraphicDataProvider

using Autodesk.DesignScript.Interfaces; using System.Collections.Generic; namespace Autodesk.DesignScript.Geometry { internal class GraphicDataProvider { public List<IGraphicItem> GetGraphicItems(object obj) { DesignScriptEntity designScriptEntity = obj as DesignScriptEntity; if (designScriptEntity == null) return null; IGraphicItem item = new GeometryGraphicItem(designScriptEntity); List<IGraphicItem> list = new List<IGraphicItem>(); list.Add(item); return list; } public void Tessellate(List<object> objects, IRenderPackage package, TessellationParameters parameters) { foreach (object object in objects) { List<IGraphicItem> graphicItems = GetGraphicItems(object); if (graphicItems != null && graphicItems.Count != 0) { parameters.set_ScaleFactor(DesignScriptEntity.scaleFactor); foreach (IGraphicItem item in graphicItems) { item.Tessellate(package, parameters); } } } } } }