primitive generator: add conditional lines to cylinders; improved bad color handling