Firstly, I assume the strings spacings at the bridge are measured across from the high e nut/saddle perpendicular to the fret board centreline (FBC). This seems the only logical way as it not affected by the level of fanning so what string spacing measures traditionally; 'neck width feel' is consistent with non fanned guitars. If you're using string spacing parallel to the line of the string end points this method will need adjustment as two knowns and unknowns swap.
Draw a large diagram, not proportional, Exaggerate some dimensions (eg make bridge string spacing (BSS) double or so nut string spacing (NSS) to make angles ect easier to see.
calc string spread angle (SSA, angle between high or low e and FBC)
LSL=lower scale length (for high e)
SSA= inverse sin(((BSS-NSS)/2) / LSL)
To calc distance to perpendicular fret:
d= fret distance from nut
n= fret number
d = s-s/(2^(n/12))
do this for both e strings.
Position the perp fret (PF) on the high e.
calc the distances from the PF to the low e and high e nut and bridge points parallel to the FBC.
A few more steps will give the bridge and nut angle, I can add them if it's not obvious.
There are a few very small triangles near the low e bridge and nut, they could be missed, thats why skewing the diagram is important, it makes them more easily seen.