GH_BakeUtility

public class GH_BakeUtility
A utility class for baking. We heavily recommend you use this for any baking, as it handles invalid objects correctly.

Constructors

GH_BakeUtility

#
public GH_BakeUtility(GH_Document document)
Create a new baker.
document (GH_Document)Grasshopper document, if any.

Properties

BakedCount

#
public int BakedCount { get; }
Gets the number of successful baking operations.

BakedIds

#
public Guid[] BakedIds { get; }
Gets all collected object ids.

InvalidCount

#
public int InvalidCount { get; }
Gets the number of invalid objects encountered.

Methods

BakeObject

#
public bool BakeObject(object obj, ObjectAttributes att, RhinoDoc doc)
Try and bake a single object.
obj (object)Object to bake, must at least implement IGH_BakeAwareData.
att (ObjectAttributes)Object attributes.
doc (RhinoDoc)
True if object was baked.

BakeObjects

#
public int BakeObjects(IEnumerable objects, ObjectAttributes att, RhinoDoc doc)
Bake a bunch of objects.
objects (IEnumerable)Objects to bake.
att (ObjectAttributes)Attributes.
doc (RhinoDoc)Document.
Number of successful bake operations.