Accessing points associated to a cell from the Programmable Filter or Python Shell

You might be able to do this with the Connectivity filter. (Answering these questions is always easier when you post some example data.) If the triangles of your mesh are sharing points with each other, they will be considered connected, and the Connectivity filter will assign them all the same id. If they are not all connected, you can run the Clean filter to connect them.

Now, it turns out that for polygonal surfaces (like triangular meshes) it is often desirable to “split” the surface along edges with a large bend so that normal shading can represent folds in the surface (like the adjoining faces of your cube). This is so that the triangles on each side of this bend can be different to represent the different angles of light. If your mesh has this feature, it also has by happy accident a split in the mesh that the Connectivity filter will identify as separate parts of the mesh.

If your mesh is not split at the edges, then the Generate Surface Normals filter will do it for you. It has a Splitting feature that when on (the default), it will identify edges with a bend over a certain angle and divide the mesh at those points. This will separate faces of a cube mesh but will keep together the surface of a sphere.

Below is an example where I synthesized a triangular mesh of a cube and then used the sequence of Clean, Generate Surface Normals, and Connectivity to create a RegionId field that identifies each face.

1 Like