Logo Euclid.Kontur

KonturEngine Type

Runs boolean operations on Kontur values. Holds all scratch buffers of the algorithm, so that repeated
 operations on one engine do not allocate anything but the result Polyline2Ds.
 Not thread safe, use one engine per thread.
 The tolerance is absolute, in the units of the coordinates: points closer than the tolerance are the same
 point, a point closer than the tolerance to a segment lies on it. See DESIGN.md section 2.

Constructors

Constructor Description

KonturEngine(tolerance)

Full Usage: KonturEngine(tolerance)

Parameters:
    tolerance : float

Returns: KonturEngine
tolerance : float
Returns: KonturEngine

Instance members

Instance member Description

this.Execute

Full Usage: this.Execute

Parameters:
    subject : Kontur - The subject Kontur.
    clip : Kontur - The clip Kontur. May be empty, then Union returns the subject simplified under its fill rule.
    op : ClipType - Union, Intersection, Difference (subject minus clip) or Xor.

Returns: Kontur A simple Kontur with fill rule Positive: no self intersections, no overlaps, outer contours counter clockwise, holes clockwise. Input vertices of the result keep their exact coordinates.

Runs one boolean operation between a subject and a clip Kontur. The fill rule of each Kontur decides what is inside it, see the docs of FillRule.

subject : Kontur

The subject Kontur.

clip : Kontur

The clip Kontur. May be empty, then Union returns the subject simplified under its fill rule.

op : ClipType

Union, Intersection, Difference (subject minus clip) or Xor.

Returns: Kontur

A simple Kontur with fill rule Positive: no self intersections, no overlaps, outer contours counter clockwise, holes clockwise. Input vertices of the result keep their exact coordinates.

this.Simplify

Full Usage: this.Simplify

Parameters:
Returns: Kontur

Resolves the self intersections and overlaps of one Kontur under its fill rule. The same as a Union with an empty clip.

shape : Kontur
Returns: Kontur

this.Tolerance

Full Usage: this.Tolerance

Returns: float

The absolute tolerance of this engine.

Returns: float

this.UnionAll

Full Usage: this.UnionAll

Parameters:
Returns: Kontur

Union of any number of Kontur values, each under its own fill rule. Every Kontur is simplified on its own first, then all results are merged in one NonZero pass.

shapes : Kontur seq
Returns: Kontur

Static members

Static member Description

KonturEngine.DefaultTolerance

Full Usage: KonturEngine.DefaultTolerance

Returns: float

The default absolute tolerance: 1e-6

Returns: float

Type something to start searching.