GH-Only Catmull-Clark Subdivision

As an exercise, I decided to try to implement the Catmull-Clark subdivision algorithm in Grasshopper alone. This means no scripts, and no 3rd-party components (such as weaverbird). This is not designed to be a utility - by all means, if you have to subdivide a mesh in this way, just use Weaverbird. I am always interested in the way traditional coding approaches translate into a non-textual language like Grasshopper, and this was a fun way to push a bit at GH's data management to achieve comparable results to scripting approaches. The algorithm as implemented can handle closed meshes with quad faces only. I will attempt a version that can handle tri-faces eventually. I based my approach on the pseudocode available at Rosetta Code. DOWNLOAD HERE: GH_Catmull_Clark.gh
  • Archieboy

    Very nice! I want to know if there is anyway to do the reversed way: from a very high density mesh(like the red one in your picture) to a more polygon mesh (like the blue one)?