Files
modeling-app/docs/kcl-std/functions/std-sketch-arc.md
Nick Cameron 3936017f10 Tag types (#7458)
* Replace tag type with tagIdent and tagDecl

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Replace tagIdent with TaggedEdge and TaggedFace

Signed-off-by: Nick Cameron <nrc@ncameron.org>

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
2025-06-16 09:10:36 +12:00

158 KiB

title, subtitle, excerpt, layout
title subtitle excerpt layout
arc Function in std::sketch Draw a curved line segment along an imaginary circle. manual

Draw a curved line segment along an imaginary circle.

arc(
  @sketch: Sketch,
  angleStart?: number(Angle),
  angleEnd?: number(Angle),
  radius?: number(Length),
  diameter?: number(Length),
  interiorAbsolute?: Point2d,
  endAbsolute?: Point2d,
  tag?: TagDecl,
): 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

Name Type Description Required
sketch Sketch Which sketch should this path be added to? Yes
angleStart number(Angle) Where along the circle should this arc start? No
angleEnd number(Angle) Where along the circle should this arc end? No
radius number(Length) How large should the circle be? Incompatible with diameter. No
diameter number(Length) How large should the circle be? Incompatible with radius. No
interiorAbsolute Point2d Any point between the arc's start and end? Requires endAbsolute. Incompatible with angleStart or angleEnd. No
endAbsolute Point2d Where should this arc end? Requires interiorAbsolute. Incompatible with angleStart or angleEnd. No
tag TagDecl Create a new tag which refers to this arc. No

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 = 280deg, 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