Logo Euclid.Kontur

KonturData<'T> Type

A Kontur together with one value of type 'T for every point of every path, for tracking where the vertices
 of a boolean result come from. Data.[p].[i] belongs to Kontur.Paths.[p].Points.[i].
 Like its Polyline2D, each array has the closing point too: its last item belongs to the repeated first point.
 The engine reads only the first item for that point, and writes the same value to both ends of a result array.
 The values can be anything: an index into the caller's own tables, a height, a color, a reference to an object.
 KonturEngine.ExecuteWithData hands the value of every input point on to the result vertex it becomes, and calls a
 function of the caller for every new vertex where two segments cross.
 Like a Kontur, a KonturData does not copy the arrays it is given.

Instance members

Instance member Description

this.AsString

Full Usage: this.AsString

Returns: string

Format this KonturData into a string with its Kontur.

Returns: string

this.Data

Full Usage: this.Data

Returns: ResizeArray<'T[]>

One array of values per path of the Kontur, with one value per point of that path, the closing point included. This is the live internal list.

Returns: ResizeArray<'T[]>

this.Kontur

Full Usage: this.Kontur

Returns: Kontur

The Kontur the values belong to.

Returns: Kontur

Static members

Static member Description

KonturData.create (kontur, data)

Full Usage: KonturData.create (kontur, data)

Parameters:
    kontur : Kontur - The Kontur the values belong to.
    data : 'T[] seq - One array per path of the Kontur, each with one value per point of its Polyline2D, the closing point included. The value of the closing point is not used, the value of the first point stands for both.

Returns: KonturData<'T> A new KonturData.

Creates a KonturData from a Kontur and one array of values per path. The list is copied, the arrays are not.

kontur : Kontur

The Kontur the values belong to.

data : 'T[] seq

One array per path of the Kontur, each with one value per point of its Polyline2D, the closing point included. The value of the closing point is not used, the value of the first point stands for both.

Returns: KonturData<'T>

A new KonturData.

KonturData.createSingleton (path, data, ?fillRule)

Full Usage: KonturData.createSingleton (path, data, ?fillRule)

Parameters:
    path : Polyline2D - The closed Polyline2D. It must have its first point repeated as last point and at least three distinct points.
    data : 'T[] - One value per point of the Polyline2D, the closing point included. The value of the closing point is not used, the value of the first point stands for both.
    ?fillRule : FillRule - Optional, FillRule.NonZero by default. How the winding number decides what is inside.

Returns: KonturData<'T> A new KonturData with one path.

Creates a KonturData from one closed path and its values.

path : Polyline2D

The closed Polyline2D. It must have its first point repeated as last point and at least three distinct points.

data : 'T[]

One value per point of the Polyline2D, the closing point included. The value of the closing point is not used, the value of the first point stands for both.

?fillRule : FillRule

Optional, FillRule.NonZero by default. How the winding number decides what is inside.

Returns: KonturData<'T>

A new KonturData with one path.

KonturData.init (kontur, valueOf)

Full Usage: KonturData.init (kontur, valueOf)

Parameters:
    kontur : Kontur - The Kontur the values belong to.
    valueOf : int -> int -> 'T - Gets the index of the path in kontur.Paths and the index of the point in its Polyline2D and returns the value of that point.

Returns: KonturData<'T> A new KonturData.

Creates a KonturData by calling a function for every point of every path. The closing point of each path gets the value of its first point, the function is not called for it.

kontur : Kontur

The Kontur the values belong to.

valueOf : int -> int -> 'T

Gets the index of the path in kontur.Paths and the index of the point in its Polyline2D and returns the value of that point.

Returns: KonturData<'T>

A new KonturData.

Type something to start searching.