Files
modeling-app/docs/kcl/shell.md
Jonathan Tran 319c60d4fa BREAKING: Change tangential arc to keyword args (#6266)
* Change tangentialArc, tangentialArcTo, and tangentialArcToRelative to keyword args

* Change tangentialArc offset to angle and convert to kw arg calls

* Fix lints

* Fix sketch errors and all unit tests passing

* Fix tangentialArcTo calls in KCL samples

* Update tangentialArc in samples

* Update sim test output

* Fix formatting

* Fix mistake in merge

* Fix gear rack sample

* Update output after more samples fixes

* Update gear rack output

* Add end label to docs snippet

* Fix to not add endAbsolute for an arc with radius or angle arguments

* Update docs outputs

* Fix formatting

* Fix executor tests

* Fix formatting

* Fix bench input files

* Fix spelling

* Improve error messages

---------

Co-authored-by: Adam Chalmers <adam.chalmers@zoo.dev>
2025-04-11 14:17:20 -04:00

708 KiB

title, excerpt, layout
title excerpt layout
shell 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. 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.

shell(
  solids: [Solid],
  thickness: number,
  faces: [FaceTag],
): [Solid]

Arguments

Name Type Description Required
solids [Solid] Which solid (or solids) to shell out Yes
thickness number The thickness of the shell Yes
faces [FaceTag] The faces you want removed Yes

Returns

[Solid]

Examples

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

Rendered example of shell 0

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

Rendered example of shell 1

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

Rendered example of shell 2

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

Rendered example of shell 3

// Shell a sketch on face.
size = 100
case = startSketchOn(-XZ)
  |> startProfileAt([-size, -size], %)
  |> line(end = [2 * size, 0])
  |> line(end = [0, 2 * size])
  |> tangentialArc(endAbsolute = [-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)

Rendered example of shell 4

// 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])
  |> tangentialArc(endAbsolute = [-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)

Rendered example of shell 5

// 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])
  |> tangentialArc(endAbsolute = [-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)

Rendered example of shell 6