({{, (RefLink[ShellRegion, paclet:ref/ShellRegion])[reg] 
gives a solid shell of a 3D region reg.}, {, (RefLink[ShellRegion, paclet:ref/ShellRegion])[reg,t]
gives a solid shell of reg with minimal thickness t.}})

OpenersNotesSection(Spacer1)Details

(RefLink[ShellRegion, paclet:ref/ShellRegion]) is typically used to hollow out a solid to save material when printing a 3D object.

(RefLink[ShellRegion, paclet:ref/ShellRegion]) preserves the outer surface of an object.

OpenersPrimaryExamplesSection(Spacer1)Examples  (28)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Find the shell of a ball:

𝒮=ShellRegion[Ball[]]

Graphics3D[{Opacity[0.4],𝒮},Boxed->False]

Find the shell of a mesh region:

ℛ=ConvexHullMesh[RandomReal[1,{100,3}]];

𝒮=ShellRegion[ℛ];

BoundaryMeshRegion[𝒮,BaseStyle->Opacity[0.4]]

Specify a thickness:

𝒮=ShellRegion[ℛ,0.25];

BoundaryMeshRegion[𝒮,BaseStyle->Opacity[0.4]]

OpenersExampleSection1(Spacer1)Scope  (16)

OpenersExampleSubsection0(Spacer1)Basic Uses  (3)

(RefLink[ShellRegion, paclet:ref/ShellRegion]) works on solid regions:

ShellRegion[Ball[]]

Closed surfaces:

ShellRegion[Sphere[]]

Specify a thickness for a shell:

ShellRegion[Ball[],3/4]

OpenersExampleSubsection1(Spacer1)Special Regions  (8)

Find the shell of a (RefLink[Ball, paclet:ref/Ball]):

𝒮=ShellRegion[Ball[]]

Graphics3D[{Opacity[0.4],𝒮},Boxed->False]

(RefLink[Cuboid, paclet:ref/Cuboid]):

𝒮=ShellRegion[Cuboid[]];

Graphics3D[{Opacity[0.4],𝒮},Boxed->False]

(RefLink[Hexahedron, paclet:ref/Hexahedron]):

𝒮=ShellRegion[Hexahedron[{{0,0,0},{1,0,0},{2,1,0},{1,1,0},{0,0,1},{1,0,1},{2,1,1},{1,1,1}}]];

Graphics3D[{Opacity[0.4],𝒮},Boxed->False]

(RefLink[Parallelepiped, paclet:ref/Parallelepiped]):

𝒮=ShellRegion[Parallelepiped[]];

Graphics3D[{Opacity[0.4],𝒮},Boxed->False]

(RefLink[Prism, paclet:ref/Prism]):

𝒮=ShellRegion[Prism[]];

Graphics3D[{Opacity[0.4],𝒮},Boxed->False]

(RefLink[Pyramid, paclet:ref/Pyramid]):

𝒮=ShellRegion[Pyramid[]];

Graphics3D[{Opacity[0.4],𝒮},Boxed->False]

(RefLink[Simplex, paclet:ref/Simplex]):

𝒮=ShellRegion[Simplex[{{0,0,0},{1,1,1},{2,1,0},{1,0,0}}]];

Graphics3D[{Opacity[0.4],𝒮},Boxed->False]

(RefLink[Tetrahedron, paclet:ref/Tetrahedron]):

𝒮=ShellRegion[Tetrahedron[]];

Graphics3D[{Opacity[0.4],𝒮},Boxed->False]

OpenersExampleSubsection2(Spacer1)Formula Regions  (2)

Find the shell of an (RefLink[ImplicitRegion, paclet:ref/ImplicitRegion]):

ℛ=ImplicitRegion[(x^2)+(y^2)+(z^2)≤1,{x,y,z}];

𝒮=ShellRegion[ℛ,1/4]

Visualize the shell:

RegionPlot3D[𝒮,Boxed->False,PlotStyle->Opacity[0.4],PlotPoints->40]

A Boolean combination of inequalities:

ℛ=ImplicitRegion[(x^2)+(y^2)+(z^2)≤1||(0≤x≤1&&0≤y≤1&&0≤z≤1)||((x^2)+(y^2)≤1/9&&-2≤z≤2),{x,y,z}];

𝒮=ShellRegion[ℛ];

Visualize the shell:

RegionPlot3D[𝒮,Boxed->False,PlotStyle->Opacity[0.4],PlotPoints->40]

OpenersExampleSubsection3(Spacer1)Mesh Regions  (3)

Find the shell of a (RefLink[BoundaryMeshRegion, paclet:ref/BoundaryMeshRegion]):

ℛ=BoundaryMeshRegion[{{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}}, 
 Polygon[{{3, 2, 1}, {2, 3, 4}, {3, 1, 4}, {1, 2, 4}}]];

𝒮=ShellRegion[ℛ];

Visualize the shell:

BoundaryMeshRegion[𝒮,BaseStyle->Opacity[0.4]]

(RefLink[MeshRegion, paclet:ref/MeshRegion]):

ℛ=MeshRegion[{{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}}, 
 Tetrahedron[{1,2,3,4}]];

𝒮=ShellRegion[ℛ];

