Pattern that wraps all surfaces

Does anyone know how they made a pattern wrap all surfaces of the form like this. All the edges connect well when the pattern meets a a new planar surface.