# Edge

Class representing an edge of polygon. Edge shape may be Segment or Arc. Each edge contains references to the next and previous edges in the face of the polygon.

## Constructor

#### new Edge(shape)

Construct new instance of edge

Source:
  - classes/edge.js, line 14

##### Parameters:

Name | Type | Description
--- | --- | ---
`shape` | `Shape` | Shape of type Segment or Arc

### Classes

Edge

### Members

#### arc_length :number

"Arc distance" from the face start

Source:
  - classes/edge.js, line 44

##### Type:

- `number`

#### box

Get bounding box of the edge

Source:
  - classes/edge.js, line 92

#### bv :*

Edge inclusion flag (Flatten.INSIDE, Flatten.OUTSIDE, Flatten.BOUNDARY)

Source:
  - classes/edge.js, line 59

##### Type:

- `*`

#### bvEnd :*

End inclusion flag (inside/outside/boundary)

Source:
  - classes/edge.js, line 54

##### Type:

- `*`

#### bvStart :*

Start inclusion flag (inside/outside/boundary)

Source:
  - classes/edge.js, line 49

##### Type:

- `*`

#### end

Get edge end point

Source:
  - classes/edge.js, line 77

#### face :Face

Pointer to the face containing this edge

Source:
  - classes/edge.js, line 39

##### Type:

- `Face`

#### length

Get edge length

Source:
  - classes/edge.js, line 84

#### next :Edge

Pointer to the next edge in the face

Source:
  - classes/edge.js, line 29

##### Type:

- `Edge`

#### overlap :*

Overlap flag for boundary edge (Flatten.OVERLAP_SAME/Flatten.OVERLAP_OPPOSITE)

Source:
  - classes/edge.js, line 64

##### Type:

- `*`

#### prev :Edge

Pointer to the previous edge in the face

Source:
  - classes/edge.js, line 34

##### Type:

- `Edge`

#### shape :Segment|Arc

Shape of the edge: Segment or Arc

Source:
  - classes/edge.js, line 24

##### Type:

- `Segment` | `Arc`

#### start

Get edge start point

Source:
  - classes/edge.js, line 70

### Methods

#### contains(pt)

Returns true if point belongs to the edge, false otherwise

Source:
  - classes/edge.js, line 125

##### Parameters:

Name | Type | Description
--- | --- | ---
`pt` | `Point` | test point

#### middle() → {Point}

Get middle point of the edge

Source:
  - classes/edge.js, line 108

##### Returns:

Type:
  `Point`

#### pointAtLength(length) → {Point}

Get point at given length

Source:
  - classes/edge.js, line 117

##### Parameters:

Name | Type | Description
--- | --- | ---
`length` | `number` | The length along the edge

##### Returns:

Type:
  `Point`

#### setInclusion(polygon)

Set inclusion flag of the edge with respect to another polygon Inclusion flag is one of Flatten.INSIDE, Flatten.OUTSIDE, Flatten.BOUNDARY

Source:
  - classes/edge.js, line 134

##### Parameters:

Name | Type | Description
--- | --- | ---
`polygon` |  |

#### setOverlap(edge)

Set overlapping between two coincident boundary edges Overlapping flag is one of Flatten.OVERLAP_SAME or Flatten.OVERLAP_OPPOSITE

Source:
  - classes/edge.js, line 171

##### Parameters:

Name | Type | Description
--- | --- | ---
`edge` |  |