Obj Export in Rhino5 + WIP comparison

Edit: See WIP results far below.

OK, so I have a simple mesh, which is “manually” welded at 180 degrees in Rhino, and the I export it as is from Rhino5 with File | Export Selected. Testing that mesh with MeshMixer “Inspector” command, that looks fine (leftmost screenshot).

But if then I check the option Welded (see fig 2)

Fig.1. a). Rhino all options cleared (=OK). b.) “Welded” is checked (not OK!), and c). My .obj-export component calling mesh.Weld(180) before export (OK).

Fig. 2. Export options (no options but “Welded” in case b above:

If I tick the red ball in MeshMixer, the res surfaces are remove altogether leaving “strange surfaces” behind.

Fig 3. After “repair” (ticking the red ball) in MeshMixer:

In short, if first welding manually with the Rhino menu command mesh.Weld(180), and leaving the mesh “Unmodified” on export, this problem doesn’t occur.

Edit 2: I tested this also in WIP, and WIP [doesn’t either] export a valid mesh even when checking the option “Welded”. The exact difference in the obj ouput file produced by Rh5 and Rh6 is shown in this diff (Rh5 to the left).

Fig.4 Diff Rh5 and Rh6:

And the bad (wip) result:

// Rolf

Edit: Modified the header.

Hi Rolf,

“Welding” in obj export is different than “welding” inside of Rhino. In obj export, welding consists of using the same index in faces for all coincident vertexes in Rhino. However, it uses the actual index for texture coordinates and vertex normals. This was a user request in the past for some downstream app. This is a valid thing to do in obj and I don’t know why your app doesn’t like it. Welding in Rhino, sets the vertex index for coincident vertexes that fit the welding criteria to one index in faces. In addition though (obj export does not do this), the vertex normals and texture coordinates for the coincident vertexes (there is a one to one correspondence inside of Rhino) are averaged and the value at the one index is set to that average. Then compact is called on the mesh to get rid of vertexes, normals and TCs that are no longer referenced by any face.

In the end, if welding inside of Rhino works for you then do that.