A method for performing a medical procedure, includescoupling a tip of a probe to tissue in an organ of a patientin order to apply the medical procedure using the probe. Aforce exerted by the tip on the tissue and a displacement ofthe tip created by the force are measured. A dependence ofthe force on the displacement is calculated. Based on thecalculated dependence, a risk level of perforation of thetissue is estimated.