Options
All
• Public
• Public/Protected
• All

# Interface ConstructiveGeometry

Offers methods to perform boolean operations on shapes. Use ConstructiveGeometryFactory to create instances of this class. For geodesy calculations see Geodesy. The following shapes are supported:

The resulting shapes will also be `Point`, `Polyline`, `Polygon`, `ComplexPolygon` instances, or `ShapeList` instances containing those shapes. For example:

• Point results from:
• The union or intersection of two points on top of each other
• The intersection of a polygon touching another shape with a corner
• The intersection of a polygon touching another shape with a corner
• Polyline results from:
• Set operations with polylines
• The intersection of filled shapes that touch each other with their boundary
• ComplexPolygon results from set operations with filled shapes.
• ShapeList with multiple elements. This occurs if the result consists of multiple polylines, for example, or a combination of points, polylines and polygons.
• ShapeList without elements: represents an empty result, for example the intersection between two disjoint shapes.

### Hierarchy

• ConstructiveGeometry

## Methods

### difference

• Calculates the difference of the given shapes. All next shapes are subtracted from the first shape. The returned shape may be any type of shape, or a shape list of multiple shapes, depending on what is required to describe the resulting shape.

For example, the difference of the red and blue shape is the green shape:

#### Parameters

• ##### shapes: Shape[]

The operands of the boolean operation. There must be at least two shapes.

#### Returns Shape

the result of the boolean operation.

### intersection

• Calculates the intersection of the given shapes. The resulting shape only contains points that are contained in all of the given shapes. The returned shape may be any type of shape, or a shape list of multiple shapes, depending on what is required to describe the resulting shape.

For example, the intersection of the red and blue shape is the green shape:

#### Parameters

• ##### shapes: Shape[]

The operands of the boolean operation. There must be at least two shapes.

#### Returns Shape

the result of the boolean operation.

### union

• Calculates the union of the given shapes. The resulting shape contains all points that are contained in any of the given shapes. The returned shape may be any type of shape, or a shape list of multiple shapes, depending on what is required to describe the resulting shape.

For example, the union of the red and blue shape is the resulting green shape:

#### Parameters

• ##### shapes: Shape[]

The operands of the boolean operation. There must be at least two shapes.

#### Returns Shape

the result of the boolean operation.

## Legend

• Module
• Object literal
• Variable
• Function
• Function with type parameter
• Index signature
• Type alias
• Type alias with type parameter
• Enumeration
• Enumeration member
• Property
• Method
• Interface
• Interface with type parameter
• Constructor
• Property
• Method
• Index signature
• Class
• Class with type parameter
• Constructor
• Property
• Method
• Accessor
• Index signature
• Inherited constructor
• Inherited property
• Inherited method
• Inherited accessor
• Protected property
• Protected method
• Protected accessor
• Private property
• Private method
• Private accessor
• Static property
• Static method