* Parse an unparse type decls (and refactor impl attributes slightly) Signed-off-by: Nick Cameron <nrc@ncameron.org> * Remove special treatment of geometric types from parser and executor Signed-off-by: Nick Cameron <nrc@ncameron.org> * Generate docs for std types Signed-off-by: Nick Cameron <nrc@ncameron.org> * Hover tool-tips for types and fixup the frontend Signed-off-by: Nick Cameron <nrc@ncameron.org> * Fixes Signed-off-by: Nick Cameron <nrc@ncameron.org> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org>
86 lines
313 KiB
Markdown
86 lines
313 KiB
Markdown
---
|
|
title: "hollow"
|
|
excerpt: "Make the inside of a 3D object hollow."
|
|
layout: 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.
|
|
|
|
```js
|
|
hollow(
|
|
thickness: number,
|
|
solid: Solid,
|
|
): Solid
|
|
```
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `thickness` | [`number`](/docs/kcl/types/number) | | Yes |
|
|
| `solid` | [`Solid`](/docs/kcl/types/Solid) | | Yes |
|
|
|
|
### Returns
|
|
|
|
[`Solid`](/docs/kcl/types/Solid)
|
|
|
|
|
|
### Examples
|
|
|
|
```js
|
|
// 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, %)
|
|
```
|
|
|
|

|
|
|
|
```js
|
|
// 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, %)
|
|
```
|
|
|
|

|
|
|
|
```js
|
|
// 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)
|
|
```
|
|
|
|

|
|
|
|
|