Files
modeling-app/docs/kcl/hollow.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

303 KiB

title, excerpt, layout
title excerpt layout
hollow Make the inside of a 3D object hollow. manual

Make the inside of a 3D object hollow.

Remove volume from a 3-dimensional shape such that a wall of the provided thickness remains around the exterior of the shape.

hollow(thickness: number, solid: Solid) -> Solid

Arguments

Name Type Description Required
thickness number Yes
solid Solid An solid is a collection of extrude surfaces. Yes

Returns

Solid - An solid is a collection of extrude surfaces.

Examples

// Hollow a basic sketch.
firstSketch = startSketchOn('XY')
  |> startProfileAt([-12, 12], %)
  |> line([24, 0], %)
  |> line([0, -24], %)
  |> line([-24, 0], %)
  |> close(%)
  |> extrude(6, %)
  |> hollow(0.25, %)

Rendered example of hollow 0

// Hollow a basic sketch.
firstSketch = startSketchOn('-XZ')
  |> startProfileAt([-12, 12], %)
  |> line([24, 0], %)
  |> line([0, -24], %)
  |> line([-24, 0], %)
  |> close(%)
  |> extrude(6, %)
  |> hollow(0.5, %)

Rendered example of hollow 1

// Hollow a sketch on face object.
size = 100
case = startSketchOn('-XZ')
  |> startProfileAt([-size, -size], %)
  |> line([2 * size, 0], %)
  |> line([0, 2 * size], %)
  |> tangentialArcTo([-size, size], %)
  |> close(%)
  |> extrude(65, %)

thing1 = startSketchOn(case, 'end')
  |> circle({
       center: [-size / 2, -size / 2],
       radius: 25
     }, %)
  |> extrude(50, %)

thing2 = startSketchOn(case, 'end')
  |> circle({
       center: [size / 2, -size / 2],
       radius: 25
     }, %)
  |> extrude(50, %)

hollow(0.5, case)

Rendered example of hollow 2