Contours of a Rhino loft giving random non closed curves

Creating contours from a lofted brep in Rhino, the output curves are inconsistent and some are not closed. I can even see this when I pick out the problem curve from a list. Which curves are open vary based on changing the input parameters. The same logic works on a more simple lofted shape.

Is it the Rhino geometry or should this logic work? Going around in circles to solve this so would love to hear an explanation of why this is a problem. What is going on here? Some older posts refer to a contour bug, but given the time I would imagine that has been resolved.

image
image

240510_Contour Problem.3dm (922.6 KB)
240510_Contour Problem.gh (23.5 KB)

you better try to make that loft in grasshopper. that brep as input has problem.

Thanks for you help. But this doesn’t resolve it. There is still a non planar curve appearing.


image

240510_Contour Problem.3dm (942.7 KB)
240510_Contour Problem.gh (31.6 KB)

Have you ever tried isotrim ?

No, not sure how it can address to root cause or be used in this situation.