This could help to get started on “how to divide a surface into grid”: http://dynamobim.org/forums/topic/divided-surface-by-intersection/