Hot can i join extrusions of beams?

Hi everyone.
I can join beams with a dynamo sey up. But i can’t join extrusions whit that script. Maybe defining core face of the beam as join referance face, it would help i think. What do you offer? How can i improve this dynamo setup?
Beam intersection.rvt (7.1 MB)
Join Beams.dyn (19.5 KB)