generative modeling for Rhino
I am attempting to write a python script that will divide irregular shaped meshes into several large approximated rectangular meshes (see image). I'm having a little trouble. I thought one way to do this would be to use rs.MeshVertexFaces and rs.MeshFaceVertices for example to iteratively "grow" a mesh from several vertices or mesh faces until the new mesh reaches a boundary condition. This may not be the best way? Any suggestions?
I am also trying to create new submeshes using mesh face indices similar to the WeaverBird wbReroute component but inside the python script. Is there a python method that approximates this functionality?
I do not have really a suggestion for the first part of the question. You need some sort of feature recognition that normally is not very easy to implement, at least not in general.
However, here is a sample of how to construct a mesh with Python, using the rhinoscriptsyntax and then calling Compact through RhinoCommon (Compact() is not yet ported to rhinoscriptsyntax as far as I know). It's pretty much what you are describing.
To open this sample, you will need the latest GhPython component.
I hope it helps,
Did you even find out how to divide a mesh evenly?