> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ntop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Graph from Line Segments

## About this Block

**What it does:** The **Graph from Line Segments** block converts line segments to a graph type.

**Common uses:**

* Used as a utility block for creating a Custom Graph Unit Cell. Use as the input into the **Custom Unit Cell** block.
* Used for support structure generation.

**Tips:**

* Any invalid (infinite line or NaN endpoint) line segments are ignored and will not be in the output Graph.
* Duplicate line segments are removed from the Graph.

## Example File

Download Example: [Graph from Line Segments](https://storage.googleapis.com/files-learn/static/ExtendedBlockDocs/Graph_from_Line_Segments.ntop)
![Example Screenshot](https://storage.googleapis.com/files-learn/static/ExtendedBlockDocs/Graph_from_Line_Segments.png)

***

Constructs a Graph from a list of Line Segments.

Each Line Segment becomes a beam in the resulting Graph. Line Segments that share endpoints will join a shared vertex. Duplicate Line Segments will be removed.

### Inputs

| Name          | Type                                                    | Description                           |
| ------------- | ------------------------------------------------------- | ------------------------------------- |
| Line segments | [Line List](../../../../block-documentation/types/line) | Line Segments to construct the Graph. |

### Outputs

| Type                                                 |
| ---------------------------------------------------- |
| [Graph](../../../../block-documentation/types/graph) |
