Files
modeling-app/docs/kcl/circle.md
Jess Frazelle 0d48dff151 dont escape the markdown shit (#4049)
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2024-09-30 12:39:24 -07:00

245 KiB

title, excerpt, layout
title excerpt layout
circle Construct a 2-dimensional circle, of the specified radius, centered at manual

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

Name Type Description Required
data CircleData Data for drawing an circle Yes
sketch_surface_or_group SketchOrSurface A sketch surface or a sketch. Yes
tag TagDeclarator No

Returns

Sketch - A sketch is a collection of paths.

Examples

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

const example = extrude(5, exampleSketch)

Rendered example of circle 0

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

const example = extrude(5, exampleSketch)

Rendered example of circle 1