GDS coordinates are in each dimension ultimately a 4 byte integer with 2^32 = 4.29E9 positions. At some point snapping takes place to the integer. As a result two previously perfectly aligned floating point lines (see picture below) may exhibit a gap or overlap of about the mask resolution in the worst case.
To remove the gaps you can grow, merge and shrink a mask layer in a post process step, e.g. in Klayout.
Alternatively, a ‘growy’ (grow-y) setting of a layer in a xsection can be used. This has to be merged into a main release after 0.4.3, as it defaults to 0 otherwise.
Solving the grid position for multiple layers of different width, e.g. a waveguide + trench layers, at an unconnected waveguide-end under an arbitrary angle is another case. It requires extra polygon points or specific ‘growy’ settings per layer in a xsection to make sure snapping behaves as expected for applying logical (DRC) operations on the polygons.
What you can get away with strongly depends on the technology you are using.