Files
modeling-app/docs/kcl/hollow.md
Nick Cameron e8feb0309b Automatic fixing of deprecations and use non-quoted default planes by default (#5902)
* Automatic fixing of deprecations and use non-quoted default planes by default

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

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

* A snapshot a day keeps the bugs away! 📷🐛

---------

Signed-off-by: Nick Cameron <nrc@ncameron.org>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-21 09:39:12 +00:00

313 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 Yes

Returns

Solid

Examples

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

Rendered example of hollow 0

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

Rendered example of hollow 1

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

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

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

hollow(0.5, case)

Rendered example of hollow 2