How to get the control points from a Polysurface

Well, as far as I know, turning on polysurface edit points is not exposed in any of the scripting interfaces. There is however a workaround - simply script rs.Command("_SolidPtOn"). The interesting thing is, that once the points are on, all of the rhinoscriptsyntax object grip manipulation methods do seem to work - you can select them, get/set their location, etc. See the rhinoscriptsyntax “grips” help section for all the methods.

One of the small quirks of any script that turns on object grips and manipulates them is that if you undo the script, the object grips will turn back on. To be lived with.

Below is a sample that gets an object’s solid editing points and scales them about the object’s bounding box center.

Beware, due to weaknesses in Rhino’s solid editing routines, randomly manipulating solid edit points can create completely crazy surfaces and potentially lock up or crash Rhino. I do not recommend editing objects this way unless you really know what you are doing. I would only try this example on a simple boxlike object. Use at your own risk.


"""Turns on an object's solid editing points and
scales their locations about object's bounding box center.
Beware, this script can lock up or crash Rhino!!!"""

import rhinoscriptsyntax as rs

def TestScaleObjSolidPts():
    msg="Select object to solid edit"
    if not obj: return
    sf=rs.GetReal("Scale factor for edit points?")
    if sf==None or sf<=0 :
    #get object's solid point locations
    #scale transformation by scale factor sf around object center
    #transform the  points and move solid grips
    for i,pt in enumerate(grip_pts):
    #turn off object grips
1 Like