Join pipe placeholders connectors

Hello,

Just hoping anyone could help me out here. What I’m trying to do is convert an existing piping system in copper to a plastic pipe system. I know there is an option in Revit where you could select a piping system and Change Type, but that doesn’t work correctly and I get lots of fittings disappearing.

So far I managed to convert existing pipe to pipe placeholders and assigned the new pipe type and diameters to the placeholders. My problem is that I don’t know how to join pipe placeholders connectors? Could someone please explain how Connector.ConnectTo node from MEPover works and whether this can be used to achieve what I need?

I tried extending the ends of the curves for the placeholders hoping that Geometry.Intersect node would give me the intersection points and then somehow I’ll be able to move the ends of the placeholders at those points. This doesn’t work correctly as I am not getting all the intersection points of those curves.

Any ideas?

Below is my script and a screenshot showing that Geometry.Intersect doesn’t give me all the intersection points.

Thanks.