Hello all!
This is kind of a silly question but please bear with me. What is the way to uniquely identify a mesh within the scene?
I was delving into using the ChangeQueue when I found “three” (depends on wether you consider a RhinoObject geometry or not) different kinds of representation of geometry that are used: Mesh, MeshInstance and RhinoObject.
To identify each one, intially it would seem relatively easy. A RhinoObject has a single GUID associated to it that is unique! So far so good. Also, it would seem that the MeshInstance has two values to properly identify it: The MeshId, which “allegedly”(later on explained) identifies the mesh instanced, and the InstanceId, which is an unsigned int that identifies the number of said instance.
But, when I try to identify a Mesh, the documentation states:
Id Get the Object Guid this mesh is for.
Does this mean that a Mesh.Id returns the Id of the Object to which the mesh is associated? If that is so, would that mean that the mesh has no means of getting an unique Identifier? I say this because a RhinoObject may have several meshes associated to it, as per the logic of GetMeshes() being plural and returning a Mesh. That would mean that no mesh is uniquely identified, which I find confusing. This also translates to the MeshInstance documentation, that states the same in the MeshId:
MeshId Get the Object Guid this mesh is for.
Sorry if I’m being a bit dense, as realise that this might be referring to a Guid associated to the more general C#'s Object class, but I still can’t find anything resemblig to a Guid associated to it within the Microsoft’s MSDN documentation.
Oh, and while we are at it , would someone mind explaining to me how are the MeshInstance.InstanceId integer identifiers are set? Do they represent the number of instances of a unique mesh (and thus are repeated if more than one object has instances in the scene) or the more general number of defined instances in the scene.
Thank you in advance.
Alonso