Files
modeling-app/docs/kcl/angledLineOfYLength.md
Paul Tagliamonte c84c0b0fef return errors back to user (#4075)
* Log any Errors to stderr

This isn't perfect -- in fact, this is maybe not even very good at all,
but it's better than what we have today.

Currently, when we get an Erorr back from the WebSocket, we drop it in
kcl-lib. The web-app logs these to the console (I can't find my commit
doing that off the top of my head, but I remember doing it) -- so this
is some degree of partity.

This won't be very useful at all for wasm usage, but it will fix issues
with the zoo cli silently breaking with a "WebSocket Closed" error --
which is the same issue I was solving for in the desktop app too.

In the future perhaps this can be a real Error? I'm not totally sure
yet, since we can't align to the request-id, so we can't really tie it
to a specific call (yet).

* add to responses

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)

* add a test

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* clippy[

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest)

* empty

* fix error

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates tests

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* docs

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
2024-10-02 22:05:12 -07:00

80 KiB

title, excerpt, layout
title excerpt layout
angledLineOfYLength Create a line segment from the current 2-dimensional sketch origin manual

Create a line segment from the current 2-dimensional sketch origin

along some angle (in degrees) for some relative length in the 'y' dimension.

angledLineOfYLength(data: AngledLineData, sketch: Sketch, tag?: TagDeclarator) -> Sketch

Arguments

Name Type Description Required
data AngledLineData Data to draw an angled line. Yes
sketch Sketch A sketch is a collection of paths. Yes
tag TagDeclarator No

Returns

Sketch - A sketch is a collection of paths.

Examples

exampleSketch = startSketchOn('XZ')
  |> startProfileAt([0, 0], %)
  |> line([10, 0], %)
  |> angledLineOfYLength({ angle: 45, length: 10 }, %)
  |> line([0, 10], %)
  |> angledLineOfYLength({ angle: 135, length: 10 }, %)
  |> line([-10, 0], %)
  |> line([0, -30], %)

example = extrude(10, exampleSketch)

Rendered example of angledLineOfYLength 0