Align object to edge | "Fence-generator"
Presuming the base wall object is aligned along X and long 1 unit.
You can have the angle using the angle from the edge to X axis.
So if you have the vector &lt;e1, e2&gt; of the edge, the angle is given by atan2 (arctangent B/A in Nodes) from x, y componants of &lt;e1, e2&gt;.
Note: in the nodes below, have used iterations on object and edges instead of by index access.