Using Python / rs.
rs.MoveObject works just fine, yet translate and transform does not. They always return false. What am I doing wrong?
Draw a surface and run this code:
import rhinoscriptsyntax as rs
import Rhino
import scriptcontext as sc
import Rhino.Geometry as rg
import System.Guid as Guid
import System as sys
def TestSrf():
dist = 100
srf = rs.GetSurfaceObject('Select the surface.')
oSrf = rs.coercesurface(srf[0])
# Create the vector.
vec = rg.Vector3d(0, 0, dist)
# Move the surface
# This works
#print str(rs.MoveObject(srf[0], vec))
# None of these work. Returns false.
xForm = rs.XformTranslation(vec)
print 'Result: ' + str(oSrf.Transform(xForm))
#print str(rg.Surface.Transform(oSrf, xForm))
#print str(rg.BrepFace.Transform(oSrf, xForm))
#print 'Result: ' + str(oSrf.Translate(0, 0, 100))
rs.Redraw()
sc.doc.Objects.Transform
if __name__ == '__main__':
TestSrf()