offset · ·

A box with a spheroidal cavity grown by 1

offset/box-with-a-spheroidal-cavity-grown · offset, grow, void, ellipsoid, spheroid, adversarial

The cube from (−10, −10, −10) to (10, 10, 10) with a closed cavity at its middle, the oblate spheroid of geometry/oblate-spheroid, (x² + y²)/36 + z²/9 ≤ 1, taken out of it: a solid bounded by the cube's six faces outside and the spheroid's surface inside, facing into the cavity. Grow it by 1: the solid of every point within 1 of it.

Outside, the cube grows as a box does: each face moves 1 outward, each edge becomes a quarter of a cylinder of radius 1, each corner an eighth of a ball. Inside, every point of the cavity within 1 of its wall is filled, so the cavity shrinks to the spheroid's inner parallel body at distance 1: the points of the spheroid more than 1 from its surface, bounded by the spheroid's surface moved 1 inward along its normals, its equator at radius 5 and its poles at z = ±2. The spheroid's surface curves most tightly at its equator, where its radius of curvature is 3/2, more than 1, so that moved surface is smooth; it is not an ellipsoid. The grown solid is still one solid with one closed cavity, which no face of the cube's comes near.

The volume and area of the cavity left are Steiner's polynomials of the spheroid at −d, as in shell/oblate-spheroid-hollowed, with V = 144π, S and M the spheroid's volume, area and integral of mean curvature.

As a set:

$$\Bigl([-10,10]^3 \setminus E\Bigr) \oplus B_{1},\quad E = \{\,\tfrac{\rho^2}{36} + \tfrac{z^2}{9} < 1\,\}$$

expectedclosed form
volume10392.23627(a³ + 6a²d + 3πad² + 4πd³/3) − (V − Sd + Md² − 4πd³/3): the cube grown less the cavity shrunk (Steiner), a = 20, d = 1, V = 144π, S = 72π + 12√3π ln(2 + √3), M = 6π + 8√3π²/3
area2985.441025(6a² + 6πad + 4πd²) + (S − 2Md + 4πd²)

Drawing

Top view
Top
Isometric view
Isometric
Front view
Front
Right view
Right

Third-angle projection, the three views at one scale. Drawn from next.BREP's result, which passed.

Results

cad-kernelocctarriskentronvcadsolidcraftbrepkitpopkernaetherisnext.BREPgeopcadrssmlibspringrepgeomsolveranvilcad
outcomerefusedrefused–––refused–––pass–pass–refused–refused
volume err.1.3e-102.0e-11
area err.5.0e-102.7e-11
time2.5 ms622 ms3.79 s171 ms21 ms19.5 s1.1 ms
CPU time2.8 ms621 ms3.79 s170 ms48 ms19.5 s970 µs
memory10.2 MB365 MB539.9 MB35.6 MB11.1 MB16.4 MB3.6 MB
LOC101171011114

† works around a missing feature. Pick an entry to see its solid, its measures and its code.

offset/box-with-a-spheroidal-cavity-grown.md, the case as written.