SUUVHelperGetFrontUVQ return SUUVQ with q = 0.0f

Hi there,

I am using Sketchup SDK and SUUVHelperGetFrontUVQ to get the UV coordinates for a specific point position. This is something done like this (summarized code)

SUVertexGetPosition(vertice, &pos);
SUUVHelperGetFrontUVQ(front_uv_helper, &pos, &uvq);
float u = uvq.u / uvq.q;
float v = uvq.v / uvq.q;

Everything work fine since a long time.
But the joined mesh return a q = 0.0;
This result in division by zero as shown in the screenshot.

This occurs for vertex 0 of face #24 of Group 0 which position is :
{x=2.2055715423330184 y=1.1811023622046832 z=8.8582822051845707 }

What to do when q is 0.0 ?
Is this supposed to occur sometime?

Thanks for your help!

extract.skp (1.5 MB)

Is this an entity ID or PID?

#24 is the index of the face in the face array you get using SUEntitiesGetFaces.
The ID of the face is 87854 if that can help, and that face belong to Group 0

The entityID isn’t not reliably across sessions. Can you get the persistent ID please? I want to make sure we deal with the same entity.

Oups! Please apologize Thomas.
The PID of the face is 7302967