# IStencil interface

Namespace: [Grasshopper2.Data](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.data.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public interface IStencil
```

Defines a somewhat mutable, fully allocated tree to be populated at leisure. In a way this interface acts as a TreeBuilder pattern, but it is not called TreeBuilder because the size of the tree it populates must be set at construction. Maybe at some point in the future a fully mutable builder pattern will be provided in the api.

**Derived types:** [IStencil<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil-1.md)

## Properties

- [StencilAccess](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil/stencilaccess.md): Gets the access level for this stencil. Only those SetXXXX methods which are compatible with the access will work, the remainder will throw exceptions.

## Methods

- [SetArray](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil/setarray.md): (3 overloads) Set all items, meta data and null flags at the specified coverage.
- [SetItem](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil/setitem.md): (2 overloads) Set the item and meta data values at the specified coverage site.
- [SetPear](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil/setpear.md): Set the item, meta data and null values at the specified coverage site.
- [SetTree](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil/settree.md): Set an entire tree at the specified coverage site.
- [SetTwig](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil/settwig.md): Set an entire twig at the specified coverage.
- [ToTree](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil/totree.md): Gets the data tree representing the current state of the stencil.
