Smooth selected grips in pyhon

is there a way to smooth selected grips in a mesh or do i have to just use the Rhino Command -_Smooth?

-Eivind

There is no easy way to replicate the functionality of the Smooth command via a script. Best to script the command…

Ok, i have scripted it.


# Local Smoothing with paint brush like tool

def SelectBrushSmooth():
    rs.Command("_-SelBrushPoints", False)
    grips = rs.SelectedObjectGrips(objectId)
    importCommand = "-_Smooth " + " -_Enter"
    rs.Command(importCommand, False)
    rs.UnselectObjectGrips(objectId)

I have this inside a while loop, it does need some work, but as a proof of concept it is ok.