Hi, I’d like to create a Rhino file with hierarchical layers. I.e. I want to have Layer2 be the child of parent layer Layer1. How can I accomplish this?
I assume I have to assign the uuid of the parent layer to the child’s m_parent_layer_id attribute. But simple assignment didn’t do the trick. I’m not sure if the parent layer already has a uuid. How can I print the uuid, i.e. get a char* for diagnostic output?
Btw: This example is not provided with the openNURBS source code, is it? Did I overlook something? Or are there more examples available?
My problem seems to be that ON_CreateUuid does not provide a reasonable uuid. In opennurbs_uuid.h it says “Only works on Windows.” My program is supposed to run on Linux. Have you got any suggestions for this case?
Except for this parent layer functionality everything else runs fine on Linux. I.e. I can create a Rhino file with some (mesh-) objects in it, also layers. How come if Linux can’t create uuids? Is there another function that creates uuids which also works on Linux? Or is a Rhino file without uuids ok as well? Are missing uuids created when the file is imported?
If you could shed some light on those mysteries that would be awesome… Thanks again, Gero.
Well, essentially openNURBS doesn’t work on Linux the way it is advertised in the examples. Wouldn’t that be a reason?
This inconsistency forces me to differentiate the code for Windows and Linux. What I will actually do is patch the ON_CreateUuid function to create uuids in Linux as well. Then my main program will be portable and identical for Windows and Linux.