kcl

lineTo

Draw a line from the current origin to some absolute (x, y) point.

lineTo(to: [number], sketch: Sketch, tag?: TagDeclarator) -> Sketch

Arguments

NameTypeDescriptionRequired
to[number]Yes
sketchSketchA sketch is a collection of paths.Yes
tagTagDeclaratorNo

Returns

Sketch - A sketch is a collection of paths.

Examples

exampleSketch = startSketchOn("XZ")
  |> startProfileAt([0, 0], %)
  |> lineTo([10, 0], %)
  |> lineTo([0, 10], %)
  |> lineTo([-10, 0], %)
  |> close(%)

example = extrude(5, exampleSketch)

Rendered example of lineTo 0