geometry code prepare.