Material on component / groups

Hi,

I’m working on an skp import with c++ SDK (2016 version).
This import works very well but I have one difficulty.

I would like to understand the way to explore correctly the material and uv coord of one component/group made by paint bucket. It seems that in first case, uv coords retrieved by SUUVHelperGetFrontUVQ are equal to vertex coord making a bad end result. So is there a scale factor somewhere else ? In Component object ?

In SketchUp example below, Left cube is a group and right cube is the same group but exploded and rotated.

a_zoltan.skp (509.9 KB)

In our InSitu software :

previous post about the subject :

I am seeing the same problems. When the material for a face is inherited from a group/component, the UV coords returned by SUUVHelperGet[Front,Back]UVQ are all messed up.

Please tell us how to correctly get the UV coordinates for this file.

Basically - do not used textured-materials applied to ‘containers’ - it’s not UVQ mapped
[whereas plain RGB materials are fine - there’s no UVQ mapping needed! ].
A textured-material applied directly onto a face will be properly UVQ mapped.

You could consider making a temporary copy of the ‘container’ [inside a temp-group], then exploding it.
The resultant faces then take the ‘zero’ UVQ mapping for any textured-materials from the previous ‘container’.
The original container’s internal faces [i.e. those which had no material] will be used on the equivalent temp-group faces, and also use the textured-material from the ‘container’ with the default UVQ mapping… etc…

Is there a way exploding in C++ SDK?

hi, how to get the material on component . Does i need to get the faces and then get material? But a component has many faces.