Logo Euclid.Kontur

AutoOpenPolyline2DKontur Module

When Euclid is opened this module will be auto-opened. It only contains extension members for type Polyline2D: the boolean operations of the Kontur module directly on closed Polyline2Ds, without creating a Kontur first. Every Polyline2D is one region under the NonZero fill rule, so its orientation does not matter and a self intersecting Polyline2D is filled wherever it winds around. All results are simple closed contours: no self intersections, no overlaps, outer contours counter clockwise, holes clockwise. A fresh engine is created per call. For many operations in a row, for other fill rules or for regions of several paths use Kontur and KonturEngine.

Type extensions

Type extension Description

this.Difference

Full Usage: this.Difference

Parameters:
Returns: ResizeArray<Polyline2D>

Everything inside this Polyline2D but not inside the other, with the default tolerance of 1e-6. Both must be closed. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

other : Polyline2D
Returns: ResizeArray<Polyline2D>

this.DifferenceWith

Full Usage: this.DifferenceWith

Parameters:
Returns: ResizeArray<Polyline2D>

Everything inside this Polyline2D but not inside the other, with the given absolute tolerance. Both must be closed. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

tolerance : float
other : Polyline2D
Returns: ResizeArray<Polyline2D>

this.Intersection

Full Usage: this.Intersection

Parameters:
Returns: ResizeArray<Polyline2D>

Everything inside this Polyline2D and inside the other, with the default tolerance of 1e-6. Both must be closed. Returns the closed contours of the result, empty if they do not overlap.

Extended Type: Polyline2D

other : Polyline2D
Returns: ResizeArray<Polyline2D>

this.IntersectionWith

Full Usage: this.IntersectionWith

Parameters:
Returns: ResizeArray<Polyline2D>

Everything inside this Polyline2D and inside the other, with the given absolute tolerance. Both must be closed. Returns the closed contours of the result, empty if they do not overlap.

Extended Type: Polyline2D

tolerance : float
other : Polyline2D
Returns: ResizeArray<Polyline2D>

this.Simplify

Full Usage: this.Simplify

Parameters:
    () : unit

Returns: ResizeArray<Polyline2D>

Resolves the self intersections and overlaps of this closed Polyline2D under the NonZero fill rule, with the default tolerance of 1e-6. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

() : unit
Returns: ResizeArray<Polyline2D>

this.SimplifyWith

Full Usage: this.SimplifyWith

Parameters:
    tolerance : float

Returns: ResizeArray<Polyline2D>

Resolves the self intersections and overlaps of this closed Polyline2D under the NonZero fill rule, with the given absolute tolerance. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

tolerance : float
Returns: ResizeArray<Polyline2D>

this.Union

Full Usage: this.Union

Parameters:
Returns: ResizeArray<Polyline2D>

Everything inside this Polyline2D or inside the other, with the default tolerance of 1e-6. Both must be closed. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

other : Polyline2D
Returns: ResizeArray<Polyline2D>

this.UnionMany

Full Usage: this.UnionMany

Parameters:
Returns: ResizeArray<Polyline2D>

Union of this Polyline2D with any number of others, with the default tolerance of 1e-6. All must be closed. Each is filled on its own, so Polyline2Ds of opposite orientation do not cancel each other. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

others : Polyline2D seq
Returns: ResizeArray<Polyline2D>

this.UnionManyWith

Full Usage: this.UnionManyWith

Parameters:
Returns: ResizeArray<Polyline2D>

Union of this Polyline2D with any number of others, with the given absolute tolerance. All must be closed. Each is filled on its own, so Polyline2Ds of opposite orientation do not cancel each other. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

tolerance : float
others : Polyline2D seq
Returns: ResizeArray<Polyline2D>

this.UnionWith

Full Usage: this.UnionWith

Parameters:
Returns: ResizeArray<Polyline2D>

Everything inside this Polyline2D or inside the other, with the given absolute tolerance. Both must be closed. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

tolerance : float
other : Polyline2D
Returns: ResizeArray<Polyline2D>

this.Xor

Full Usage: this.Xor

Parameters:
Returns: ResizeArray<Polyline2D>

Everything inside exactly one of this Polyline2D and the other, with the default tolerance of 1e-6. Both must be closed. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

other : Polyline2D
Returns: ResizeArray<Polyline2D>

this.XorWith

Full Usage: this.XorWith

Parameters:
Returns: ResizeArray<Polyline2D>

Everything inside exactly one of this Polyline2D and the other, with the given absolute tolerance. Both must be closed. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

tolerance : float
other : Polyline2D
Returns: ResizeArray<Polyline2D>

Polyline2D.difference subject clip

Full Usage: Polyline2D.difference subject clip

Parameters:
Returns: ResizeArray<Polyline2D>

Everything inside the subject but not inside the clip, with the default tolerance of 1e-6. Both must be closed. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

subject : Polyline2D
clip : Polyline2D
Returns: ResizeArray<Polyline2D>

Polyline2D.differenceWith tolerance subject clip

Full Usage: Polyline2D.differenceWith tolerance subject clip

Parameters:
Returns: ResizeArray<Polyline2D>

Everything inside the subject but not inside the clip, with the given absolute tolerance. Both must be closed. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

tolerance : float
subject : Polyline2D
clip : Polyline2D
Returns: ResizeArray<Polyline2D>

Polyline2D.intersection subject clip

Full Usage: Polyline2D.intersection subject clip

Parameters:
Returns: ResizeArray<Polyline2D>

Everything inside the subject and inside the clip, with the default tolerance of 1e-6. Both must be closed. Returns the closed contours of the result, empty if they do not overlap.

Extended Type: Polyline2D

subject : Polyline2D
clip : Polyline2D
Returns: ResizeArray<Polyline2D>

Polyline2D.intersectionWith tolerance subject clip

Full Usage: Polyline2D.intersectionWith tolerance subject clip

Parameters:
Returns: ResizeArray<Polyline2D>

Everything inside the subject and inside the clip, with the given absolute tolerance. Both must be closed. Returns the closed contours of the result, empty if they do not overlap.

Extended Type: Polyline2D

tolerance : float
subject : Polyline2D
clip : Polyline2D
Returns: ResizeArray<Polyline2D>

Polyline2D.simplify polyline

Full Usage: Polyline2D.simplify polyline

Parameters:
Returns: ResizeArray<Polyline2D>

Resolves the self intersections and overlaps of one closed Polyline2D under the NonZero fill rule, with the default tolerance of 1e-6. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

polyline : Polyline2D
Returns: ResizeArray<Polyline2D>

Polyline2D.simplifyWith tolerance polyline

Full Usage: Polyline2D.simplifyWith tolerance polyline

Parameters:
Returns: ResizeArray<Polyline2D>

Resolves the self intersections and overlaps of one closed Polyline2D under the NonZero fill rule, with the given absolute tolerance. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

tolerance : float
polyline : Polyline2D
Returns: ResizeArray<Polyline2D>

Polyline2D.union subject clip

Full Usage: Polyline2D.union subject clip

Parameters:
Returns: ResizeArray<Polyline2D>

Everything inside the subject or inside the clip, with the default tolerance of 1e-6. Both must be closed. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

subject : Polyline2D
clip : Polyline2D
Returns: ResizeArray<Polyline2D>

Polyline2D.unionMany polylines

Full Usage: Polyline2D.unionMany polylines

Parameters:
Returns: ResizeArray<Polyline2D>

Union of any number of Polyline2Ds, with the default tolerance of 1e-6. All must be closed. Each is filled on its own, so Polyline2Ds of opposite orientation do not cancel each other. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

polylines : Polyline2D seq
Returns: ResizeArray<Polyline2D>

Polyline2D.unionManyWith tolerance polylines

Full Usage: Polyline2D.unionManyWith tolerance polylines

Parameters:
Returns: ResizeArray<Polyline2D>

Union of any number of Polyline2Ds, with the given absolute tolerance. All must be closed. Each is filled on its own, so Polyline2Ds of opposite orientation do not cancel each other. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

tolerance : float
polylines : Polyline2D seq
Returns: ResizeArray<Polyline2D>

Polyline2D.unionWith tolerance subject clip

Full Usage: Polyline2D.unionWith tolerance subject clip

Parameters:
Returns: ResizeArray<Polyline2D>

Everything inside the subject or inside the clip, with the given absolute tolerance. Both must be closed. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

tolerance : float
subject : Polyline2D
clip : Polyline2D
Returns: ResizeArray<Polyline2D>

Polyline2D.xor subject clip

Full Usage: Polyline2D.xor subject clip

Parameters:
Returns: ResizeArray<Polyline2D>

Everything inside exactly one of subject and clip, with the default tolerance of 1e-6. Both must be closed. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

subject : Polyline2D
clip : Polyline2D
Returns: ResizeArray<Polyline2D>

Polyline2D.xorWith tolerance subject clip

Full Usage: Polyline2D.xorWith tolerance subject clip

Parameters:
Returns: ResizeArray<Polyline2D>

Everything inside exactly one of subject and clip, with the given absolute tolerance. Both must be closed. Returns the closed contours of the result, outer contours counter clockwise, holes clockwise.

Extended Type: Polyline2D

tolerance : float
subject : Polyline2D
clip : Polyline2D
Returns: ResizeArray<Polyline2D>

Type something to start searching.