swept · ·

A square key carried along a spline

swept/key-carried-along-a-spline · swept, solid-sweep, frame, general-motion, spline, prism, boolean, cut

A block, the box from (−6, −6, −8) to (36, 26, 0), with a groove cut into its top by a square key carried along a spline.

The curve is the cubic Bézier curve in the plane z = 0 whose control points are (0, 0, 0), (10, 0, 0), (20, 20, 0) and (30, 20, 0), run from its first end to its last.

A frame rides along the curve: at each point its origin is the curve's point, its x axis the curve's tangent there (pointing the way the curve runs), its z axis straight up and its y axis to the left, so that at the curve's start it is the world's own frame. The tool is drawn in that starting frame and carried rigidly by the frame as it runs the whole curve.

The key, so drawn, is the box from (−1.5, −0.8, −1.5) to (1.5, 0.8, 2.5): 3 long along the curve, 1.6 across it, its bottom 1.5 below the block's top.

Cut from the block everything the key passes through as the frame runs the whole curve.

The key turns as the curve turns, so no screw carries it, and it is no solid of revolution: its contact changes from face to face and edge to edge along the way, and its corners dig past its sides where the curve bends.

expectedclosed form
volume10652.87999no closed form: OCCT and cadrs give the same volume to the twelve figures the board publishes
area3996.725031no closed form: OCCT and cadrs agree to 2e-11; the mean of their values

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 †–refused–refused–refused–pass–pass–passrefusedrefused
volume err.2.0e-124.7e-122.1e-121.0e-112.8e-12
area err.2.6e-129.1e-112.6e-126.0e-121.8e-11
time446 ms1.65 s508 ms1.4 ms3.5 ms105 ms126 ms3.56 s72 ms1.2 ms
CPU time910 ms1.65 s960 ms1.2 ms3.3 ms105 ms416 ms3.56 s75 ms1 ms
memory18.4 MB380.3 MB9.6 MB4.6 MB11.5 MB36.4 MB11.2 MB13 MB29.4 MB3.5 MB
LOC17541281121111394

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

swept/key-carried-along-a-spline.md, the case as written.