swept · ·

A rod threaded by a square bar screwed along it

swept/square-bar-screwed-through-rod · swept, solid-sweep, screw, helix, prism, helicoid, boolean, cut

A rod, the cylinder of radius 5 about the z axis from z = 0 to z = 20, with a square thread cut along it by a bar carried along a screw, as a lathe's tool cuts a thread.

The bar, as placed, is the box 4 ≤ x ≤ 12, −8 ≤ y ≤ 8, −1 ≤ z ≤ 1: it points at the rod's axis, its flat tip (the face x = 4) 1 inside the rod, and it is 2 wide along the axis.

The screw is about the z axis: the bar turns right-handed about it (from +x toward +y) and rises 6 for every whole turn, rigidly. It runs from a turn of −90° (the bar lowered 1.5, wholly below the rod) to a turn of 1350° (raised 22.5, wholly above it). Cut from the rod everything the bar passes through.

The groove's root is the cylinder of radius 4, where the tip passes. Its walls are where the tip's two long edges pass, so the groove widens outward: at distance ρ from the axis it is 2 + (6/π)·acos(4/ρ) wide along the axis, by the turn a point of an edge makes to come round to the tip's plane. At the rod's surface that is 3.23 of every 6, so neighbouring turns of the groove stay apart.

expectedclosed form
volume1300.550213π5²·20 − (20/6)·2π∫₄⁵ ρ w(ρ) dρ, w(ρ) = 2 + (6/π)·acos(4/ρ), with ∫ρ acos(a/ρ) dρ = ρ²acos(a/ρ)/2 − a√(ρ² − a²)/2
area821.1671556the rod's side 2π·5·20·(1 − w(5)/6) + the root 2π·4·20·(2/6) + two ends 2(π5² − (2π/6)∫₄⁵ ρ w dρ) + two helicoidal walls 2(20/c)·½[√(U(U + c²)) + c² ln((√U + √(U + c²))/c)], c = 6/2π, U = 5² − 4² (each wall's element is ρ√(1 + c²/(ρ² − 4²)) dρ 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 occt's result, which passed.

Results

cad-kernelocctarriskentronvcadsolidcraftbrepkitpopkernaetherisnext.BREPgeopcadrssmlibspringrepgeomsolveranvilcad
outcomepasspass †–pass–refused †–refused–pass–pass–passwrongrefused
volume err.1.7e-094.1e-103.8e-104.6e-115.8e-102.8e-136.8e-05
area err.3.8e-096.0e-109.9e-103.1e-117.0e-107.0e-131.7e-04
time7.23 s1.98 s1.12 s12.2 s3.3 ms441 ms184 ms2.15 s988 ms1.2 ms
CPU time24.6 s1.98 s1.94 s12.2 s3 ms440 ms375 ms2.15 s1.63 s980 µs
memory80 MB385.1 MB53.9 MB71.2 MB11.6 MB111.8 MB20.6 MB20.3 MB71.3 MB3.5 MB
LOC212012391541110334

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

swept/square-bar-screwed-through-rod.md, the case as written.