Option Explicit 'Script written by Luis Gil 'Script copyrighted by www.legil.org Call offsetSrfs Sub offsetSrfs Dim arrSrfs arrSrfs = Rhino.GetObjects("Select surfaces", 8, , True) If IsNull(arrSrfs) Then Exit Sub Rhino.AddLayer "OffsetSrf", RGB(255, 0, 150) Dim i Call Rhino.EnableRedraw(False) For i = LBound(arrSrfs) To UBound(arrSrfs) Dim arrPc, arrCentroid arrPc = Rhino.SurfaceAreaCentroid(arrSrfs(i)) arrCentroid = arrPc(0) Dim strNewSrf strNewSrf = Rhino.ScaleObject(arrSrfs(i), arrCentroid, Array(0.8, 0.8, 0.8), True) Rhino.ObjectLayer strNewSrf, "OffsetSrf" Dim arrPh1 : arrPh1 = Array(arrSrfs(i)) Dim arrPh2 : arrPh2 = Array(strNewsrf) Rhino.BooleanDifference arrPh1, arrPh2 Next Call Rhino.EnableRedraw(True) End Sub