Since each hip rafter is potentially unique each one requires the following calculations (for those that are interested):
Term1 of the Abar equation is really interesting. If I took the time I could probably condense down some of the variables and reduce the amount of algebra but then in the future it would be harder for me to follow, so it is best left as verbose as possible for myself and future generations.
The terms Abar, Bbar, EBar and Fbar specify the compound bevel cuts at the peak and eave of the hip rafter.
Code Select
@Returnext = @HipendX + @Overhang3_num
@Returnext2 = (@Pitch3/@Pitch) * @Returnext
@Returnexthip = sqrt(@Returnext * @Returnext + @Returnext2 * @Returnext2)
@Zeta = acos(@Returnext/@Returnexthip)
@Tcy4mod = 0 - @Fascia_width * (tan(@Phi) - tan(@Phi3))
@Returnext2mod = @Tcy4mod/(tan(@Phi))
@Zeta_a = atan((tan(@Zeta))/(cos(@Phihip13)))
@Zeta_b = atan(tan(@Zeta)*cos(@Phihip13))
@Iota = atan(sin(@Zeta)*tan(@Phihip13))
@Kappa = atan(cos(@Zeta)*tan(@Phihip13))
@Term1 = (cos(@Zeta_a))/(cos(@Iota)) + ((sin(@Zeta_b))/(cos(@Kappa))) * ((tan(@Phi) - tan(@Iota))/(tan(@Phi3) - tan(@Kappa)))
@Abar = @Ply/@Term1
@Hipoffsetx = (@Returnexthip - @Ply) * sin(@Zeta)
@Bbar = @Abar * ((tan(@Phi) - tan(@Iota))/(tan(@Phi3) - tan(@Kappa)))
@Ebar = @Returnext - ((@Returnext2 + @Returnext2mod - @Abar)/(tan(@Zeta)))
@Fbar = @Returnext2 + @Returnext2mod - (tan(@Zeta))*(@Returnext - @Bbar)
if @Phi2 > @Phi
@Zbar = @Ry4 - @Ry4r
@Xbar = @Zbar/(tan(@Phi))
@Bbarmod = ((@Abar+@Xbar) * (tan(@Phi) - tan(@Iota)) - @Zbar) / (tan(@Phi3) - tan(@Kappa))
else
@Zbar = 0
@Xbar = 0
@Bbarmod = @Bbar
end
@Exthip13 = ((@Xbar+@Abar)*cos(@Phihip13)/tan(@Zeta))/(cos(@Phialpha1_3)) - @Zbar/(tan(@Phihip13))
Term1 of the Abar equation is really interesting. If I took the time I could probably condense down some of the variables and reduce the amount of algebra but then in the future it would be harder for me to follow, so it is best left as verbose as possible for myself and future generations.
The terms Abar, Bbar, EBar and Fbar specify the compound bevel cuts at the peak and eave of the hip rafter.