Orient double struts on a mesh edges

Hello, I am trying to produce double struts along the mesh edges.
There are two constraints: outer edge must align with mesh face (so it resembles WB picture frame offset), and the corners of the struts must share edge (to minimize gap)

Here’s an example, top 3 are correct, 2 selected ones are overlapping.

Test 2 double struts.gh (45.5 KB)

The problem is solved if you reverse the direction of the lines that cause the error.
As you can see in the image, reversing the direction reverses the problem.

I attach my interpretation.

Test 2 double struts a.gh (41.5 KB)

Really like your version. What is the N (0) offset intended for?

Is there a way to loft the edges? Seems like the trees group items by face, not by vertice. The idea is to get the geometry wrapped around the strut so there are only strut socket sides and a gap in the middle of the joint left open, and then it should be able to cap to get solids

Test 2 double struts a.gh (58.7 KB)

Is that what you mean?

Test 2 double struts b.gh (64.3 KB)

yes exactly, thank you a lot