A generalized discrete-vortex method for sharp-edged cylinders