from ghpythonlib.components import EdgeSurface
from Grasshopper import DataTree
from Rhino.Geometry import PolylineCurve
from Grasshopper.Kernel.Data import GH_Path
import rhinoscriptsyntax as rs
n=len(x)
b=y
i=0
L1=DataTree[PolylineCurve]();L2=DataTree[PolylineCurve]()
LS1=[];LS2=[]
for i in rs.frange(0,n-1,1):
ls1=rs.OffsetCurve(x[i],[0,0,0],b)
ls2=rs.OffsetCurve(x[i],[0,0,0],-b)
LS1.append(ls1[0])
LS2.append(ls2[0])
L1.AddRange(LS1,GH_Path(0))
L2.AddRange(LS2,GH_Path(0)) |