Skip to content

Instantly share code, notes, and snippets.

@chuongmep
Last active August 14, 2020 10:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuongmep/55fdb0312b7bb749dba293f94142411a to your computer and use it in GitHub Desktop.
Save chuongmep/55fdb0312b7bb749dba293f94142411a to your computer and use it in GitHub Desktop.
# Copyright (c) 2014, Nathan Miller
# The Proving Ground, http://TheProvingGround.org
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#The input to this node will be stored in the IN[0] variable.
input = IN[0]
if not hasattr(input, "__iter__"):
input = [input]
cleanlist = []
for i in input:
if hasattr(i, "__iter__"):
for ii in i:
if not (i is None):
cleanlist.append(i)
else:
if not (i is None):
cleanlist.append(i)
#Assign your output to the OUT variable
OUT = cleanlist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment