offset · ·

A box with a spheroidal cavity shrunk by 1

offset/box-with-a-spheroidal-cavity-shrunk · offset, shrink, 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. Shrink it by 1: keep every point of it at least 1 from its boundary.

Outside, the cube shrinks to the cube from (−9, −9, −9) to (9, 9, 9), its edges sharp. Inside, the cavity grows to the spheroid's parallel body at distance 1: every point within 1 of the spheroid, bounded by the spheroid's surface moved 1 outward along its normals, its equator at radius 7 and its poles at z = ±4. That surface is smooth and is not an ellipsoid. It stays 2 from the shrunk cube's faces, so the result is one solid with one closed cavity.

The volume and area of the grown cavity are Steiner's polynomials of the spheroid at d, as in offset/oblate-spheroid-grown, 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) \ominus B_{1},\quad E = \{\,\tfrac{\rho^2}{36} + \tfrac{z^2}{9} < 1\,\}$$

expectedclosed form
volume4998.798784(a − 2d)³ − (V + Sd + Md² + 4πd³/3): the cube shrunk less the cavity grown (Steiner), a = 20, d = 1, V = 144π, S = 72π + 12√3π ln(2 + √3), M = 6π + 8√3π²/3
area2397.624766(a − 2d)² + (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.4.3e-101.2e-10
area err.9.1e-107.3e-11
time2.5 ms636 ms3.86 s148 ms20 ms8.65 s1.1 ms
CPU time2.6 ms635 ms3.86 s148 ms46 ms8.65 s960 µs
memory10.6 MB365.1 MB539.5 MB40.4 MB10 MB16.5 MB3.5 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-shrunk.md, the case as written.