A general geometric method for identifying singular configurations of one-dof planar mechanisms