Scales a single object. This function can be used to perform uniform or non-uniform scale transformations. Scaling is based on the active construction plane.
rhinoscriptsyntax.ScaleObject (object_id, origin, scale, copy=False)
rhinoscript.object.ScaleObject (object_id, origin, scale, copy=False)
object_id |
Required. String or Guid. The identifier of the object to scale. |
origin |
Required. Point3d. The origin of the scale transformation. |
scale |
Required. List. A list of three numbers that identify the X axis, Y axis, and Z axis scale factors to apply. Scaling is based on the active construction plane. |
copy |
Optional. Boolean. Copy the object. If omitted, the object will not be copied (False). |
Guid |
The identifier of the scaled object if successful. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select object to scale")
if obj:
origin = rs.GetPoint("Origin point")
if origin:
rs.ScaleObject( obj, origin, (1,2,3), True )