Files
make-cad/docs/core/shell.md
T
2026-08-05 21:32:07 +08:00

1.6 KiB

Shell

Overview

Shell is the public wrapper for one connected set of faces. A shell may be open, such as a lofted side wall, or closed, such as a sewn surface boundary. It wraps an OCP TopoDS_Shell and participates in SimpleCAD tags, metadata, QL selection, transforms, and graph replay.

Topology and Properties

  • get_faces(index=None) returns all faces or one indexed face.
  • get_edges(index=None) returns unique edges across the shell faces.
  • get_area() returns total face area.
  • is_closed() reports whether the shell has no free boundary.
  • free_boundaries_rwirelist(shell) returns the open boundary loops.
  • ql.shells() selects shells from a shell or compatible topology scope.

Construction

Use the public surface operations rather than constructing Shell from an OCP object directly:

import simplecadapi as scad

lower = scad.make_circle_rwire((0, 0, 0), 2.0)
upper = scad.make_circle_rwire((0, 0, 5), 1.0)

open_shell = scad.make_loft_rshell([lower, upper])
assert not open_shell.is_closed()
assert len(scad.free_boundaries_rwirelist(open_shell)) == 2

closed_shell = scad.fill_holes_rshell(open_shell)
assert closed_shell.is_closed()

Use shell_rsolid for the different operation that hollows a Solid by offsetting walls and removing selected faces.