prefix sum also returns sum
half edge generation now also works if not each index is used to build up faces