More automated geometry script.

More automated geometry script.