Visose, FrankS -
I've found that sometimes if my path structure changes the resulting data no longer matches properly with data carried over from other parts of the definition. I think this is perhaps the problem that FrankS is experiencing. In those cases I have found that doing the same operation on the other set of data works to match their paths up again. For instance, if you've shifted your data and need to reconnect it to the original data, you can put in a "dummy shift" for the original data. That is, use the actual shift method given by visose above, and then use it again on the same data but with an index of 0, so that the data order stays the same but receives an addition level of path structure. Your new shifted data will now match the original data, and you should be able to do whatever operation you intended on the matched set. I have to admit that this is a bit of a cobbled up workaround, and I'm having a hard time understanding how path components should work so that this kind of thing wouldn't be necessary. But for now it works. Marc On May 8, 12:45 pm, visose <[email protected]> wrote: > what are you trying to do that you need them to be the same? maybe > there's another way around it. > > On May 8, 11:49 am, frankS <[email protected]> wrote: > > > > > ok, i am stuck again. > > visose, taking a closer look at your suggestion i found out that i end > > up with a sligthly different structure. > > > (0;0;1) will be converted to (0;0;0;1) and so on. > > accordingly, shifting this way will add on level of tree hierarchy. > > anyway to avoid this? > > > thanks, > > frank > > > On May 6, 12:36 pm, frankS <[email protected]> wrote: > > > > wow, thanks visose for so much fast replies! > > > i didn't figure the "param viewer" was useful for anything more than > > > viewing. > > > it makes path structure accessible/manageable. great! > > > maybe it should change its name a bit to give a better hint. > > > first suggestion: "param viewer/handler" > > > would this make sense? > > > > On May 6, 12:18 pm, visose <[email protected]> wrote: > > > > > No need to flatten, besides that method will only work if you have one > > > > item per branch. You can use the param viewer and tree branch > > > > components to achieve > > > > this:http://grasshopper3d.googlegroups.com/web/shiftbranch.jpg > > > > > On May 6, 11:59 am, frankS <[email protected]> wrote: > > > > > > i am trying to shift branch structure, since there this no such > > > > > component, i try it the following way: > > > > > flatten the structure, > > > > > shift the list, > > > > > graft a new stucture from the shifted list... > > > > > > starting with a structure containing 3 paths > > > > > (0;0;0) > > > > > (0;1;0) > > > > > (0;2;0) > > > > > > after grafting it ends up with > > > > > (0;0;0) > > > > > (0;0;1) > > > > > (0;0;2) > > > > > > screenshot > > > > > here:http://grasshopper3d.googlegroups.com/web/shift_tree.jpg?hl=en&gsc=YI... > > > > > > any idea how to rearrange this creating the same structure again? > > > > > "simplifiy" doesn't seam to help... > > > > > any advise much appreciated. > > > > > frank- Hide quoted text - > > - Show quoted text -
