90 lines
313 KiB
Markdown
90 lines
313 KiB
Markdown
---
|
|
title: "hollow"
|
|
subtitle: "Function in std::solid"
|
|
excerpt: "Make the inside of a 3D object hollow."
|
|
layout: manual
|
|
---
|
|
|
|
Make the inside of a 3D object hollow.
|
|
|
|
```kcl
|
|
hollow(
|
|
@solid: Solid,
|
|
thickness: number(Length),
|
|
): Solid
|
|
```
|
|
|
|
Remove volume from a 3-dimensional shape such that a wall of the
|
|
provided thickness remains around the exterior of the shape.
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `solid` | [`Solid`](/docs/kcl-std/types/std-types-Solid) | Which solid to hollow out | Yes |
|
|
| `thickness` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | The thickness of the remaining shell | Yes |
|
|
|
|
### Returns
|
|
|
|
[`Solid`](/docs/kcl-std/types/std-types-Solid) - A solid is a collection of extruded surfaces.
|
|
|
|
|
|
### Examples
|
|
|
|
```kcl
|
|
// Hollow a basic sketch.
|
|
firstSketch = startSketchOn(XY)
|
|
|> startProfile(at = [-12, 12])
|
|
|> line(end = [24, 0])
|
|
|> line(end = [0, -24])
|
|
|> line(end = [-24, 0])
|
|
|> close()
|
|
|> extrude(length = 6)
|
|
|> hollow(thickness = 0.25)
|
|
|
|
```
|
|
|
|

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

|
|
|
|
```kcl
|
|
// Hollow a sketch on face object.
|
|
size = 100
|
|
case = startSketchOn(-XZ)
|
|
|> startProfile(at = [-size, -size])
|
|
|> line(end = [2 * size, 0])
|
|
|> line(end = [0, 2 * size])
|
|
|> tangentialArc(endAbsolute = [-size, size])
|
|
|> close()
|
|
|> extrude(length = 65)
|
|
|
|
thing1 = startSketchOn(case, face = END)
|
|
|> circle(center = [-size / 2, -size / 2], radius = 25)
|
|
|> extrude(length = 50)
|
|
|
|
thing2 = startSketchOn(case, face = END)
|
|
|> circle(center = [size / 2, -size / 2], radius = 25)
|
|
|> extrude(length = 50)
|
|
|
|
hollow(case, thickness = 0.5)
|
|
|
|
```
|
|
|
|

|
|
|
|
|