Hi, Steven,
Yes it it possible to “undivide”. Ideally, you need to know what type of subdivision occurred. If you’re looking at a mesh that you know has been subdivided, then there are two standard suspects. If the faces are all quads and nearly all vertices have 4 edges, then something like a Catmull-Clark quad scheme is likely. If the faces are all triangles and nearly all vertices have 6 edges, then something like a Loop-Warren triangular scheme is likely.
Currently there is no tool in Rhino WIP to automatically “undivide”. It’s not hard to automate and I’ve added issue RH-52279 to our SubD todo list. If you want to post your mesh, I’ll add it to the issue as a test case.
As of today, this work is not scheduled to occur for the initial release of Rhino 7. Depending on customer needs and feedback, our priorities are subject to change. (You guys pay the bills, so we like to do stuff that makes you happy.)
Technical details for the interested reader:
It is possible to mix subdivision algorithms and perform other control net modifications between subdivision steps. “Reverse engineering” these types of steps is challenging. My speculation is these techniques are not all that common. The blather below assumes we are dealing with a mesh that was the result of applying the same subdivision algorithm several times.
You want to work back one level at a time. If you know how many times the original was subdivided, that’s helpful because the level1 -> level0 step has to consider introducing n-gons where n is an atypical face edge count. Later subdivision steps only involve the native facet (quads or triangles).
At each level, the key step is to identify which current level vertices are descendants of previous level vertices. Next, and much easier, is to identify the current vertices that are descendants of edges from the previous level. After this using the topology of the current level, previous faces are easy to pick out.
If you’re looking at a quad mesh:
Ordinary interior vertices have 4 edges. Any interior vertex with N edges where N != 4 was either a vertex in the original mesh or a level 1 vertex at the center of a level 0 N-gon.
Ordinary boundary vertices have 3 edges (2 creases and an interior edge). Any boundary vertex that doesn’t look like is a descendant from a level 0 vertex.
In areas of regular quads, look at the 4x4 patches. In general there are four possibilities for where the previous level’s vertices were located. These shown in the image below
Typically clues from extraordinary vertex locations, boundaries, (interior creases, if that information can be gleaned), and neighboring regions that have been solved, will quickly eliminate some of these possibilities. After that, you try what’s left and see if you can get a consistent result.
Once you’ve decided which vertices came from the previous level, you choose a subdivision algorithm, build a linear system with the locations of the previous vertices as unknowns, and solve that system. (This is not rocket science, but you would want to automate this step. The algorithm and formulae that Rhino SubD uses are described in detail in the Rhino SubD Subdivision Rules document. The vertex subdivision formulae would be the ones you would use to build the linear system.
– Dale Lear