# OrthoGrid class

Namespace: [Grasshopper2.UI.Grid](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.ui.grid.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public class OrthoGrid
```

Immutable class for rendering orthogonal grids into graphics contexts.

## Constructors

- [OrthoGrid](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/ctor.md): Constructor.

## Properties

- [Default](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/default.md): (static) Gets the default grid Grasshopper usually draws.
- [DefaultTight](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/defaulttight.md): (static) Gets the default grid for drawing tight grids.
- [Marks](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/marks.md): Gets the grid lines properties.
- [XAxis](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/xaxis.md): Gets the grid x-axis properties.
- [XLines](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/xlines.md): Gets the properties for the lines parallel to the x-axis.
- [YAxis](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/yaxis.md): Gets the grid y-axis properties.
- [YLines](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/ylines.md): Gets the properties for the lines parallel to the y-axis.

## Methods

- [ControlToGrid](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/controltogrid.md): Map a coordinate from control space into grid space.
- [Draw](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/draw.md): Draw this grid into a control graphics context. The grid drawing is designed to work in control-space, not content space. You should provide a graphics context without zoom transformations.
- [GridToControl](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/gridtocontrol.md): Map a coordinate from grid space into control space.
- [ResolveSnapping](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/resolvesnapping.md): Determine the snapping intervals in the X and Y directions. This only works after a grid has been successfully drawn.
- [Setup](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/setup.md): (2 overloads) Setup a specific projection. This method must be called before any calls to RenderXXXX() methods.
- [WithAxes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/withaxes.md): Swap out the X and Y-Axis style of this grid.
- [WithAxisColours](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/withaxiscolours.md): Change the axis colours of this grid.
- [WithLines](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/withlines.md): Swap out the X and Y-Line style of this grid.
- [WithMarks](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/withmarks.md): Swap out the Marker style of this grid.
- [WithXAxis](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/withxaxis.md): Swap out the X-Axis style of this grid.
- [WithXLines](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/withxlines.md): Swap out the X-Line style of this grid.
- [WithYAxis](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/withyaxis.md): Swap out the Y-Axis style of this grid.
- [WithYLines](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.grid.orthogrid/withylines.md): Swap out the X-Line style of this grid.
