Concatenating polyhedra at their region of contact Given two polyhedra(with triangulated faces), P1 and P2. I want to create a polyhedron P, which is the result of joining the two at their region of contact. With join I do not mean union but physically, it is more like welding P1 and P2, so if there is say a cylinder(P1) and a cube(P2) aligned on same axis with P1 partially out of P2, union operation will result in disappearance of the part of cylinder inside the cuboid but I want to preserve that region in P. In other words, P1 and P2 should be concatenated at their region of contact.

I would like to know if there is any practical algorithm for this? I think that it is more like computing overlay of P1 and P2 but I do not find any approach for the same in 3D.
I was recently referred to an article 'Mesh arrangements for solid geometry' by Qingnan Zhou et. al. [pdf]
and the corresponding code by Dr. Campen which exactly solves this problem. 

This algorithm inserts new vertices and edges in the region of intersection between $P1$ and $P2$ thereby a generating new polyhedron $P$ and evaluates boolean operators on $P$ by selecting/rejecting vertices and edges depending on the operator. For my problem, $P$ forms the solution.

However, out of curiosity I would like to know if anyone has an alternative to this approach.

Update: I have tested the tool referred above against my original problem, it successfully prevents self-intersection by inserting new vertices and edges at the region of contact between $P1$ and $P2$.