kcl-std → functions → elliptic

ellipticFunction in std::sketch

Add an elliptic section to an existing sketch.

elliptic(
  @sketch: Sketch,
  center: Point2d,
  angleStart: number(Angle),
  angleEnd: number(Angle),
  majorRadius: number(Length),
  minorRadius: number(Length),
  tag?: tag,
): Sketch

Arguments

NameTypeDescriptionRequired
sketchSketchWhich sketch should this path be added to?Yes
centerPoint2dThe center of the ellipse.Yes
angleStartnumber(Angle)Where along the ellptic should this segment start?Yes
angleEndnumber(Angle)Where along the ellptic should this segment end?Yes
majorRadiusnumber(Length)The major radius, a, of the elliptic equation x^2 / a^2 + y^2 / b^2 = 1.Yes
minorRadiusnumber(Length)The minor radius, b, of the elliptic equation x^2 / a^2 + y^2 / b^2 = 1.Yes
tagtagCreate a new tag which refers to this arc.No

Returns

Sketch - A sketch is a collection of paths.

Examples

majorRadius = 2
minorRadius = 1
ellip = ellipticPoint(majorRadius, minorRadius, x = 2)

exampleSketch = startSketchOn(XY)
  |> startProfile(at = ellip, tag = $start)
  |> elliptic(
       center = [0, 0],
       angleStart = segAng(start),
       angleEnd = 160,
       majorRadius,
       minorRadius,
     )
  |> close()
example = extrude(exampleSketch, length = 10)

Rendered example of elliptic 0

Found a typo?