BUG: OBJ importer cuts object name if it contains blank space

If object name contains spaces then Rhino imports only part of name after last space e.g.:
STRUCTURAL_-_COMBINED AC_SCHODY_ZEWNETRZNE FLAT_PART
… is imported as layer: FLAT_PART

To replicate:
Import obj with:

  • obj groups as layers
  • import obj objects selected
  • reverse group order selected
  • ignore textures selected

I can provide sample obj file.

BR.

Hi BR,

Yeah, an example file would be good. I know with obj "g"s, spaces are uses as delimiters and the strings between them become nested layers or groups. Not sure what the code does if there are spaces in the "g"s and you tell rhino you want to use them as object names. I suppose that should include the spaces in the name. Sounds like you’re using obj "o"s for object names though. Send me the file and I’ll look into it.

Tim

Here it is:
http://www.sendspace.com/filegroup/Kmina7ADl11EdegUIAqbtw
in _fixed file I replaced spaces with underscores.
I’ve also checked and in blender it imports fine, with spaces.
Please delete files after downloading with:
https://www.sendspace.com/delete/95j08z/0b57ee93f4213e675cc97c8b9406167a


Edit: I’m not obj specialist, but now I see that indeed spaces delimit nested groups but still layer named are derived from last group name, so maybe option “do layer names from all groups” or “make sublayers from groups” will do it?

BR.

Hi Alex,

There were a couple of bugs in the code. Indeed, what you were seeing with nested layers was a bug and that’s been fixed. Having import obj objects checked would have had no impact for you because there were no "o"s in your file. However, had you selected obj groups as object names you would have only got the first string when there were more than one separated by a space. That too is fixed. There was two other bugs I fixed that you probably would not have noticed. One was the checkbox to use obj objects was not greyed out the second time you got the dialog after having selected obj groups as object names. The other bug was in the string displayed as an error message when Rhino could not find the .mtl file referenced in the obj file. These fixes will be in the first service release candidate for V5 SR11.

Tim

Here is the YouTrack issue for this bug. http://mcneel.myjetbrains.com/youtrack/issue/RH-29205

Thank you!

Hi,

There is one more thing, that time in obj export. Obj files are unitless as far as I know and most importers assume that meter is unit. Rhino allows to work in different units, maybe “rescale” option could be added?

Best regs.