Is this a sensible way to get brep solid point grips and move them?

brepobj.GripsOn = True
grips = brepobj.GetGrips()
grip = grips[n]

grip.CurrentLocation = Rhino.Geometry.Point3d(x, y, z)
sc.doc.Objects.GripUpdate(brepobj, True)

See if this gives you any ideas:

import Rhino.Geometry as rg
import Rhino.RhinoMath as rm
import scriptcontext as sc

def test_transform_brep_component():
    
    bbox = rg.BoundingBox(rg.Point3d.Origin, rg.Point3d(10.0, 10.0, 10.0))
    brep = rg.Brep.CreateFromBox(bbox)
    ci = rg.ComponentIndex(rg.ComponentIndexType.BrepVertex, 1)
    
    dir = rg.Vector3d(5.0, 0.0, 0.0)
    xform = rg.Transform.Translation(dir)
    tol = sc.doc.ModelAbsoluteTolerance
    
    brep.TransformComponent([ci], xform, tol, rm.UnsetValue, False)
    
    sc.doc.Objects.AddBrep(brep)
    sc.doc.Views.Redraw()

if __name__ == "__main__":
    test_transform_brep_component()
1 Like

This is the thing I couldn’t figure out on my own:

ci = rg.ComponentIndex(rg.ComponentIndexType.BrepVertex, 1)

Thank you, Dale!