I’m completely new into scripting, and I am trying to scale every polysurface of a rhino project from its centroid.
So far, I managed to get this:
import rhinoscriptsyntax as rs obj = rs.GetObject("Select a polysurface", rs.filter.polysurface) if obj: massprop = rs.SurfaceAreaCentroid(obj) if massprop: centroid = rs.AddPoint( massprop ) center3d = rs.PointCoordinates(centroid) rs.ScaleObject(obj, center3d, [0.9,0.9,0.9] )
As I said, I’m completely new. Now I’m trying to apply this scale to every polysurface of the file. And loops seam as a foreign language to me. If I manage to have a list with every guid of the polysurfaces, who do you I apply a transformation to each ?
(Sorry for my bad english.)