Mesh face formatting

What a petty and simple thing to kick things off with, but here goes:

Speckle encodes mesh faces - tris or quads - by prepending the vertex indices with either 0 or 1. Since N-gons are pretty much everywhere now, could Speckle 2.0 change these to rather be the number of vertices in the ensuing polygon?

I.e. [3, 1, 2, 3] would be a triangle, and [10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] would be an N-gon / polygon with 10 verts.

1 Like

You were a bit early. Short answer: yes!

Since work with Speckle Blender 2.0 is underway, I want to flag this issue again, since it is cropping up.

Is the plan still to change mesh face formatting from 0 and 1 for tris and quads, to # of verts in polygon for arbitrary polygons? This would require all connectors to adapt and probably break a lot of things… but maybe the time to do it is during the Beta?

Where were you x months ago to remind us of these things? the change now is quite… tedious to make (breaks everything, including existing test streams that we use). I suggest we keep 0 and 1s for tris and quads, and you can start adding 5 for pentagonal faces, 6 for hexagonal faces, etc.

How does this bad compromise sound to you?

Sounds fine, at least lets us have N-gon support for now :wink: It means a switch / if for each face, instead of assigning the number directly, but I somehow doubt that that is a current performance bottleneck.

Supporting the current way of 0 and 1s can be implemented on top of it, in case you would be up for phasing it out eventually. I.e. if x<3 then revert back to parsing 0 and 1s…

1 Like