Justice Christian Whata, alongside Justices Mary Peters and Mark Cooper, noted the defendant continued to maintain the sex attack on his traumatised victim was consensual.
"The cognitive distortion and dismissive attitude toward his offending identified by the health experts presents a bleak picture in terms of future risk," the judge said.
Hepi met the victim days before the incident on October 22 last year. He bombarded her with calls and went to confront her at home, the court heard.
She left with him, to avoid creating a scene, and they went to the man's Kaikorai Valley Rd flat.
When Hepi asked her to spend the night and she declined, he stood in the doorway, blocking her exit.
Three days of violence began with him slamming her against a wall and strangling her until she urinated and passed out.
Hepi broke the victim's phone, then berated her over her unwillingness to enter a relationship with him, punching her every time she answered his questions.
While she sat on a chair in the kitchen, Hepi hacked off her hair with a kitchen knife.
In a tearful victim-impact statement, the woman described it feeling ''like being scalped''.
Hepi said he would scar the woman and forced her to choose where on her body he would cut her. He inflicted a wound to her shoulder, then the sex attacks began.
Over the next two nights, Hepi repeatedly violated his prisoner.
He threatened to ''do the murder-suicide thing'' and made the victim swallow prescription pills.
At its crescendo, the woman decided to throw herself out of the window and grabbed a pillow for protection.
But as she made her bid for freedom, Hepi grabbed her, pinned her to the floor and raped her again.
It was only when the defendant briefly left the flat that the woman was able to lock him out and call 111.
Emergency services heard her screams as Hepi attempted to break down the door.
The defendant was being GPS monitored at the time because he was serving an Extended Supervision Order for previous sex offending, the court heard - an order that he had repeatedly breached.
Hepi's victim said she saw hate in his eyes during his rampage.
''I now truly understand the meaning of the word terror,'' she said. ''I feel like I saw and I was in hell ... I was certain I was going to die.''
Defence counsel Brian Kilkelly said his client's attendance at various rehabilitation programmes since 2001 indicated that he was motivated to change.
Justice Whata said that spoke in the defendant's favour.
"But, as the present offending clearly shows, those programmes have not been successful and have not adequately mitigated the risk presented by him," he said.
While similar cases referred to by Kilkelly featured offenders for whom the court found reasons for optimism, "we cannot find similar reasons for optimism in this case at present", the judge said.
No finite sentence, he said, was enough to provide adequate protection for the public.
It will be 15 years and two months before Hepi will be considered for release.