I don't see why you would need to, it seems like making 45's complicates the problem.
I would just measure linear lengths and call it good. In other words, from the front to the back of the box should be a known lengthand that will be put into the calculation of the overall length of the port. As long as you have the port wall as far away from the wall as the width of the port (which you have to do anyways) then you can just add lengths of the individual sections.
I don't know if what I'm saying is making sense, but I really do not see the need for the angles as it really makes things A LOT more complicated IMO. It should work however.
EDIT:
This is what I'm saying...if the two shown dimensions are 5" then the port length is equal to 1+2+3+4 on the picture. You may have to calculate a little bit for port extension (I know that's the wrong termanology, but I can't think of the right word now) but I'm not knowledgeable enough to tell you exactly how to do that.

Bookmarks