Grid points are defined by an X,Y,Z and a bool indicating if they are centered. We assume the grid dimensions cannot exceed 2^15 on any axis, so we can pack grid points in the first 49 bits of an int64: 16 bits per X, Y, Z, and 1 bit for the bIsCenter flag. Edge IDs are given by one of the grid points bitwise or'd with a 'Tag' indicating the attached edge. To make sure each edge only has one possible ID, by convention, the grid point for an edge is chosen by these rules: