kcl

circle

Construct a 2-dimensional circle, of the specified radius, centered at

the provided (x, y) origin point.

circle(data: CircleData, sketch_surface_or_group: SketchOrSurface, tag?: TagDeclarator) -> Sketch

Arguments

NameTypeDescriptionRequired
dataCircleDataData for drawing an circleYes
sketch_surface_or_groupSketchOrSurfaceA sketch surface or a sketch.Yes
tagTagDeclaratorNo

Returns

Sketch - A sketch is a collection of paths.

Examples

exampleSketch = startSketchOn("-XZ")
  |> circle({ center = [0, 0], radius = 10 }, %)

example = extrude(5, exampleSketch)

Rendered example of circle 0

exampleSketch = startSketchOn("XZ")
  |> startProfileAt([-15, 0], %)
  |> line([30, 0], %)
  |> line([0, 30], %)
  |> line([-30, 0], %)
  |> close(%)
  |> hole(circle({ center = [0, 15], radius = 5 }, %), %)

example = extrude(5, exampleSketch)

Rendered example of circle 1