swept · ·

A groove swung by a ball

swept/ball-swung-groove · swept, solid-sweep, canal, torus, boolean, cut

A block, the box from (−6, −6, −8) to (18, 18, 0), with a curved groove cut into its top face by a ball. The ball has radius 3 and its center starts at (12, 0, 0), on the top face, so it is half sunk in the block. It swings a quarter turn about the z axis, right-handed (from +x toward +y), so that its center ends at (0, 12, 0); its center stays in the top face all the way. Cut from the block everything the ball passes through.

The groove is a round-bottomed channel: a quarter of a torus's tube below the top face, closed at each end by a quarter of the ball.

As a set:

$$\bigl([-6,18]^2\times[-8,0]\bigr) \setminus \bigcup_{\theta \in [0,\,90^\circ]} B_3(12\cos\theta,\ 12\sin\theta,\ 0)$$

expectedclosed form
volume4284.97201324·24·8 − ½(πr²·Rθ + 4πr³/3), r = 3, R = 12, θ = π/2
area2012.829878box − (2rRθ + πr²) + (πrRθ + 2πr²)

Drawing

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

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

Results

cad-kernelocctarriskentronvcadsolidcraftbrepkitpopkernaetherisnext.BREPgeopcadrssmlibspringrepgeomsolveranvilcad
outcomepass ✦pass †pass †passwrong † ▦pass †wrong † ▦pass †refusedpasspass †pass–passpassrefused
volume err.4.2e-164.2e-162.1e-164.2e-160.0e+004.7e-044.2e-166.2e-124.2e-164.2e-162.1e-164.2e-16
area err.2.3e-161.1e-162.3e-163.4e-167.9e-162.1e-043.4e-161.0e-123.4e-163.4e-161.1e-162.3e-16
time6.9 ms649 ms23 ms12 ms41.0 s237 ms511 ms179 ms225 ms92 ms2.04 s12 ms7.3 ms139 ms5.9 ms
CPU time9.6 ms649 ms23 ms12 ms41.0 s236 ms512 ms218 ms217 ms92 ms2.04 s17 ms7 ms263 ms5.7 ms
memory11.3 MB369.5 MB10.7 MB10.9 MB249.5 MB52.4 MB31.2 MB29.9 MB71 MB20.3 MB20.2 MB10.7 MB8.6 MB36.5 MB5 MB
LOC1452471219172119121421913257

† works around a missing feature. ✦ an elegant solution. ▦ a faceted solid: a mesh stored as B-rep faces. Pick an entry to see its solid, its measures and its code.

swept/ball-swung-groove.md, the case as written.