kcl library referencestdsketcharc

arcFunction in std::sketch

Draw a curved line segment along an imaginary circle.

arc(
  @sketch: Sketch,
  angleStart?: number,
  angleEnd?: number,
  radius?: number,
  interiorAbsolute?: Point2d,
  endAbsolute?: Point2d,
  tag?: TagDeclarator,
): Sketch

The arc is constructed such that the current position of the sketch is placed along an imaginary circle of the specified radius, at angleStart degrees. The resulting arc is the segment of the imaginary circle from that origin point to angleEnd, radius away from the center of the imaginary circle.

Unless this makes a lot of sense and feels like what you're looking for to construct your shape, you're likely looking for tangentialArc.

Arguments

NameTypeDescriptionRequired
sketchSketchWhich sketch should this path be added to?Yes
angleStartnumberWhere along the circle should this arc start?No
angleEndnumberWhere along the circle should this arc end?No
radiusnumberHow large should the circle be?No
interiorAbsolutePoint2dAny point between the arc's start and end? Requires endAbsolute. Incompatible with angleStart or angleEndNo
endAbsolutePoint2dWhere should this arc end? Requires interiorAbsolute. Incompatible with angleStart or angleEndNo
tagTagDeclaratorCreate a new tag which refers to this lineNo

Returns

Sketch - A sketch is a collection of paths.

Examples

exampleSketch = startSketchOn(XZ)
  |> startProfile(at = [0, 0])
  |> line(end = [10, 0])
  |> arc(angleStart = 0, angleEnd = 280, radius = 16)
  |> close()
example = extrude(exampleSketch, length = 10)

Rendered example of arc 0

exampleSketch = startSketchOn(XZ)
  |> startProfile(at = [0, 0])
  |> arc(endAbsolute = [10, 0], interiorAbsolute = [5, 5])
  |> close()
example = extrude(exampleSketch, length = 10)

Rendered example of arc 1