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
repeat.

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.

7 comments:

  1. Major, MAJOR help. I could never understand how to get make2d working with sketchup models and now i've the power. mucho props.

    ReplyDelete
  2. thanks very much!been trying to find this solution for years!

    ReplyDelete
  3. There is now a native rhino command called MergeAllFaces - it detriangulates polysurfs without having to explode anything.

    Combine that with MoveFace/ MoveEdge/ MoveFacetoSrf* and you get pretty close to modelling a la FormZ

    ReplyDelete
  4. thanks a lot, it´s really nice, but if you could put the option "yes to all" at the question "self intersecting curves were found, use curve boolean processing?" that would be great :)

    ReplyDelete
  5. As a beginner, Im wondering how you run the script? Its a text-file, and is not able to open it as a Rhinoscript..

    ReplyDelete
  6. you can use the Rhino commands "loadscript" and "runscript" to run a script from file.
    However, if you have a word file, it might be easiest to copy/paste the script into Rhino's embedded script editor and run it from there ("editscript").

    ReplyDelete
  7. you hero! saved me so much time <3

    ReplyDelete