Replacing points depending on size of original list HELP WITH INDEX

hello, have a long trouble here.

i tried everything as you will see.
got this model that i have to do some variety and every one of them has to work, its like a form finding of a hill. so when i give some height to the top, i give the same height to all points of the top, and then make it decrease from center to extremities, one for the north, on for the south.

got that problem.
i tried to do sth but it doesn’t work :frowning:

you can see, EVERY HILLSIDE SHOUD BE PARALLEL. not weird things.

thank youuuu

replacing points for top of a (344.0 KB)

while i’d love to help, i just opened your script & got turned off right away.
i’d recommend you isolate your problem & create a file dedicated to that problem (&this forum).

replacing points for top of a (175.6 KB)

here’s the script again. yes, i have some preview things for baking, not i delete them

seriously, your script seems overly complicated. how about you break it down for us.
whats your starting point, the given geometry & the desired outcome?


A few suggestions:

  1. do not use clusters at early stage of the design. It is difficult to troubleshoot as well as if GH crashes while you’re inside a cluster you’ll lose everything you’ve done to the gh file between your last save and the crash.
  2. what @Amir_Touhidi asked you was to isolate small part of your definition by using internalize data on some inputs. Identify what’s working according to your desire then internalize that in the next components’ inputs. Then post only that part here. Be sure to not save it with the same name so you don’t overwrite your own file or make a backup before doing so.
  3. Read this:
    How to ask effective questions
    Ask an exact question not “My definition is not working” but rather “I want do this but after using this component something is going wrong” point out where to look for the issue.

replacing points for top of a (186.6 KB)

i understand what you are saying, but i need that part to work with the whole model, cause the last to steps have to work with the second step, thats why i’m puttin the whole model, cause it has to work with variation.

here i uploaded with some annotation. in yellow, the part to check and i did some circle where to look. the yellow part works with the step 02. i put the names of the actions.

the cluster part is only a thing to choose the value to imput and other just to choose the name for that step.

i’m so sorry if is this complicated but i cannot reduce more for real!!!

Unless you can narrow it down to a set of specific, non-enmeshed steps, where each step is clearly delineated, it is almost impossible to help out. It would take a full day at the very least to come to grips with a file this big.

However I can tell you already have distinct regions in your algorithm marked by consecutive groups, so I don’t think you’re very far from achieving a better, more isolated design.

One thing (if you’re using GH on Rhino6) that helps is to break the algorithm apart into actual distinct files. You can use Data Input and Data Output components to carry data from one file to the next. It forces you to really think about what the minimum amount of information is that needs to be carried from one step to the next.

and if i don’t have rhino 6? how can i manage? i’m trying to do it little, really, i know it’s already complicated and also i have this organization because of protocols of my thesis, but every step that there is in the file, is necessary, i’ve been one day too thinking about the solution haha.
if you cannot help, there’s no problem!!!

Then you cannot easily use the intermediate files, you’ll just have to settle for breaking up the logic as you’re doing now, although perhaps with fewer interconnections.

Either way, the problem you’re trying to solve right now is either a specific set of components that aren’t interacting the way you want, in which case you should be able to isolate just that part, or the problem is that the algorithm as a whole has become unmaintainable, in which case you need to start refactoring.

1 Like

replacing points for top of a (254.3 KB)

well, i tried my best now!!!

i put both options but i need same definition for the 2 options. it works when its even list of peaks, but no for odd numbers.

how can i resolve this?

again, it’s a form finding of a hill, and in this part i’m fiving som height, and then differenciate north peaks and south peaks, so the heighest point it will be 1 peak (odd) or 2 peaks (even)

thank you all the people that are trying to help me!!!

@DavidRutten @Amir_Touhidi