I develop several Rhino plugins for rendering and I would like to automatically unwrap render meshes that doesn’t have UV mapping set by the user.
For that purpose, I recklessly used: RhinoMeshUnwrapper rhUnwrapper(onMesh); rhUnwrapper.Unwrap(RhinoMeshUnwrapper::UnwrapMethod::LSCM);
But Rhino 8 SDK crashes because of a read access violation while running unwrap method. I probably do something wrong, either with the mesh, or with the unwrapper, however I don’t know what and the method is supposed to return false instead of segfault.
I would also like to point out that the same error is raised by C# SDK.
Could someone explain me how to code it properly, and potentially fix this please ?
Thanks for checking that. I had a closer look at your model and how it unwraps.
Regarding the crash, I have updated RH-69383. This is getting fixed.
Regarding poor documentation, here’s how RhinoMeshUnwrapper should be used. Every mesh edge that you want to keep connected needs to be welded (connected faces reference the same vertex at both ends of the edge).
So if you want to unwrap a box into a cross shape. You need to weld all the edges you want to keep connected and unweld the edges you want as seams.