# LinearSegment struct

Namespace: [Grasshopper2.Geometry.SpatialTree](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.geometry.spatialtree.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public struct LinearSegment
```

Represents a line by origin and span vector.

## Constructors

- [LinearSegment](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.spatialtree.linearsegment/ctor.md): (5 overloads) Create a 2d spatial line from start and end coordinates.

## Properties

- [Point](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.spatialtree.linearsegment/point.md): Gets the line start point.
- [Span](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.spatialtree.linearsegment/span.md): Gets the line span vector.
- [Tangent](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.spatialtree.linearsegment/tangent.md): Gets the line unit tangent vector.

## Methods

- [ClosestParameter](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.spatialtree.linearsegment/closestparameter.md): Get the parameter on the line closest to a point.
- [ClosestPoint](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.spatialtree.linearsegment/closestpoint.md): Project a point onto the line.
- [CrossingPoint](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.spatialtree.linearsegment/crossingpoint.md): (2 overloads) Find the parameter on the line at which it intersects a given slice.
- [DistanceTo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.spatialtree.linearsegment/distanceto.md): (2 overloads) Gets the distance to a line.
- [Evaluate](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.spatialtree.linearsegment/evaluate.md): Evaluate this line a given parameter.
- [QuadranceTo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.spatialtree.linearsegment/quadranceto.md): (2 overloads) Gets the quadrance to a line.
- [To2D](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.spatialtree.linearsegment/to2d.md): Flatten this line by removing all z data.
