I have two geometries, one is made from another by offsetting its vertices, so both have same structure and hierarchy.
Need to connect these two geometries with caps (yellow geometry).
Pretty sure that the problem could be solved by finding edge points (yellow lines) on both sides for each element. As soon as these geometries have same # of vertices and herarchy caps could be easilly calculated.
But, for now, I don't have any idea how to determine these edge points.