algorithmic modeling for Rhino
From below list, where First number of first Row (0) is X coordinate and next number of same row (0) is No of times X coordinate is repeating (here 3 times).
Then next rows from 1 to 3 (3 steps) are Y, Z coordinate (e.g. y=0,z=49.165 then y=1.331, z=49.213 etc)...like that it is repeating...I want to arrange this list in X, Y, Z coordinate list.
Would it be possible for anybody to help me?
-317.169,3
0,49.165
1.331,49.213
0,49.213
-317.135,4
0,49.119
1.368,49.167
1.57,49.213
0,49.213
-317.101,4
0,49.072
1.366,49.121
1.776,49.213
0,49.213
-317.068,4
0,49.026
1.364,49.074
1.983,49.213
0,49.213
-317.034,4
0,48.979
1.363,49.028
2.19,49.213
0,49.213
-317,4
0,48.933
1.361,48.981
2.397,49.213
0,49.213
-316.967,4
0,48.887
1.36,48.935
2.603,49.213
0,49.213
-316.933,4
0,48.84
1.358,48.888
2.81,49.213
0,49.213
-316.798,5
0,48.654
1.352,48.702
2.86,49.039
3.204,49.213
0,49.213
Tags:
Hi Amit,
Check attached..
Best
F
Wow, fantastic, this is what i am searching since many days, i thought there is only way of doing scripting.
Thanks a lot.
Right!
Wow, same result as above fantastic,
Thanks a lot.
As before, this is a terribly fragile data format. I didn't bother partitioning the point sets into branches.
Sorry for troubling in last post....this is what i expecting.
you all are great people.
thanks a lot
Note that both Filippos' and Hyungsoo's solutions depend on visual inspection of the data to explicitly identify the lines containing the X coordinates and repeat counts. They are likely to fail when the data changes.
The Anemone loop in my code doesn't do that, it follows your interpretation "rules" instead, which are cumbersome to manage using standard GH components. Scripting (Python) would be easier. And perhaps there are better ways to write the Anemone loop...? Still, the format is fragile without a way to separate the "X,reps" lines from the "Y,Z" lines of data.
ok noted, thank you sir, i will check your code for other list too, if i found anything different i will come back.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by