GeneratorContext

Generates g-code commands for defined operations.

Inheritors

Properties

Link copied to clipboard

Distance tolerance used for org.openrndr.shape.Segment2D.adaptivePositions when approximating curves.

Link copied to clipboard

Minimum distance for two points to be considered distinct. Consecutive points with a distance smaller than this are considered duplicates and skipped.

Functions

Link copied to clipboard
abstract fun beginContour(start: Vector2, contour: ShapeContour)

Called at the beginning of a new contour.

Link copied to clipboard
abstract fun beginFile()

Called at the beginning of a new file.

Link copied to clipboard
open fun beginLayer(layer: String, composition: Composition)

Called at the beginning of a new layer.

Link copied to clipboard
open fun beginShape(shape: Shape)

Called at the beginning of a new shape.

Link copied to clipboard
abstract fun commands(): Commands
Link copied to clipboard
abstract fun drawTo(p: Vector2)

Drawing move from the current to the given position. Called for each point of a contour, excluding the start point.

Link copied to clipboard
abstract fun endContour(contour: ShapeContour)

Called at the end of a contour. Expected to disable the drawing tool, for example, lift pen, turn laser off, etc.

Link copied to clipboard
abstract fun endFile()

Called at the end of a file.

Link copied to clipboard
open fun endLayer(layer: String, composition: Composition)

Called at the end of a composition.

Link copied to clipboard
open fun endShape(shape: Shape)

Called at the end of a shape.

Link copied to clipboard
fun GeneratorContext.render(shape: Shape)

fun GeneratorContext.render(contour: ShapeContour)

Renders the contour to the generator context.

fun GeneratorContext.render(layer: String, composition: Composition)

Renders the composition to the generator context.