# HatchLine class

Namespace: [Rhino.DocObjects](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.docobjects.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md) · Since v8.0

```cs
public class HatchLine : IDisposable
```

Hatch lines are used by hatch pattern to specify the dashes and offset patterns of the lines.

**Remarks:** Each line has the following information: Angle is the direction of the line counter-clockwise from the x-axis. The first line origin is at the base point. Each line repetition is offset from the previous line. Offset.X is parallel to the line and Offset.Y is perpendicular to the line. The base and offset values are rotated by the line's angle to produce a location in the hatch pattern's coordinate system. There can be gaps and dashes specified for drawing the line. If there are no dashes, the line is solid. Negative length dashes are gaps. Positive length dashes are drawn as line segments.

## Constructors

- [HatchLine](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.hatchline/ctor.md): (2 overloads) Construts a new hatch line.

## Finalizer

- [~HatchLine](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.hatchline/finalize.md): Passively releases the unmanaged object.

## Properties

- [Angle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.hatchline/angle.md): Gets and sets the angle, in radians, of the hatch line. The angle is measured counter-clockwise from the x-axis.
- [BasePoint](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.hatchline/basepoint.md): Get and sets this line's 2d base point.
- [DashCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.hatchline/dashcount.md): Gets the number of dashes + gaps in this line.
- [GetDashes](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.hatchline/getdashes.md): Gets all of the dashes.
- [IsValid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.hatchline/isvalid.md): Verifies a hatch line is valid.
- [Offset](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.hatchline/offset.md): Get and sets this line's 2d offset for line repetitions. Offset.X is shift parallel to line. Offset.Y is spacing perpendicular to line.
- [PatternLength](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.hatchline/patternlength.md): Get the total length of a pattern repeat.

## Methods

- [AppendDash](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.hatchline/appenddash.md): Add a dash to the pattern.
- [DashAt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.hatchline/dashat.md): Get the dash length at the specified index.
- [Dispose](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.hatchline/dispose.md): (2 overloads) Actively releases the unmanaged object.
- [SetDashes](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.hatchline/setdashes.md): Sets a new dash array.
