Line point to point help

Hi the I am currently working on a project using the Cambridge central mosque tutorial (Grasshopper parametric design - Cambridge mosque structural timber column - YouTube) and have run into an issue where my points are not lining up to their offset counterparts yet rather snapping to two areas.


Rather than lining up like what is shown in the tutorial.
image

I have also uploaded the script for reference.

Any help would be greatly appreciated.
mosque old.gh (35.8 KB)

Sorting the points might not even be needed… The lines you are looking for are lines between closest points.

mosque old.gh (31.4 KB)

You forgot to flattten a list earlier in the script.

Flattening this will result in the correct outcome.
Flatten instead of simplify.