The SpeckleMesh object takes in a flattened list of the vertices as an array in the vertices field and then takes in the topology of the faces as such:
- The first entry is ‘0’ for triangles or ‘1’ for quads
- The next three/four entries is the index of the vertices.
For example, this would create a simple square out of triangles:
vertices = [0, 0, 0, 10, 0, 0, 10, 10, 0, 0, 10, 0]
faces = [0, 0, 1, 2, 0, 0, 2, 3]
or using quads:
faces = [1, 0, 1, 2, 3]
One tip for figuring out the schemas is to go into GH and serialize the object you want to convert.