Sunday, February 7, 2010

Converting Meshes to Surfs in Rhino

I ran into a problem this afternoon of importing a Revit model into Rhino via dwg format. What used to be flat surfaces have now become messy meshes, making the import impossible to work with. Having ran into this problem before with Sketchup, Ive decided to figure out a way.

The solution is rather straightforward:
1. use "MeshToNurb" on a Mesh to get a polysurface.
2. use "Silhouette" on the pSurf to get a bunch of outlines.
3. use "PlanarSrf" on the outlines to get the final Surface.
4. delete the intermediary steps

original mesh model
meshes converted into surfaces

Since I had over 400 surfaces, I decided to just do some rhinoscripting. The script does just the above, without altering the original meshes. After processing the selected meshes, the script ends with all the new objects highlighted, in case you wanted to drop them into a new layer/take out isocurves. Just change .txt to .rvb and load it to rhino.