Re-parametrizing given pointsets

Hi All,

I’m using GH for almost 2 months now and I ran into a question I couldn’t find any answer to (however there might be somewhere, sorry if so).
I’m dealing with sets of points (various number of sets, each may contain various number of points). I have the CSV file parsed and the pointsets are now in Grasshopper. The points have the given coordinates, but I want to change them with number sliders, so I can use these as genome of Galapagos later on.
In each set, where the coordinates of the points are equal, I’d like to apply only one slider (right side of the picture).

The points then will be connected to each other and I want those polylines to be dynamic.
Is there any way to get this somewhat automatically or with less manually created components, maybe with a combination of domains, reparametrizing, equality check, etc. to eliminate the close examination of such big data? I have hundreds of different pointsets that I should work with.
Hope it’s clear what I’d like to have, please ask if not and I’ll try to explain better.

Thanks in advance.


Can you upload the .gh file of the picture?
For anyone, it’s easier to help if you can work on the real thing.
(see Help Us Help You )
This seems really something that can be solved by a c# script or some plugin… dynamically adding components to the canvas…

Also, each pointset exist in a X-Y-Z bounding box.
If the slider X is created, what are its range? +/- a fixed amount? How much far can galapagos go from initial data?

sure, here is the file: (11.0 KB)

I set the ranges now between -1000 and +1000, but it doesn’t really matter at this point. I already figured a solution of using the borders of an area as the limits, not being confused by the actual distances, coordinates, etc. (22.0 KB)

This group finds the unique values of X/Y/Z in the point list and … do the thing you asked.
There is a c# script that automatically sets the gene pool amount.
(if the c# fails, see the comment inside or just manually set gene count size)
The gene pool is only the offset o the locations, so the final point is = initial + offset.

This is a raw solution, but should work as you asked.


What you are doing might be possible to make in a very simpler way.
If your final polyline is always a sequence of orthogonal segments, you could manage it like this:

  • initial point
  • direction (x/y/z) + amount
  • direction (x/y/z) + amount
  • direction (x/y/z) + amount
  • direction (x/y/z) + amount
  • etc

the direction is fixed, galapagos doesn’t have to change that, so you only need to manage the amount (which can be negative)

This way you just need to give galapagos the first 3 coordinates and then a list of values/multipliers…

Tell me if it make sense to you…


First of all, thanks a lot Riccardo, it works great and does the job perfectly. I’m still studying your solution and surely will learn a lot from it.

Although, in the example all the segments are orthogonal, that’s not always the case, all I know is the coordinates of the points that shall be connected, but I found examples for different angles as well.

Thanks again! :slight_smile:

Hi Riccardo,

Thanks again for your great solution, it’s really interesting and I’m not saying I’m 100% sure about everything yet, but I already have some questions to it, hope you don’t mind answering them:

  • What does define the order of the sliders in the Gene pool? e.g. if I look at the point only, that is highlighted in the Rhino window…

• 1st slider is responsible for the motion in X direction
• 3rd is for Y direction
• 7th is for the Z direction
Is that possible to assign let’s say the last point of the set to certain sliders, which are always the same? or is there any other way to identify these corresponding sliders?

  • With a relevance to the previous question:
    If I want to move another, independent pointset or brep together with a point (let’s say with the same, highlighted one again), how I can I connect these sliders (or can I) to be used as the parameters of the motion in X,Y,Z for the pointset?

  • I saw that by default a gene pool has ranges of 0 to +100, which you changed to -100 and +100. Did you do that manually? I can’t find anything in the code with regards to this. Is that possible to set the pool’s ranges from the C# code? I couldn’t be further from being a programmer, sorry if this is something stupid.

  • And the last one. I told I have a solution to use a given area’s border as the range of allowed motions, but I can’t figure how to include in this solution. Also, perhaps there is simpler way, but anyway, I attach mine. If you could have a look at it, I’d appreciate it. Or perhaps you have something else in your mind, how to do this. I think using an existing given area for these ranges would be more beneficial and suitable for me than using exact numbers.

Many thanks in advance. (24.7 KB) (31.4 KB)

The order of the gene pool is just “all unique X” > “all unique Y” > “all unique Z”.
I’ve added a panel with indexes of point moved for each row.
In the last part of the group you can easily/easier extract the motion for each of your points.

I’m pretty sure I am not understanding what you are trying to do.

I think you should re-evaluate from scratch your whole algorythim and find a better way to solve the problem.
Re-making code is pretty common. Optimizing.

I’m working blind because I have no idea what is going on…

yeah, perhaps you’re right. I give it another shot. the point here would be to be able to move the box together with the marked point. Anyway, thanks a lot, this helped too :slight_smile: