he contents to e.g. d:\test.csv
To draw in processing should be something like this (untested code, I don't have processing at this moment):
Table table = loadTable("D:\test.csv");println(table.getRowCount() + " total rows in table"); for (TableRow row : table.rows()) { line(row.GetFloat(0),row.GetFloat(1),row.GetFloat(2),row.GetFloat(3));}
…
actually in position 3)
Weave is useful when you have two lists with several objects in each, and you want to combine them into one list, in a particular order (that order being the "Pattern")
So if you have a list with letters: A, B, C, D, E, F... into input 1
And a list of numbers: 1, 2, 3, 4, 5... into input 2
With the pattern: 1, 1, 2
The output of the weave would be A, B, 1, C, D, 2, E, F, 3...
Until it runs out of list.
Hope that helped!
john…
lections import defaultdict
example_list = [[1,2,4], [1,2,3], [3,4,3], [1,2,3], [5,7,1], [3,4,3], [5,7,1], [1,2,4], [9,4,9], [9,3,9], [9,4,9]]
d = defaultdict(list)
for item in example_list: d[tuple(item)].append(item)
groupedlist = sorted(d[x] for x in d)
print groupedlist
# Returns [[[1, 2, 3], [1, 2, 3]], [[1, 2, 4], [1, 2, 4]], [[3, 4, 3], [3, 4, 3]], [[5, 7, 1], [5, 7, 1]], [[9, 3, 9]], [[9, 4, 9], [9, 4, 9]]]
____________________________________________________
However working with python inside GH the code fails as (I'm assuming the id is included in the list ie.
[<Rhino.Geometry.Point3d object at 0x0000000000000BD0 [1611664.12669822,2952929.94466619,5788.70761766478]>]
If I print my object[0] i get just the vector, i.e [1611664.12669822,2952929.94466619,5788.70761766478]
However if i append my object, (for i in xrange (len(X)... list.append(my object[x])
The id included!?
[<Rhino.Geometry.Point3d object at 0x0000000000000BD0 [1611664.12669822,2952929.94466619,5788.70761766478]>]
Perhaps I'm over complicating this and should just use GH to group objects with the same position...
Also sometimes when getting vectors I receive long numbers such as.. 9.0122222900391e(10), and another times I don't.... Same file, script, geometry etc..
I'm quite a noobie in python for GH so any help or pointers are welcome...
Thank you in advance!
…
, E, H, C, F, I
So instead of Weave component, you might want to use the "Merge 03" component. It merges 3 data lists into one sequentially. For the example above, you would have:
A, B, C, D, E, F, G, H, I
Hope this help.…
Added by June-Hao Hou at 7:30am on December 4, 2010
ep (brerp width = 1 unit)
i = 10
According to the following logic
IF A
A: C or A (random select)
B: C or A (random select)
C: D or B (random select)
D: B or D (random select)
Than choose c or A
Choose randomly the module C or A and move of 2 units (i)
Than
If C, choose D or B and move of 3 units
If A, choose C or A and move of 3 units
Than
any help appreciated
thanks
s…