for advancing or controlling the threading tool or the work by templates, cams, or the like