Assume we have a convex implicit surface represented as an SDF $f:\mathbb{R}^3\rightarrow\mathbb{R}$, e.g. a sphere or a cube.
Given a segment defined by 2 points $p_1, p_2$ I am interested in analytically and computationally describing the volume formed by sweeping this segment with the line with $f$.
The simplest case is a sphere, where it describes a capsule like volume, with a fairly straightforward formula (union of the cylinder segment and the spherical caps).
The next more challenging case is the cube, and here I am slumped, I don't know how to describe the volume anymore.
I have a hypothesis that the distance to the middle "cylinder" in the cube case is equivalent to the distance to the cube centered at the orthogonal projection of the testing point onto the line, but I am not sure how to prove it.