4}
{0;2;0}
{0;2;1}
{0;2;2}
{0;2;3}
{0;2;4}
You cannot flip this because this is more complex than a rectangular matrix. You're going to have to do the mapping yourself. Try a Path Mapper with the following masks:
{A;B;C}(i) -> {A;B;i}(C)
Which should give you a structure that results in 3 lofts.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
…
Added by David Rutten at 3:18pm on November 27, 2011
em with other also modified pairs ... meaning that the "towers" at some areas they would appear "fused" and in some others "separated".
If all the above are true ... then you should create one profile out of the given 2 pairs (by using selected control points). There's a variety of ways to do that: for instance finding a "guide" axis defined by the 2 closed curves centroids and then creating a kind of "8" that engulfs the axis (by discarding control points that are not suitable for the desired shape of "8").
On first sight this appears very easy.
If however you want to individually (a) pick the pairs to be "fused" and (b) vary/discard the control points (based on some sort of aesthetics as primary criterion) ... then this is also very easy but requires solely code.
BTW: If you want all that being "fused" into a liquid shape ... then you should try TSplines other wise the above method would yield separated lofted solids with hard edges between the "fused" segments and the 4 neighbor "pairs" (2 above + 2 below the fused segment).…
.
If the above are correct then I am afraid there is no solid answer, data matching (how to modify 2 groups of data so that they work together) can be done in many ways and no one is suitable for every case.
For example in the [move] component in your definition you have the G input receiving 27 lists with 54 lines each (1458 lines) and you want to move these lines in Z direction. Depending on how you want to move them it could make sense to have T input receiving:
a. One vector (this would move all the lines by this vector)
b. 54 vectors (this would move the first line of each list by the first vector, the second line of each list by the second vector, ...... , the last line of each list by the last vector)
c. 27 vectors grafted so that the paths match (this would move the first list of lines by the first vector, the second list of lines by the second vector, ...... , the last list of lines by the last vector)
d. 27 lists with 54 vectors each (1458 vectors). This way each line will move by the corresponding vector.
So, as you can see there is not a global solution.
In order to be able to decide how to format your data you must always be aware of what your existing data structure means. For example, in the above case, you have your lines in the format {A;B;}N. Now A has 6 values (0 to 5) which is the number of your original surfaces. B has various values because it is the number of edges that each surface had(deconstruct Brep component). Finally N (the number of items in each list) is 54 because you offseted each edge 54 times (offset component).
So in order to decide which of the above cases suits you best you must have these things in mind.
In general some useful components for data matching are: [tree statistics] [list length] [repeat data] [graft] [simplify] and [flatten] and of course many more, depending on the case...
But in order to use these properly you must first study about data trees and how they work.....
Hope this helped a bit and please post back if you need some help into a specific part of your definition.…
ow mean this can't be done with this component? or do I have a mistake?
import ghpythonlib.components as ghcomp
import ghpythonlib.parallel
def removeDupeLines(line, tol):
result = ghcomp.Kangaroo.removeDuplicateLines(line, tol)
if result: return result.curves
if multithread:
Q = ghpythonlib.parallel.run(removeDupeLines, L, t)
else:
Q = ghcomp.Kangaroo.removeDuplicateLines(L,t).curves
…
Added by Jonah Hawk at 5:52pm on December 17, 2013
and says "repeat every Nth element", meaning say if N was 3, I would get A B C C D E F F G H. I would also like to be able to then insert a list of 3 elements in between each of the repeats. For example, I wanted to insert: 1. 1
2. 2
3. 3 into the list, I would get A B C 1 2 3 C D E F 1 2 3 F G H. It seems like an easy task, but I cannot for the life of me figure out how to do it, I must be making a very basic mistake. I am new to grasshopper, so any and all help I could get would be GREATLY appreciated!…
ep is to understan the logics of what you want to do, in your case, build 4 point surfaces (u also need to know the right direction to build the surfaces). Then you can write an hipotetic list (by hand in a paper) of what you want. In your case the list was (0, 1, 3, 2) (2, 3, 5, 4) (4, 5, 7, 6), etc... if you can imagine building 2 lists, each one with the sequences (0, 2, 4, 6, etcc) and (1, 3, 5, 7, etc..) then you can manage with shift and graft to finally have four lists. A( 0 1 2 3 ...) B (1 3 5 etc..) C(3 5 7 etc..) D (2 4 6 etc..). And to achieve the 2 first lists, you need to get the odd and the pair numbers. The cull pattern does that amazingy well. With a pattern True-False you get de pair numbers, and with the False-True pattern you get de odd numbers.
Hope it was clear enough…
Added by Pep Tornabell at 5:32am on November 19, 2009
en the following equation can be generated
A+Bx1+Cy1+Dz1=Colour1
A+Bx2+Cy2+Dz2=Colour2
A+Bx3+Cy3+Dz3=Colour3
A+Bx4+Cy4+Dz4=Colour4
Where X1, y1, z1 are coordinates of the 1st point etc
and Colour1 is the grey scale number for the 1st point.
A, B, C and D are constants that can be determined by solving the 4 equations above.
Once they are known, the colour value at the target point can be determined from
A+Bxtarget+Cytarget+Dztarget=Colour value at this target point.
I wrote a program within the vb component to determine A B C and D. it is amazing how fast the code runs within the vb component. I needed to do 100,000 interpolations and the time taken was a massive 15 seconds.…
fused with those vb scripts that need their trees visible outside the component - mine is only on the interior.
I could post the code but I'm not sure how useful it would be to you - it's very specialized to a particular use,..
so back to normal arrays - anyone care to help refresh mymemory how you would make an array where each row has three columns, but the third has a list within it? would that make it a 3d array? basically a structure where each 'entry' has (0,0) and (0,1) of single integers but (0,2) is a list of integers?
--0 1 2
0 5 0 1,5,4,3
1 6 0 4,7,3,6
2 2 1 5,9,3,2
3 1 0 4,6,5,7
4...…
a single branch. However the order of branches inside a tree is defined by the sorting algorithm, it's not customizable. So if you want to insert a branch into a tree like this:
{0} {1} {2} {3} {4}
↑ ↑
{A} {B}
then {A} needs to be something like {0;1} and {B} needs to be {2;1} (or {2;2}, or {2;7} or {2;4;2;3}).
Perhaps you could benefit from a way to change the numbering on all the branches so that you can re-order it as you wish?
--
David Rutten
david@mcneel.com
Seattle, WA
ps. The image sampler should work that way. In fact it does on my Grasshopper build so I either already fixed this or something else is going on. Let's wait until 0.8.0002 is released.…
Added by David Rutten at 10:59am on November 16, 2010