BooleanOp

BooleanOp

Class BooleanOp implements boolean operations on polygons

Constructor

new BooleanOp()

Source:

Methods

(static) intersect(polygon1, polygon2) → {Flatten.Polygon}

Intersect two polygons and returns new polygon Point belongs to the resultes polygon is it belongs to the first AND to the second polygon
Source:
Parameters:
Name Type Description
polygon1 Flatten.Polygon first operand
polygon2 Flatten.Polygon second operand
Returns:
Type:
Flatten.Polygon

(static) subtract(polygon1, polygon2) → {Flatten.Polygon}

Subtract second polygon from the first and returns new polygon Point belongs to the resulted polygon if it belongs to the first polygon AND NOT to the second polygon
Source:
Parameters:
Name Type Description
polygon1 Flatten.Polygon first operand
polygon2 Flatten.Polygon second operand
Returns:
Type:
Flatten.Polygon

(static) unify(polygon1, polygon2) → {Flatten.Polygon}

Unify two polygons polygons and returns new polygon.
Point belongs to the resulted polygon if it belongs to the first OR to the second polygon
Source:
Parameters:
Name Type Description
polygon1 Flatten.Polygon first operand
polygon2 Flatten.Polygon second operand
Returns:
Type:
Flatten.Polygon