* rust side of circle args Signed-off-by: Jess Frazelle <github@jessfraz.com> * change circle in all test js files Signed-off-by: Jess Frazelle <github@jessfraz.com> * more js side Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * updates 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> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * ud[ates Signed-off-by: Jess Frazelle <github@jessfraz.com> * ud[ates Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
178 lines
708 KiB
Markdown
178 lines
708 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(
|
|
solidSet: SolidSet,
|
|
thickness: number,
|
|
faces: [FaceTag],
|
|
) -> SolidSet
|
|
```
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `solidSet` | [`SolidSet`](/docs/kcl/types/SolidSet) | Which solid (or solids) to shell out | Yes |
|
|
| `thickness` | `number` | The thickness of the shell | Yes |
|
|
| `faces` | [`[FaceTag]`](/docs/kcl/types/FaceTag) | The faces you want removed | Yes |
|
|
|
|
### Returns
|
|
|
|
[`SolidSet`](/docs/kcl/types/SolidSet) - A solid or a group of solids.
|
|
|
|
|
|
### Examples
|
|
|
|
```js
|
|
// Remove the end face for the extrusion.
|
|
firstSketch = startSketchOn('XY')
|
|
|> startProfileAt([-12, 12], %)
|
|
|> line(end = [24, 0])
|
|
|> line(end = [0, -24])
|
|
|> line(end = [-24, 0])
|
|
|> close()
|
|
|> extrude(length = 6)
|
|
|
|
// Remove the end face for the extrusion.
|
|
shell(firstSketch, faces = ['end'], thickness = 0.25)
|
|
```
|
|
|
|

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

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

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

|
|
|
|
```js
|
|
// Shell a sketch on face.
|
|
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)
|
|
|
|
// We put "case" in the shell function to shell the entire object.
|
|
shell(case, faces = ['start'], thickness = 5)
|
|
```
|
|
|
|

|
|
|
|
```js
|
|
// Shell a sketch on face object on the end face.
|
|
size = 100
|
|
case = startSketchOn('XY')
|
|
|> 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)
|
|
|
|
// We put "thing1" in the shell function to shell the end face of the object.
|
|
shell(thing1, faces = ['end'], thickness = 5)
|
|
```
|
|
|
|

|
|
|
|
```js
|
|
// Shell sketched on face objects on the end face, include all sketches to shell
|
|
// the entire object.
|
|
|
|
|
|
size = 100
|
|
case = startSketchOn('XY')
|
|
|> 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)
|
|
|
|
// We put "thing1" and "thing2" in the shell function to shell the end face of the object.
|
|
shell([thing1, thing2], faces = ['end'], thickness = 5)
|
|
```
|
|
|
|

|
|
|
|
|