You could create a line from each side’s first line start points and then another for each side’s last line end points. Add those into the list of all of the lines and try again.
You could calculate the center of all of your points and then sort your points by clockwise or counterclockwise and then create the curve necessary for your perimeter.
1- Try to prune duplicates … maybe there is duplication in points.
2- Try to sort each line of points by coordinates.
3- You might create surface by perimeter points then thickened it by floor required thickness then use spring nodes package to transfer this solid to Revit file as a family.
I would start here, using a Surface.ByLoft to connect the two sides of the curve. You’ll have to make each curve into a Polycurve first. ArchiLab has a helpful node called GroupCurves which will separate the upper and lower curve set for you, then just use a Polycurve.ByJoinedCurves.
After that use a Surface.ByLoft node and then a Surface.PerimeterCurves node. This will ensure that the curves are connected in order And not branching.
Of your polycurves fail to generate then before you draw any lines try the following as noted above in some cases:
Check your geometry scaling.
Use a Point.PruneDuplicates to discard any duplicated data.
Draw a line using a Line.ByBestFitThroughPoints node, and group the points into ‘above vs below’ the line, draw a second line by best fit through each of the sublists, and then get the distance from each point to the start point of the associated line, and sort the sublists by that distance.