Finite element methods for quasi-prismatic bodies with application to gears /