Display and print UV dimension?

Hi,
is there a way to display a mesh UV dimension via script?

Example:
I’ve unrolled a mesh and gave it a known UV dimension (60x60 mm)

Is there a way to retrieve this value on Rhino and print it out on the Notes tab?

Thanks for help

Hi @Julio, usually texture coordinates are using a normalized range between 0 and 1 and are stored in the mesh vertices. The size you get when you unwrap can be chosen arbitrary.

Can you provide an example mesh and the measures you expect from its UVs ?

_
c.

Hi @clement,
a little bit of backstory: we need the UV real dimension to be sure to apply textures at the correct size, i.e. 10 by 10 millimeters checker texture in Rhino will be exactly 10 by 10 millimiters in the real world. So if I know the UV real dimensions (i.e. 60x60 mm) I can set the texture (i.e. 10x10 mm) tiling to 6 | 6.

I can share with you the same mesh with two types of UV mapping:

UV Real Size -> 60x60 mm
LAT-DX [MAP].zip (11.6 KB)

UV Normalized -> 1x1
LAT-DX [MAP].exported.zip (11.5 KB)

Inside the external UV Mapping software I’m using I can print out these informations for the normalized UV using this LUA script
UV-dim.zip (537 Bytes):
– Real dimensions of the island number: 0 are 55.799438487372 x 31.700004049637
– 3D Area: 1095.2207575867
– UV Area: 0.3042279872658
– UV Real Dimension: 60.00

So I’m wondering if there’s a similar script I can use inside Rhino to print the same infos in the notes panel.

Thanks

Hi @Julio, this one prints the areas and UV dimension: PrintUVDimension.py (2.1 KB)

_
c.

Hi @clement, thanks for your help! This is exactly what I needed!