Cantellation of Polyhedra
This project randomly stole an entire evening of mine. I didn’t know what the cantellation operation was. After doing some research, I realized it mirrors the process of the dual operation we had previously performed with polyhedra. It turns out to be the process of turning edges into new faces. I started looking for ways to do this in Grasshopper without using ready-made add-ons that include this and similar operations. As always, I had to solve many interesting geometry and data flow problems and make some compromises.

Face Adjacency
First, my version of cantellation might differ from the mathematically defined one. I focused on geometric construction, visualization, and animation. To accomplish this, the first task was to explode the polyhedron and scale its faces down by a specific ratio from their area centroids. You can see this marked as number (1) in the Grasshopper code. Then there is a huge number (2). It extracts the adjacency graph of the polyhedron’s faces in a rather funny way. I’m sure there are much more logical solutions than this. The solution I came up with is to take each face of the polyhedron from its midpoint and scale it down by a tiny ratio (0.99). This way, the edges will start separating from each other. Afterward, perform a scan between the midpoints of these edges using the Closest Points component (the plural one). The good thing about this component is that it also outputs an i, the list of indices of the closest points. Here we find two close points because (being a bit lazy) the point itself is included in the search list, so naturally, it always finds itself as the first closest point. Therefore, I subsequently used a List Item to reverse the list and take its first element (still not using Cull Index somehow). The result is, the index numbers of the edge’s closest neighbors. Here I used Flatten rather recklessly and connected the index values I had directly to the faces of the original, scaled-down polyhedron. Thus, we had the original edges and, in return, the edges closest to them. All I had to do was to Loft these two lines. For some reason, the Ruled Surface component didn’t work here.

Remove Duplicate Faces
After the Loft operation, we come to group number (3). Now, the closest edges we found here yield two results reciprocally, because I couldn’t find a way to eliminate half of the faces. With a bit of effort, this could perhaps be prevented right at the beginning. The Loft surfaces we obtain in this section of my code always come in pairs. Because one face is calculated from edge lines A to B, and the other from B to A using the same algorithm. Group number (3) reduces these surface pairs down to single ones. It simply takes their midpoints and then filters the midpoints to be unique. Finally, it uses the index value obtained by finding which of these reduced midpoints is closest to the original point list in order to select the faces. Here again, we used the i output of Closest Point (this time, single one).

The final step is to join the newly obtained faces with the existing scaled-down faces using Join, and leave the remaining holes to the mercy of Cap Holes. This works in most cases, but as I mentioned above, since this is not an exact solution, the remaining faces are not planar on some polyhedra. I decided to leave it as it is. Since this version keeps the original faces in place, I suppose it doesn’t yield the correct result except for Platonic Solids, but it generates interesting derivations. Therefore, I also added my polyhedron library to the code. Actually, one shouldn’t use Cap Holes because, due to the nature of this operation, the remaining gaps in some polyhedra might not be planar. For this reason, I moved on with another crazy try, and developed a way to make Grasshopper draw the remaining faces as well. I’m putting that code here too, but it runs very slowly because I used Patch there. Also, in that code, I hadn’t yet managed to remove the duplicate faces.











