swept · ·

A rod grooved by a wheel slid along it

swept/torus-slid-through-rod · swept, solid-sweep, slide, torus, boolean, cut

A rod, the cylinder of radius 5 about the z axis from z = 0 to z = 20, grooved along its length by a wheel slid past it. The wheel is a torus: its axis is parallel to the y axis, the circle through its tube's centers has radius 6, and its tube has radius 2. It starts with its center at (11.5, 0, −9), so the part of its tube nearest the rod is centered 5.5 from the rod's axis and reaches 1.5 into it, and the whole wheel is below the rod. It slides without turning along the z axis, up to center (11.5, 0, 29), where the whole wheel is above the rod. Cut from the rod everything the wheel passes through.

As a set:

$$\{\,\rho \le 5,\ 0 \le z \le 20\,\} \setminus \bigl(T \oplus \{\,s\,(0,0,38) : 0 \le s \le 1\,\}\bigr), \quad T = \bigl\{\,\bigl(\sqrt{(x-11.5)^2 + (z+9)^2} - 6\bigr)^2 + y^2 \le 2^2\,\bigr\}$$

expectedclosed form
volume1493.754573πR²h − h·lens(R = 5, r = 2, d = 5.5), h = 20
area794.36089892(πR² − lens) + h(2πR − 2αR) + h·2βr, cos α = (d² + R² − r²)/2dR, cos β = (d² + r² − R²)/2dr

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
outcomepasspass †pass †passwrong † ▦pass †pass †pass †wrong †passpass †pass–pass †passrefused
volume err.3.0e-161.3e-144.6e-166.1e-167.7e-047.6e-167.6e-162.2e-143.6e-141.1e-094.6e-163.0e-162.2e-08
area err.0.0e+003.7e-152.9e-160.0e+004.6e-045.7e-165.7e-162.0e-143.0e-146.4e-102.9e-162.9e-162.2e-07
time63 ms1.13 s18 ms101 ms75 ms33 ms6.2 ms16 ms410 ms13 ms128 ms6.7 ms7.4 ms105 ms41 ms
CPU time91 ms1.13 s18 ms150 ms75 ms33 ms6 ms21 ms406 ms12 ms127 ms10 ms6.9 ms128 ms40 ms
memory17.1 MB378.1 MB11 MB16 MB12 MB44.4 MB9.9 MB26.3 MB82.1 MB17.1 MB19.4 MB10.3 MB8.6 MB30.2 MB5.3 MB
LOC22563311271913891315993414

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

swept/torus-slid-through-rod.md, the case as written.