I imported a few images as photo references (picture command). I scaled one of them (scale1D). I don`t remember which. How to determine which is scaled without reloading everything? How to reset the scale of an imported picture to the base dimension?
In principle you cannot, since Rhino doesn’t store these transformations. If however your pictures have a known aspect ratio, it should be possible to make a script to detect it
1 Like
Thanks
_Picture attaches the image to a Plane Surface. If it is non-uniformly scaled, the surface will be converted to NURBS. Therefore, use _What to check the surface type.
1 Like
Hi @mdesign
here a simple check with python:
import rhinoscriptsyntax as rs
picture_id = rs.GetObject("Select Picture")
if picture_id:
u,v = rs.SurfaceParameter(picture_id, (1,1))
pts = rs.SurfacePoints(picture_id)
x = rs.Distance(pts[0],pts[2])
y = rs.Distance(pts[0],pts[1])
if abs(u/v - x/y) > 0.01: #tolerance
print ("picture scaled non-uniform")
else:
print ("picture is proportional")
1 Like
Brilliant!!