@Jianwei Jia: I don't know how klayout was generating off-grid shapes, but I do know that magic has a database that essentially prevents off-grid points, so it shifts all points it reads onto the minimum manufacturing grid. This may or may not produce additional downstream errors such as 0.005um gaps between shapes, or shapes that are not on angle multiples of 45 degrees. So it is better to understand what the source of the off-grid positions is. But our klayout DRC checks should detect any errors that might arise purely from shifting points from off-grid to on-grid, so if the corrected layout passes precheck, then it's probably okay.