remove useless std::vector intermediates when creating Vector3Ds and indexes

close #527