3D viewer: fix small bug in the SVG export's sphere replacement

The SVG exporter of the 3D viewer replaces spherical objects by very short
lines. To be space efficient, a material index is used which allows the re-use
of previously defined materials. Now the first bug was that materials were
stored under a different name (hex color) than what the look-up was using (hex
color + radius). The second problem was that a division by two was missing (see
code comment). Both issues are fixed by this commit.