Files
modeling-app/docs/kcl-std/bezierCurve.md
Nick Cameron 1841e63021 Misc docs polishing (#6712)
* Fake modules for Rust std lib functions

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

* Include the missing @ in Rust std lib fns

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

* Move revolve and mirror2d to better modules

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

* Use docs from KCL mods for type summaries

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

* Use type docs to describe types from KCL std lib

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

---------

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

70 KiB

title, excerpt, layout
title excerpt layout
std::sketch::bezierCurve Draw a smooth, continuous, curved line segment from the current origin to the desired (x, y), using a number of control points to shape the curve's shape. manual

Draw a smooth, continuous, curved line segment from the current origin to the desired (x, y), using a number of control points to shape the curve's shape.

bezierCurve(
  @sketch: Sketch,
  control1: Point2d,
  control2: Point2d,
  end: Point2d,
  tag?: TagDeclarator,
): Sketch

Arguments

Name Type Description Required
sketch Sketch Which sketch should this path be added to? Yes
control1 Point2d First control point for the cubic Yes
control2 Point2d Second control point for the cubic Yes
end Point2d How far away (along the X and Y axes) should this line go? Yes
tag TagDeclarator Create a new tag which refers to this line No

Returns

Sketch - A sketch is a collection of paths.

Examples

exampleSketch = startSketchOn(XZ)
  |> startProfile(at = [0, 0])
  |> line(end = [0, 10])
  |> bezierCurve(control1 = [5, 0], control2 = [5, 10], end = [10, 10])
  |> line(endAbsolute = [10, 0])
  |> close()

example = extrude(exampleSketch, length = 10)

Rendered example of std::sketch::bezierCurve 0