shell_part
Hollow out a solid body to a specified wall thickness, leaving selected faces open for openings. Ideal for creating cast housings or plastic enclosures.
Instructions
Vaciado de pared (shell) — hollow out the body, optionally removing the listed faces to leave openings.
selector (recommended) — pick the open face(s) by INTENT, e.g. leave
the top face open: selector={"filter": {"geom": "planar",
"normal_axis": "+z"}}. Same face-selector schema as create_sketch_on_face
(filter geom/body/normal_axis/axis/area, sort, pick). May match several
faces (each becomes an opening). Mutually exclusive with face_centroids_mm.
Junior workflow: "haz un vaciado de 2mm dejando la cara superior
abierta" — common for cast housings (carcasas), plastic enclosures
(gabinetes), and any hollow case with an opening. SolidWorks shells
the entire body to the given wall thickness; faces listed in
face_centroids_mm become open holes.
Args:
thickness_mm: Espesor de pared (wall thickness) in mm. Must be
positive and less than half the smallest body dimension —
SW silently rejects thicknesses too large to fit.
face_centroids_mm: Faces to leave open. Pass a list of [x, y, z]
centroids from list_faces(). None or [] = closed shell
(the whole body hollowed, no openings). Each centroid must
match a real face within 0.01 mm.
outward: False (default) puts the shell wall INSIDE the original
surface — the standard "hollow housing" intent. True keeps
the shell outside (offset surface outward) — rare; only for
special cases.
Returns the new Vaciado feature (type=shell, D1=thickness_mm).
Caveat: shell is destructive of subsequent face-anchored sketches —
faces shift to the new offset surfaces. Run shell_part LATE in the
feature tree, after all face-anchored boses/cuts are placed.
Example — 2mm-walled cup, 50×50×40 mm with the top open: create_sketch("front") create_rectangle(0, 0, 50, 50) extrude_sketch(40) faces = list_faces() top = max( (f for f in faces if f["normal"][2] > 0.9), key=lambda f: f["centroid_mm"][2], ) shell_part(2.0, face_centroids_mm=[top["centroid_mm"]])
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| outward | No | ||
| selector | No | ||
| thickness_mm | Yes | ||
| face_centroids_mm | No |