ScaleSurface

'''
''' scale function for surfaces
''' —-

Function scalesurface (strsurface, xScale, yScale, zScale)

Dim strscale, domu, domv, paramu, paramv

domu = Rhino.SurfaceDomain(strsurface,0) 'gets the surface domain
domv = Rhino.SurfaceDomain(strsurface,1)

paramu = domu(0) + ((domu(1) - domu(0)) / 2)
paramv = domv(0) + ((domv(1) - domv(0)) / 2)

Dim centerpt: centerpt = Rhino.EvaluateSurface(strsurface, Array(paramu, paramv))
'calculate the surface centerpoint
Call Rhino.AddPoint (centerpt)

Call Rhino.ScaleObject (strsurface, centerpt, Array(xScale, yScale, zScale), False)
'scales the surfaces

End Function

page_revision: 0, last_edited: 1218018050|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License