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
Ángel Linares
Jun 28, 2011
June-Hao Hou
Great exercise! Bravo!
Mar 15, 2012
Morgan Rohla
Catmull-Clark subdivision is really hard for me to draw on Autocad because there are many cuts that we have to make to make it perfect. All the students read Study Moose reviews before they hire an online writer to complete their work on time. I believe after reading your discussion about Catmull-Clark I will be able to make it on my own software on time.
Feb 3, 2021