Modify Existing Contours to Fit Required Slope %

HI Guys.

I hope you are all well. Fighting with anemone again :joy:

I made contours adjusting definition, basically all point inside boundary are made flat and It works.

But I am trying to use Anemone to make new points inside region with slope from 0 to 12%. So I measure distance from centre point of the region to all point to get existing slope and then every iteration I reduce “Z” of every point to get to desired slope %

Logic is correct (I think), but for some reason it doesn’t work as expected?

Thank you
Site_Adjusted_From_Contours_03.gh (422.0 KB)

One thought maybe it will be easier to create a curve between circles centres and then use this curve as attractor which will change points Z value based on distance.
?

Ok I did a quick test with curve attraction. It looks promising.

One thing, currently points effected by curve are rising up from their original Z positions.
I want points effected by curve getting closer to curve middle point Z value. So area of the surface closer to curve centre is as flat as possible?

With Graph Mapper I will be able to control how flat I want it to be

ContoursTest.gh (30.3 KB)

Can’t seem to find a way to make it flat closer to curve centre point.
Any ideas?:thinking:
Thank you

Hi @Joseph_Oster

I found your and Nikos scripts which do almost the thing I am trying to achieve. The only thing for some reason it drops all points to plane, don’t keeps them on surface?
Do you know how I might modify it ?

Thank you

Park2nt.gh (32.1 KB)

Hi everyone,

So I made a wee progress. Still something wrong with it.
1.Z values of points of original surface which are closer to curve should be as close as possible to Z value of Curve centre point. Something like this(Still has some strange things happening):

  1. I want somehow bring back control of falloff effect. So I can control transition smoothness along the curve and across. Like on this image:

  2. Also over the years you guys had some nice options to control how smooth transition is going to be.
    Cant find a way to integrate it?

I find some good examples done by @HS_Kim here: Transform a surface with attractor points - #3 by HS_Kim

@HS_Kim maybe you will be able to help? It looks like I a missing a small thing. It is probably I am staring at the same problem for too long.

Thank you :blush:

And GH file :))
Site_Adjusted_Curve_Attractor_02.gh (36.2 KB)

If you want flat regions inside the curve with a smooth falloff to the rest of the landscape, I’d approach it with a weighted average, like this, (no looping or plugins required):
flattenlandscape.gh (213.6 KB)

8 Likes

Thank you @DanielPiker

Yes it is kind off what I managed to do. What I was hoping is to change existing Z values of original points based on distance from the vent of the region / or curve.

For example I can build on slopes from 0 to 8% , so there is no reason to make these areas flat. That’s why I thought having a smooth transition from centre of the region towards existing points Z values would be a solution?

I like you always make a video :+1::wink:

I see. One option might be to blend between existing height and fully flattened with another weighted averaging:
flatten_blend
flattenlandscape2.gh (207.9 KB)

Here the blending factor is applied globally, but you could also use another falloff for this, if you want to keep a point in the middle of the curve exactly at that height.

1 Like

With a falloff for the blending factor:


flattenlandscape3.gh (212.0 KB)

1 Like

Thank you @DanielPiker it is exactly what I was trying to get.
I see what you did. It make sense.

I will just update it a bit to work with multiple regions/curves

If a site is intended to actually be built there typically is a desire/need/requirement for the modifications to result in no material being brought to the site or taken from the site. This means that the net change in volume should be zero, and is accomplished by removing material from some areas and filling other areas.

1 Like

Good point. I guess you could adjust the height of your flat region up or down to make these volumes equal.

Reminds me of something else I did recently for simulating buoyancy using Archimedes’ principle, that could be perhaps be adapted for this.

1 Like

Yep. It is exactly why I was trying to use a smooth / falloff effect from central point of the region. It should (in theory ) provide minimum amount of cut an fill. And make their % equal.

I hope…

So the change I had to make is to project point or region onto desired location on surface.

Hi @DanielPiker
I managed to recreate your definition. Can you explain what you did in these 2 locations of your script?
I think not understanding this part doesn’t allowing me to use multiple curves.

Thank you,

Site_Adjusted_From_Contours_05.gh (411.6 KB)

Sorry to bother you again @DanielPiker, I think I am double all my point by trying to use multiple curve.
Am I missing something?

Hi @DanielPiker,
I have added some comments to the script to better understand how it works. I think I got it.
Unfortunately still can’t get multiple regions to work?
Site_Adjusted_From_Contours_06.gh (80.0 KB)

Can anyone help. It looks like I missing something with my lists ?