# IStencil<T> 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<T> : IStencil
```

Defines a somewhat mutable, fully allocated, strongly typed 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.

**Type parameters:**

- `T`

## Methods

- [SetArray](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil-1/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-1/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-1/setpear.md): Set the item, meta data and null values at the specified coverage site.
- [SetTwig](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil-1/settwig.md): Set an entire twig at the specified coverage.
- [ToTreeOfT](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil-1/totreeoft.md): Gets the data tree representing the current state of the stencil.

## Inherited Members

- From [IStencil](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil.md): [StencilAccess](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil/stencilaccess.md), [SetArray](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil/setarray.md), [SetItem](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil/setitem.md), [SetPear](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil/setpear.md), [SetTree](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil/settree.md), [SetTwig](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil/settwig.md), [ToTree](https://developer.rhino3d.com/api/gh2/type/grasshopper2.data.istencil/totree.md)
