Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
dataEnteringNode = IN
arr = IN[0]
posArr = list(filter(lambda a: ("Pos" in a), arr))
def splitFn(a):
return a.split("=")[1]
def joinPoints(p):
return ','.join(p)
def splitPoints(c):
return c.split()
coords = list( map(splitFn, posArr) )
pointsArr = []
print(coords)
for s in coords:
splittedArr = splitPoints(s)
pointsArr.append(joinPoints(splittedArr))
print(pointsArr)
OUT = pointsArr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment