Curve.ExtrudeAsSolid *WIRE_SELF_INTERSECTS2 -- Wire has self-

Hi Community i found one graph here which i think will be useful in our project. Im trying to do the same except that instead of feeding it with OSM data, i want to use polycurves that will be generated from cad file. So the problem is shown below even if its a simple close cureves int’s not woking. Attached also is th full graph.

Thank you very much.