Nonideal unilateral constraints in impulsive mechanics: a geometric approach.