swept ·

A groove carried along a spline by a ball

swept/ball-along-spline-groove · swept, solid-sweep, canal, spline, boolean, cut

A block, the box from (−6, −6, −8) to (36, 26, 0), with a groove cut into its top face by a ball of radius 3 carried along a curve. The ball's center follows the cubic Bézier curve in the top face (z = 0) whose control points are (0, 0, 0), (10, 0, 0), (20, 20, 0) and (30, 20, 0), from its first end to its last. Cut from the block everything the ball passes through.

The groove is half of the tube of radius 3 about the curve, closed at each end by a quarter of the ball. The curve's tightest turn has a radius of about 7.5, more than the ball's, so the tube does not fold on itself.

expectedclosed form
volume10173.82871no closed form (the Bézier's arc length is an integral): OCCT and cad-kernel, built independently from this description, agree to 9e-12 (10173.828705331523 and 10173.828705425067; the mean)
area4026.639233no closed form (the Bézier's arc length is an integral): OCCT and cad-kernel, built independently from this description, agree to 3e-11 (4026.6392330649683 and 4026.6392331656834; the mean)

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 †refused †passwrong † ▦refused †wrong † ▦refusedrefusedpasswrong †pass–pass †pass ✦refused
volume err.3.8e-114.7e-123.9e-094.2e-044.3e-116.7e-051.7e-092.4e-124.1e-11
area err.6.4e-129.1e-121.1e-082.2e-041.6e-101.5e-053.3e-107.7e-121.0e-11
time133 ms697 ms174 ms374 ms99.8 s968 ms2.88 s84.7 s58 ms58 ms2.51 s97 ms940 ms691 ms1.2 ms
CPU time141 ms697 ms174 ms393 ms100.2 s968 ms2.88 s84.7 s58 ms58 ms2.51 s191 ms939 ms1.47 s990 µs
memory15.2 MB370.2 MB11.5 MB76.2 MB358.2 MB100.6 MB47.9 MB111.2 MB46.8 MB13 MB20.2 MB16.8 MB21 MB52.1 MB3.5 MB
LOC3743511330162613022241022314

† 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-along-spline-groove.md, the case as written.