A generator for cubic pregraphs