Hi all,

this is just Rhino 6 being more investigative than Rhino 5, where bad meshes could more easily end into the document. In particular, the first face is unfortunately wrong! And the reason is, that the script only adds QUADS (4-sides faces) but these are definitely not quadrangular faces:

These are triangles, and should be added as such!

We can also just keep your script the same, and rescue the position where the wrong quads (collapsed quads) would be added. Here is how:

```
import rhinoscriptsyntax as rs
import math
import Rhino
n_u = 128
n_v = 128
point_list = []
polygon_list = []
for i in range(0,n_v+1):
v = i / n_v
for j in range(0,n_u+1):
u = j / n_u
x = 10.0*math.sqrt(math.sin(u/2.0*math.pi)+u*0.15*math.sin(v*30.0*math.pi))*math.cos(v*0.95*math.pi+0.03*math.pi)
y = 10.0* math.sin(u/2.0*math.pi)+u*0.15*math.cos(v*30.0*math.pi) *math.sin(v*0.95*math.pi+0.03)
z = 5.0*math.pow(math.cos(u/2.0*math.pi),5)*math.sin(v*math.pi)-5.0*math.sin(v*math.pi)*math.pow(math.cos(u/2.0*math.pi),200)
point_list.append ([x,y,z])
for i in range(0,n_v):
for j in range(0,n_u):
p0 = i*(n_u+1)+j
p1 = i*(n_u+1)+j+1
p2 = (i+1)*(n_u+1)+j+1
p3 = (i+1)*(n_u+1)+j
curr = [p0,p1,p2,p3]
#rescue collapsed quads
if point_list[curr[3]] == point_list[curr[0]]: curr.remove(curr[3])
elif point_list[curr[2]] == point_list[curr[3]]: curr.remove(curr[3])
if point_list[curr[1]] == point_list[curr[2]]: curr.remove(curr[2])
if point_list[curr[0]] == point_list[curr[1]]: curr.remove(curr[1])
if len (curr) >= 3: polygon_list.append(curr)
PastaMesh = rs.AddMesh(point_list,polygon_list)
```

PastaForm_fixed.gh (3.4 KB)

These collapsed quads will then interfere with normals calculation, booleans, etc, and just make everything inconsistent in Rhino 5. Rhino 6 goes in the right direction of pointing out the problem.

Thanks,

Giulio

â€“

Giulio Piacentino

for Robert McNeel & Associates

giulio@mcneel.com