How to get the control points from a Polysurface

Hello all
I have a Polysurface it is from a surfase I extrude
and I want change the Length on start or end

but I have holes in so I can not scale it so I want move the control points

ist this possibel and how I get the points and move the points

Thanks Robert


1 Like

Are you wanting to do this in a script, or is this topic mis-categorized? --Mitch

how thie work in Python ?

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

Thanks for help Mitch

It work I changed a bit.

#get object’s solid point locations
command = "-_SolidPtOn"
command += " _selID " + str(profil)
command += " _Enter"
rs.Command(command, True)

grip_pts = rs.ObjectGripLocations(profil)

new_p =[]

for i, point in enumerate(grip_pts):
    # move or not
    if ( check_start_or_end_point(point, x_move)):
        new_x = point[0] + ( l * x_factor ) 
        new_loc = Rhino.Geometry.Point3d(new_x, point[1], point[2])
        new_loc = Rhino.Geometry.Point3d(point[0] ,point[1], point[2])
rs.ObjectGripLocations(profil, new_p)

I my case It was a cold rolled Z_purlin with hols in .

I had some break down, but with rs.ObjectGripLocations(profil, new_p) it work pefect

Thanks Robert