The ONX_Model::Audit method considers invalid those layer names which starts with the ‘-’ character.
If I set “bAttemptRepair = true”, then it changes all these layer names with some generated values.
For example:
If the desired layer name is “- my layer name” then after calling ONX_Model::Audit it will become “Layer_01”.
Why is this happening if on the Rhino UI it is allowed to specify layer names starting with ‘-’?
Clearly the code isn’t up-to-date with what Rhino 5 is doing. I’ve checked openNURBS code for the Rhino WIP and it isn’t the same, so I don’t see any reason to report this.
If you are looking to validate object ‘names’, you can use the following: