Mesh box not closing

Hi,

I would like to have a closed mesh box that has adjustable vertex density at the top and minimal amount of vertexes on the other sides. This very simple GH definition used to work way back during Rhino 5 and some older version of GH (which version, that knowledge is not available for me right now).

Why it doesn’t work anymore? How to make it work?

Also, why does the mesh resolution 2 produce messy mesh and resolution 3 clean one? I would like to have just clean ones.

Mesh_Not_Closing.gh (8.8 KB)

A valid closed mesh is a mini data base where each Face shares a Topology Edge with some other (and no Edge is adjacent to more than 2 Faces).

Given that … I can hardly see how Meshes like these can declared as closed.

BTW: The attached may(?) shed(?) some light on freaky meshes (but the bad news are that is 100% code).

Mesh_NonManifoldVertices_V1C.3dm (103.3 KB) Mesh_NonManifoldVertices_V1C.gh (121.8 KB)