The 34-year-old third seed is only two and a half months removed from the procedure he underwent after tweaking his knee off court after a semi-final loss at the Australian Open.
Federer said that his second win in three days in the Principality has left him feeling that his fitness is approaching 100 per cent.
“As long as I can go into a match feeling like I’m all right and not thinking about the knee, it’s all good.
“Even if it would flare up and I couldn’t play tomorrow, I have a lot of information out of this tournament. I’m getting closer to the peak in the sense of maximum movement against the best players on a tough surface.
“Everything that’s going on right now at this tournament is great. I can rest for the next couple of weeks anyway.
“Even if I get a setback of a couple of days that the knee is not well, you rest it, take up training, take as much time as you need. I feel like I’m in a great place right now.”
Andy Murray fought though a roller-coaster finish while Rafael Nadal had to hold off a young pretender as both seeds managed challenging third-round wins.
Murray, seeded second and target man after the second-round elimination of Novak Djokovic, scratched out a narrow 2-6, 7-5, 7-5 win over Benoit Paire.
– ‘My best match’ –
Nadal, the eight-time tournament winner, had to save 15 break points against Dominic Thiem to avoid a second upset loss this season to the 22-year-old Austrian talent.
The Spanish fifth seed finally prevailed 7-5, 6-3 in two hours to put behind a semi-final loss he took against Thiem two months ago in Buenos Aires on clay.
“It was my best match on clay this year,” Nadal said. “I played a good match, in terms of level of tennis, was great I think.
“In terms of fighting spirit and attitude and being ready to accept the mistakes, the good points, the tough moments, it was similar way that I played in Indian Wells (he reached the semi-finals).
“It was a great continuation against a very tough player. I think he played a great match, too. It was a very good victory for me, I’m very happy for that.”
Nadal will next face reigning French Open champion Stan Wawrinka, who put away Frenchman Gilles Simon 6-1, 6-2. Murray will take on the big serve of Milos Raonic after the Canadian defeated Bosnian Damir Dzumhur 6-3, 4-6, 7-6 (7/5).
Murray stands 5-4 over Raonic, and defeated the Canadian in an Australian Open semi-final in January.
Murray made a recovery from a set and two breaks down in the second set and called his victory “a big win”.
“To win from 6-2, 3-0 down, two breaks, when you’re not playing particularly well, it’s a great effort. These matches are important.
“It would have been easy to lose today and get down on myself. But I kept fighting right the way through to the end,” said Murray.
“The second set was a lot of ups and downs. I didn’t feel like in the third set that was the case so much. It was a good one to get through because I could have easily lost today.”
Murray, a 2009 and 2011 semi-finalist, is into his third quarter-final of the season.
French eighth seed Jo-Wilfried Tsonga will face Federer after defeating countryman Lucas Pouille 6-4, 6-4 while Marcel Granollers put out 11th seed David Goffin of Belgium, 7-6 (7/1), 6-4.
Gael Monfils humiliated Czech Jiri Vesely 6-1, 6-2 after the outsider shocked Dokovic in the second round.