Safety criteria for trapping hazards by Hoefnagels