For SpeckleUnity and SpeckleUnreal, I’d like to have some optional texturing assigned to some of the various values a SpeckleMesh’s “SpeckleType” could equal but it’s unclear what the range of values potentially are:
For the streams I’ve tested so far, the speckle types that have a category typically follow the pattern of “Mesh/{Category}”. Meshes from rhino seem to come back as just “Mesh” and the same seems to be true for breps. But I’m getting confused between the readme for speckle elements and the enums I found in the source code: SpeckleElements/SpeckleElementsClasses/Enums.cs at master · speckleworks/SpeckleElements · GitHub
The enums are all plurals and there’s no inclusion of “GenericElement” among them while the types I do end up seeing on my streams are singular and prefixed with the type of SpeckleObject they are.
Does anyone know where I can find a clear list of all the values a SpeckleMesh’s “SpeckleType” value could be? I need this to basically make a giant switch statement and texture columns as concrete, topology as grass and so on but I’d prefer to know the exact values without needing to make a stream with every conceivable object type and see what I end up with.
The name following the / isn’t a category so much as a subclass. Speckle Core will look for a conversion method for the right-most name, and if it can’t find it, it will fall back to the types to the left. (This is why you were able to import the SpeckleStructural geometric elements - SpeckleCore was falling back to the CoreGeometry conversion methods). @dimitrie, @teocomi - you could in theory have more than two type names, right? (If you create a sub-class from a sub-class?)
Anyhow, I think the full list of types that you are looking for are the public partial classes in Base.cs
The type field (should) keep track of the full inheritance chain. You could have a type defined as SpeckleMesh/CustomSpecialTypeA/EvenMoreCustomTypeB. Conversion will try ToNative on EvenMoreCustomTypeB, if not present, it will fall back to CustomSpecialTypeA and ultimately SpeckleMesh (or whatever the base type actually is).
As @daviddekoning said, the full list of stuff that a SpeckleMesh acts as a “base” fallback type for can be found in the kits type defs.
Those Enums are, afaik, added by for other reasons, pertaining to the rather new DirectShape class that @teocomi added.