Visualize the shell:

BoundaryMeshRegion[𝒮,BaseStyle->Opacity[0.4]]

A closed surface (RefLink[MeshRegion, paclet:ref/MeshRegion]):

ℛ=MeshRegion[{{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}}, 
 Polygon[{{3, 2, 1}, {2, 3, 4}, {3, 1, 4}, {1, 2, 4}}]];

𝒮=ShellRegion[ℛ];

Visualize the shell:

BoundaryMeshRegion[𝒮,BaseStyle->Opacity[0.4]]

OpenersExampleSection3(Spacer1)Applications  (5)

Hollow out a 3D model:

model=ExampleData[{"Geometry3D","Triceratops"},"BoundaryMeshRegion"];

𝒮=ShellRegion[model];

BoundaryMeshRegion[𝒮,BaseStyle->Opacity[0.4]]

A torus:

model=ExampleData[{"Geometry3D","Torus"},"BoundaryMeshRegion"];

𝒮=ShellRegion[model];

BoundaryMeshRegion[𝒮,BaseStyle->Opacity[0.4]]

A molecule:

model=ChemicalData["Water","BoundaryMeshRegion"];

𝒮=ShellRegion[model];

BoundaryMeshRegion[𝒮,BaseStyle->Opacity[0.4]]

Find a shell with roughly one quarter the original volume:

ℛ=PolyhedronData["Dodecahedron","BoundaryMeshRegion"];

Sample points in the region to create a distribution of distances to the boundary:

dists=-SignedRegionDistance[ℛ,RandomPoint[ℛ,2000]];

𝒟=SmoothKernelDistribution[dists];

Find the distance where one quarter of the sampled points are closer to the boundary:

t=Quantile[𝒟,0.25]

The resulting shell:

𝒮=BoundaryMeshRegion[ShellRegion[ℛ,t],BaseStyle->Opacity[0.4]]

Compare the volumes:

Volume[𝒮]/Volume[ℛ]

Use (RefLink[ShellRegion, paclet:ref/ShellRegion]) to save material when printing a 3D object:

ℛ=ConvexHullMesh[RandomReal[1,{100,3}]];

𝒮=ShellRegion[ℛ];

The shell requires less material:

Volume[𝒮]/Volume[ℛ]

OpenersExampleSection4(Spacer1)Properties & Relations  (3)

(RefLink[ShellRegion, paclet:ref/ShellRegion]) preserves the outer surface of an object:

ℛ=ExampleData[{"Geometry3D","Triceratops"},"BoundaryMeshRegion"];

𝒮=ShellRegion[ℛ];

Extract the outer surface:

outer=SortBy[ConnectedMeshComponents[RegionBoundary[𝒮]],Area][[-1]]

Compare properties:

RegionBounds[ℛ]==RegionBounds[outer]

Area[RegionBoundary[ℛ]]==Area[outer]

Typically, the thickness of the shell is roughly uniform:

ℛ=ExampleData[{"Geometry3D","Triceratops"},"BoundaryMeshRegion"];

𝒮=ShellRegion[ℛ,0.25];

Extract the inner and outer surfaces:

{inner,outer}=SortBy[ConnectedMeshComponents[RegionBoundary[𝒮]],Area]

Compute distances to the outer surface with (RefLink[RegionDistance, paclet:ref/RegionDistance]):

RegionDistance[outer,MeshCoordinates[inner]]//Short

The shell of (RefLink[Ball, paclet:ref/Ball]) is (RefLink[SphericalShell, paclet:ref/SphericalShell]):

Graphics3D[{Opacity[0.4],SphericalShell[]},Boxed->False]

Use (RefLink[ShellRegion, paclet:ref/ShellRegion]) to compute the shell of other regions:

Graphics3D[{Opacity[0.4],ShellRegion[Ball[]]},Boxed->False]

Graphics3D[{Opacity[0.4],ShellRegion[Cuboid[]]},Boxed->False]

OpenersExampleSection5(Spacer1)Possible Issues  (2)

The thickness of a shell may not be uniform:

𝒮=ShellRegion[ImplicitRegion[(x^2)+(y^2)-(z^3)(1-z)≤0,{x,y,z}],1/10];

RegionPlot3D[𝒮,Boxed->False,PlotStyle->Opacity[0.4],PlotPoints->100]

Different representations of a region can give different shells:

ShellRegion[Ball[]]

A (RefLink[Ball, paclet:ref/Ball]) as an (RefLink[ImplicitRegion, paclet:ref/ImplicitRegion]):

ShellRegion[ImplicitRegion[(x^2)+(y^2)+(z^2)≤1,{x,y,z}]]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Printout3D, paclet:ref/Printout3D])  ▪  (RefLink[RegionBoundary, paclet:ref/RegionBoundary])  ▪  (RefLink[RegionDistance, paclet:ref/RegionDistance])  ▪  (RefLink[RegionResize, paclet:ref/RegionResize])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Derived Geometric Regions, paclet:guide/DerivedRegions])}, {▪(RefLinkPlain[3D Printing, paclet:guide/3DPrinting])}, {▪(RefLinkPlain[Geometric Computation, paclet:guide/GeometricComputation])}})}})