offset ·

A plate with a round-cornered window grown past the corners' radius

offset/windowed-plate-grown-past-its-corners · offset, grow, analytic, concave-edge, vanishing-face, adversarial

The plate from (−20, −15, 0) to (20, 15, 4) with a window cut right through it along z: the rectangle from (−10, −7) to (10, 7) with its four corners rounded to radius 2. Grow it by 3, more than the corners' radius but less than half the window's width: the solid of every point within 3 of the plate.

The plate grows as a box does: each face moves 3 outward, each outer edge becomes a quarter of a cylinder of radius 3, each corner an eighth of a ball. The window stays open but narrows: within the plate's thickness its walls come in 3, to the rectangle from (−7, −4) to (7, 4), whose corners are square, the rounded corners (of radius 2) having closed up. Over and under the window, at a height u beyond the plate's face (0 ≤ u ≤ 3), the opening is the window's outline shrunk by √(9 − u²): its sides moved in that far and its corners' radius 2 − √(9 − u²) where that is positive, square where it is not. So the grown faces round the window's straight rim in quarter cylinders of radius 3 about its edges, and its rounded corners in the outer side of a tube of radius 3 about each corner's arc.

As a set:

$$\Bigl([-20,20]\times[-15,15]\times[0,4] \;\setminus\; \bigl(R \times [0, 4]\bigr)\Bigr) \oplus B_{3},\quad R = \bigl([-8,8]\times[-5,5]\bigr) \oplus B_2$$

expectedclosed form
volume14575.52727V₀ − [c(w − 2d)(h − 2d) + 2(whd − π(w + h)d²/2 + 8d³/3 − (4 − π)J)], V₀ = abc + 2(ab + bc + ca)d + π(a + b + c)d² + 4πd³/3, J = r²(d − q) − 2r(πd²/4 − qr/2 − (d²/2)·asin(q/d)) + d²(d − q) − (d³ − q³)/3, q = √(d² − r²), a = 40, b = 30, c = 4, w = 20, h = 14, r = 2, d = 3
area4580.552126A₀ − 2(wh − (4 − π)r²) + c(2(w + h) − 8d) + 2(π(w + h)d − 8d² + (2π − 8)d(r·asin(r/d) − (d − q))), A₀ = 2(ab + bc + ca) + 2π(a + b + c)d + 4πd², with the values above

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–––pass–pass–wrong–refused
volume err.0.0e+009.6e-122.1e-121.2e-165.5e-05
area err.7.9e-161.1e-131.9e-127.9e-166.5e-05
time200 ms650 ms125 ms4.20 s61 ms109 ms1.2 ms
CPU time283 ms650 ms125 ms4.20 s112 ms108 ms1 ms
memory19.1 MB371.4 MB49 MB72.8 MB13.9 MB10.2 MB3.5 MB
LOC101372212264

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

offset/windowed-plate-grown-past-its-corners.md, the case as written.