Wed, 02/26/2014 - 18:48
Hello,
when I use BRep_Tool::Triangulation() to get the UV-coordinates for each face of a solid (via UVNodes()), I noticed that for planar faces, the UV-values are in relation to the length and width of the face (i.e. the maximum value of U (V) corresponds to the length (width) of the face). On the other hand, for non-planar faces, the UV-values range from zero to one.
Is it possible to change this behaviour, so that the UV-values for non-planar faces are also in relation to the length and width of the face (measured along the surface)?
Or is there a possiblity to calculate the length of a face along the U- and V-direction (to do the scaling of the UV-values myself)?
The reason for asking is that I want to map a texture on the faces and therefore need the UV-coordinates as absolute values.
Thanks in advance,
Georg
Fri, 04/29/2016 - 16:59
Hi Georg,
Have you found solution for this issue ?
Regards,
Mariusz
Mon, 05/02/2016 - 10:56
Hi!
Computing face dimensions along UV-coordinate axes, might be done by interpolating UV-Points on the surface (see class Geom2dAPI_Interpolate), converting this curve to the space (see GeomLib::BuildCurve3d) and then measuring curve lengths in the space (see CPnts_AbscissaPoint).
Benjamin
Tue, 05/03/2016 - 20:47
Hi Benjamin,
Thank You, works like a charm.
Best Regards,
Mariusz