Edge

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:
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:
Type:
  • number

box

Get bounding box of the edge
Source:

bv :*

Edge inclusion flag (Flatten.INSIDE, Flatten.OUTSIDE, Flatten.BOUNDARY)
Source:
Type:
  • *

bvEnd :*

End inclusion flag (inside/outside/boundary)
Source:
Type:
  • *

bvStart :*

Start inclusion flag (inside/outside/boundary)
Source:
Type:
  • *

end

Get edge end point
Source:

face :Face

Pointer to the face containing this edge
Source:
Type:

length

Get edge length
Source:

next :Edge

Pointer to the next edge in the face
Source:
Type:

overlap :*

Overlap flag for boundary edge (Flatten.OVERLAP_SAME/Flatten.OVERLAP_OPPOSITE)
Source:
Type:
  • *

prev :Edge

Pointer to the previous edge in the face
Source:
Type:

shape :Segment|Arc

Shape of the edge: Segment or Arc
Source:
Type:

start

Get edge start point
Source:

Methods

contains(pt)

Returns true if point belongs to the edge, false otherwise
Source:
Parameters:
Name Type Description
pt Point test point

middle() → {Point}

Get middle point of the edge
Source:
Returns:
Type:
Point

pointAtLength(length) → {Point}

Get point at given length
Source:
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:
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:
Parameters:
Name Type Description
edge