Mesh topology across polysurfaces?

Hi guys,
I want to convert NURBS data into mesh data and then export the mesh into a rendering software.
The Rhino NURBS models consist out of a lot of open polysurfaces which are stored on different layers. Some of the open edges of the polysurfaces are connecting with each other. But I can’t join these polysufaces because then my part structure would be lost.
When meshing the NURBS data I am facing some problems: Rhino has no feature to define a topology across multiply polysurfaces. The result are gaps at the connecting borders.
Perfect would be a feature that applies a topology across polysurfaces which then ensures a more watertight mesh. Is there a workaround or a tool which solves this problem without using external software?

thanks for you help,
Norbert

Hi Norbert - I do not know of anything in Rhino that can help with this, I’m afraid, without Join getting involved.

-Pascal

FWIW:

What could be an option is to join the surfaces, mesh them and explode the meshes.
Than distribute the meshes as you like, but the meshes will line-up.

HTH
-Willem

Right, and this would work, but it sounds like it might be quite tedious to redistribute all the bits to the layers. It might be scriptable - one could keep track of the objects by recording bounding boxes and match them up with the exploded mesh pieces that way in the script. Not sure I’ll have time today to mess with that but it might be a way to shoehorn this into Rhino.

-Pascal

Hi Pascal and Willem,
thanks for your answers.

A sciptable solution would be key. The Rhino files I am dealing with have up to 300 polysurfaces distributed to about 40 layers . And we need to process hundrets of them :frowning:
Pascal, if you have an idea how to automate this, I could also provide some data.

I already thought about following way:

  1. Join whole model
  2. Mesh the model
  3. Mesh a second version of the unjoined NURBS model
  4. Do a comparision of the joined and unjoined meshes
  5. split the joined mesh based of the (traced) borders of the unjoined mesh
  • maybe instead of the unjoined mesh the NURBS data can be taken to do the comparison?
  1. Put the correctly splitted mesh on the right layers

Would that approach make sense?

Cheers,
Norbert

Hi Norbert- yes, the approach you outline is about what I had in mind - compare the exploded mesh pieces to the input objects (by bounding box or some other way) and then use this info to distribute things to the correct layers. I’ll think about it… it might work.

-Pascal

Hi Norbert,

Are you familiar with running python scripts?
DistributeMatchingMeshparts_01.py (2.0 KB)

It is a quick hack but might be sufficient.
Let me know what you think.

-Willem

Hi Willem,

thanks for the script!
I tested the script with a simple file (see attachment). I got an error message.
Can I define the meshing settings with the standard Rhino meshing dialog with the script?

Simple Topology Scene.3dm (120.4 KB)

Thank you for your support,
Norbert

Hi Norbert,

I see the error, I made a loop to increase the tolerance for finding matches if initially no match is found. The maximum used tolerance is reported after the run:

I spend some time to enhance the script so it will catch at least more errors and report if it finds anything out of the ordinary:

  • number of input surfaces should match number of found and sorted meshes
  • ambiguous matches are reported (and selected)
  • non-matching of a mesh is reported (and selected)

Let me know what you think.

-Willem

EDIT the script:
DistributeMatchingMeshparts_02.py (4.3 KB)

Hi Norbert,

I forgot: you need to have the view in shaded or rendered mode.
This to make the script able to extract the render mesh.

This answers your earlier question:

The script extracts the rendermesh if you explicitly need this to be different, let me know.

-Willem

Hi Willem,

Impressive!!
That goes in the right direction :smile:
I will play around with the script and give later feedback.

Cheers,
Norbert