Keeping layers during meshing of Rhino objects -> OBJ -> Rhino

 From:  Michael Gibson
2720.10 In reply to 2720.9 
Hi Micha,

> I tested your script and so far I see it works without problems.

That's great! So all you need is the script on the Rhino side to be able to get what you need here.


> Also I have seen that the Rhino Obj mtl import works fine too.

Maybe I'm missing something, but it seems to be problematic to me.

For example, if I export an OBJ file with 4 boxes in it, with 2 boxes having Style = Orange, and 2 boxes having style = Red, when I import it into Rhino, where do I go to see the table of all used materials? There should be a list somewhere that shows 2 materials of Orange and Red and would let me edit them to change all objects that have been assigned that material, without needing to do any selection steps before that... Is that something that I missed somewhere?


> I have the feeling the underscore could be
> regular used for layer names.

It's ok if it is used for layer names - the only time it would be a problem would be if you had 2 layers in Rhino with the same name but one using spaces and one using underscores. There would be a collision in that particular case, but it would have to have all the same other characters in it between those 2 names. So it is pretty unlikely.

Just any regular layer name with underscores in it should not be a problem though.

If you'd like to replace the character though, it is easy to do that, just edit the line that says:

obj.name = name.replace( /\s/g, '_' );

and replace that '_' with '^' or whatever character you wish.


> My hope was that v2 could be the "meshing" release
> among other things. ;)

It definitely is a major meshing release already! I've spent about 2 months of full time work only on speed improvements for the mesher for this release. I think that's the most amount of time that I spent on this release for any single feature area.

Just use v1 for a bit and you'll be reminded of this, many features like multi-core enabling, other speed optimizations, and better handling of the UI flow like not freezing during calculations were all things that are new for v2.

I'm actually very surprised that you would not consider that v2 is a major meshing release, I mean there have also been many quality improvements as well, a whole bunch of them in direct response specifically to requests from you! For example refer back to this thread for a bunch of them: http://moi3d.com/forum/index.php?webtag=MOI&msg=2451.1

So I mean come on... How could you not consider it to be a major meshing release after all that?

- Michael