This is a script that generates models of the star and planets in a planetary system; I've used it to generate models for our solar system and for TRAPPIST-1, a system with many earth-like planets around a much smaller star. These models are to the same physical scale, so the (piece of the) Sun is in proportion to the star of TRAPPIST-1, as are all the planets.
The script is included and allows you to generate such models at any scale and of other planetary systems for which you know the sizes.
I recommend, as I did, printing TRAPPIST-1 in red rather than the yellow of the Sun, because TRAPPIST-1 is a much redder star - an ultracool dwarf. For more on TRAPPIST-1, see here or Wikipedia.
This thing is inspired by fc_tea's Sun and Planets to scale but I wrote the script from scratch and used planet details from Wikipedia, thus discarding any sensible aesthetic choices in the original.
The small TRAPPIST-1 printed pretty well with no bottom and zero infill, in spite of the spheres, but the larger Solar System model failed badly even when I tried to skimp on the infills; the tricky part is where the planets stick out of a sloping part of the Sun: here you don't have a bridge and unsupported plastic sticks out over a void. A simple circular reinforcement below each of the larger planets would solve the problem, but I haven't implemented that.
The script is written in Python, using SolidPython to generate OpenSCAD files, which are then compiled to STL. I've included the generated OpenSCAD files, but they're really not meant for human consumption. The Python lives in an IPython notebook, and it should be pretty clear from the contents how to produce another stellar system (say Kepler-11, with its super-Earths).