Do convex closed semialgebraic hyperplane cross-sections imply semi-algebraicity? Let $S\subset\mathbb{R}^n$, with $n\geq 3$, such that for any hyperplane $L$ one has $L\cap S$ closed, semialgebraic, and convex. Is it true that $S$ itself is semialgebraic?
A colleague explained to me that closedness is necessary, as one can take an open ball in $\mathbb{R}^n$ and paste a sufficiently nasty curve into its boundary. 
It is probably possible to weaken the convexity assumption to something like "no isolated points", and still have a meaningful question.
PS. the is basically a question recently asked by Lev Birbrair and Aris Daniilidis.
PPS. The if $n=2$ then for any convex set $S$ the intersection with a line is semialgebraic, so the answer is obvious "no" in this case.

One way, suggested by Birbrair, to make question more interesting is to assume in addition that $S$ is defined in an $o$-minimal structure. This would preclude examples like in the my own answer below.
 A: Here I record an answer based on very kind comments above (and offline).
The construction starts from a closed ball $B\subset\mathbb{R}^3$ and an infinite sequence $\mathcal{L}:=\{L^+_k\}$  of open half-spaces, satisfying the condition 
$$B\cap L^+_i\cap L^+_j=\emptyset\quad\text{ if and only if $i\neq j$.}\qquad\qquad (*)$$ Denote $L^-_k:=\mathbb{R}^3\setminus L_k^+$, and set $$B^-:=B\cap L^-_1\cap L^-_2\cap\dots\cap L^-_k\cap\dots$$
Zariski closure of the boundary $\partial B^-$ of $B^-$ contains infinitely many planes $\partial L_k^-$, and thus it cannot be a surface.
Theorem 3.20 in lecture notes by Michel Coste says that the Zariski closure of the boundary $\partial S$ of a semialgebraic set $S$ is algebraic of the same dimension as $\partial S$. Applying it to the $B^-$, we obtain that $\partial B^-$ is not semialgebraic, threfore $B^-$ is not semialgebraic, as well.
It remains to construct an appropriate $\mathcal{L}$, so that any plane $P$ intersects only finitely many $B\cap L_k$. Each $B\cap L_k$ is a spherical cap of radius $r_k$ and centre $C_k\in\partial B$. Let $\pi$ be the stereographic projection of $\partial B$ from the north pole onto the tangent plane $\Pi$ at the south pole $O\in\Pi$. Let $M\gg 0$, $c_k:=((k+M)^{-1},(k+M)^{-2})\in\Pi$, for $k\geq 1$; set $C_k=\pi^{-1}(c_k)$ and $r_k:=e^{-k-M}$, thus specifying a particular $\mathcal{L}$. Then $(*)$ holds. As $O$ is the limit point of $\{C_k\}$, any plane $\Omega$, to have a chance to intersect infinitely many $B\cap L_k$, and thus provide non-semialgebraic $B^-\cap\Omega$, must pass through $O$.
To establish that such an $\Omega$ does not exist, it suffices to show that any line $\ell$ in $\Pi$ intersects only finitely many disks $D_k\subset\Pi$ with centre at $c_k$ of radius $r_k$. As the points $c_k$ lie on a parabola $y=x^2$, 
$\ell$ won't hit inifinitely many $D_k$, unless it is tangent to it at $O$. So it remains to consider the case of $\ell$ being the line $y=0$. As $r_k$ decreases exponentially, but the $y$-coordinate $(k+M)^{-2}$ of $c_k$ only quadratically, there will be $K$ so that for any $k>K$ the
intersection of $\ell$ and $D_k$ is empty. Thus any plane intersects $B^-$ in a semialgebraic set, and we are done.
