* renames Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix parse Signed-off-by: Jess Frazelle <github@jessfraz.com> fix typos Signed-off-by: Jess Frazelle <github@jessfraz.com> docs Signed-off-by: Jess Frazelle <github@jessfraz.com> update tests Signed-off-by: Jess Frazelle <github@jessfraz.com> empty * fix; Signed-off-by: Jess Frazelle <github@jessfraz.com> * new Signed-off-by: Jess Frazelle <github@jessfraz.com> * add the types pages Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Look at this (photo)Graph *in the voice of Nickelback* * empty * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
194 lines
690 KiB
Markdown
194 lines
690 KiB
Markdown
---
|
|
title: "shell"
|
|
excerpt: "Remove volume from a 3-dimensional shape such that a wall of the"
|
|
layout: manual
|
|
---
|
|
|
|
Remove volume from a 3-dimensional shape such that a wall of the
|
|
|
|
provided thickness remains, taking volume starting at the provided face, leaving it open in that direction.
|
|
|
|
```js
|
|
shell(data: ShellData, solid_set: SolidSet) -> SolidSet
|
|
```
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `data` | [`ShellData`](/docs/kcl/types/ShellData) | Data for shells. | Yes |
|
|
| `solid_set` | [`SolidSet`](/docs/kcl/types/SolidSet) | A solid or a group of solids. | Yes |
|
|
|
|
### Returns
|
|
|
|
[`SolidSet`](/docs/kcl/types/SolidSet) - A solid or a group of solids.
|
|
|
|
|
|
### Examples
|
|
|
|
```js
|
|
// Remove the end face for the extrusion.
|
|
const firstSketch = startSketchOn('XY')
|
|
|> startProfileAt([-12, 12], %)
|
|
|> line([24, 0], %)
|
|
|> line([0, -24], %)
|
|
|> line([-24, 0], %)
|
|
|> close(%)
|
|
|> extrude(6, %)
|
|
|
|
// Remove the end face for the extrusion.
|
|
shell({ faces: ['end'], thickness: 0.25 }, firstSketch)
|
|
```
|
|
|
|

|
|
|
|
```js
|
|
// Remove the start face for the extrusion.
|
|
const firstSketch = startSketchOn('-XZ')
|
|
|> startProfileAt([-12, 12], %)
|
|
|> line([24, 0], %)
|
|
|> line([0, -24], %)
|
|
|> line([-24, 0], %)
|
|
|> close(%)
|
|
|> extrude(6, %)
|
|
|
|
// Remove the start face for the extrusion.
|
|
shell({ faces: ['start'], thickness: 0.25 }, firstSketch)
|
|
```
|
|
|
|

|
|
|
|
```js
|
|
// Remove a tagged face and the end face for the extrusion.
|
|
const firstSketch = startSketchOn('XY')
|
|
|> startProfileAt([-12, 12], %)
|
|
|> line([24, 0], %)
|
|
|> line([0, -24], %)
|
|
|> line([-24, 0], %, $myTag)
|
|
|> close(%)
|
|
|> extrude(6, %)
|
|
|
|
// Remove a tagged face for the extrusion.
|
|
shell({ faces: [myTag], thickness: 0.25 }, firstSketch)
|
|
```
|
|
|
|

|
|
|
|
```js
|
|
// Remove multiple faces at once.
|
|
const firstSketch = startSketchOn('XY')
|
|
|> startProfileAt([-12, 12], %)
|
|
|> line([24, 0], %)
|
|
|> line([0, -24], %)
|
|
|> line([-24, 0], %, $myTag)
|
|
|> close(%)
|
|
|> extrude(6, %)
|
|
|
|
// Remove a tagged face and the end face for the extrusion.
|
|
shell({
|
|
faces: [myTag, 'end'],
|
|
thickness: 0.25
|
|
}, firstSketch)
|
|
```
|
|
|
|

|
|
|
|
```js
|
|
// Shell a sketch on face.
|
|
let size = 100
|
|
const case = startSketchOn('-XZ')
|
|
|> startProfileAt([-size, -size], %)
|
|
|> line([2 * size, 0], %)
|
|
|> line([0, 2 * size], %)
|
|
|> tangentialArcTo([-size, size], %)
|
|
|> close(%)
|
|
|> extrude(65, %)
|
|
|
|
const thing1 = startSketchOn(case, 'end')
|
|
|> circle({
|
|
center: [-size / 2, -size / 2],
|
|
radius: 25
|
|
}, %)
|
|
|> extrude(50, %)
|
|
|
|
const thing2 = startSketchOn(case, 'end')
|
|
|> circle({
|
|
center: [size / 2, -size / 2],
|
|
radius: 25
|
|
}, %)
|
|
|> extrude(50, %)
|
|
|
|
// We put "case" in the shell function to shell the entire object.
|
|
shell({ faces: ['start'], thickness: 5 }, case)
|
|
```
|
|
|
|

|
|
|
|
```js
|
|
// Shell a sketch on face object on the end face.
|
|
let size = 100
|
|
const case = startSketchOn('XY')
|
|
|> startProfileAt([-size, -size], %)
|
|
|> line([2 * size, 0], %)
|
|
|> line([0, 2 * size], %)
|
|
|> tangentialArcTo([-size, size], %)
|
|
|> close(%)
|
|
|> extrude(65, %)
|
|
|
|
const thing1 = startSketchOn(case, 'end')
|
|
|> circle({
|
|
center: [-size / 2, -size / 2],
|
|
radius: 25
|
|
}, %)
|
|
|> extrude(50, %)
|
|
|
|
const thing2 = startSketchOn(case, 'end')
|
|
|> circle({
|
|
center: [size / 2, -size / 2],
|
|
radius: 25
|
|
}, %)
|
|
|> extrude(50, %)
|
|
|
|
// We put "thing1" in the shell function to shell the end face of the object.
|
|
shell({ faces: ['end'], thickness: 5 }, thing1)
|
|
```
|
|
|
|

|
|
|
|
```js
|
|
// Shell sketched on face objects on the end face, include all sketches to shell
|
|
// the entire object.
|
|
|
|
|
|
let size = 100
|
|
const case = startSketchOn('XY')
|
|
|> startProfileAt([-size, -size], %)
|
|
|> line([2 * size, 0], %)
|
|
|> line([0, 2 * size], %)
|
|
|> tangentialArcTo([-size, size], %)
|
|
|> close(%)
|
|
|> extrude(65, %)
|
|
|
|
const thing1 = startSketchOn(case, 'end')
|
|
|> circle({
|
|
center: [-size / 2, -size / 2],
|
|
radius: 25
|
|
}, %)
|
|
|> extrude(50, %)
|
|
|
|
const thing2 = startSketchOn(case, 'end')
|
|
|> circle({
|
|
center: [size / 2, -size / 2],
|
|
radius: 25
|
|
}, %)
|
|
|> extrude(50, %)
|
|
|
|
// We put "thing1" and "thing2" in the shell function to shell the end face of the object.
|
|
shell({ faces: ['end'], thickness: 5 }, [thing1, thing2])
|
|
```
|
|
|
|

|
|
|
|
|