* Show a more reasonable name in function docs Signed-off-by: Nick Cameron <nrc@ncameron.org> * Fix buggy docs for union types Signed-off-by: Nick Cameron <nrc@ncameron.org> * Make types in the docs signatures into links Signed-off-by: Nick Cameron <nrc@ncameron.org> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org>
70 KiB
70 KiB
title, excerpt, layout
title | excerpt | layout |
---|---|---|
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](/docs/kcl/types/Sketch),
control1: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
control2: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
end: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
tag?: [TagDeclarator](/docs/kcl/types#tag-declaration),
): [Sketch](/docs/kcl/types/Sketch)
Arguments
Name | Type | Description | Required |
---|---|---|---|
sketch |
Sketch |
Which sketch should this path be added to? | Yes |
control1 |
[number] |
First control point for the cubic | Yes |
control2 |
[number] |
Second control point for the cubic | Yes |
end |
[number] |
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
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)