Applying specific area number to a curve

Hi,

I am trying to define a specific area to a curve. The curve area is about 4700 SQM and I want to be able to offset from the curve to get exactly 1500 SQM. Any idea how to achieve that?
I put a slider to offset the distance to manually get to 1500 SQM. But I need exactly 1500 so that every time I change the original curve, it remains the same 1500.

Thanks,

26 FEB 2019 - AREA.gh (16.4 KB)

For offsetting, using Galapagos may be your best bet. Not exact but very close.

If you want to just scale the original, Pufferfish has a very good Scale To Area component.

I’ve included both options in the file attached.
26 FEB 2019 - AREA_V2.gh (11.7 KB)

2 Likes

Thanks very much for your help. I never worked with Galapogos before. Still a lot to learn…
I did download Pufferfish as well. Need to get my head around with its components.

If you are fine with scaling, you can simply scale by the square root of your desired area over your original area (sqrt(Desired Area/Original Area)). But the Scale To Area component from Pufferfish does this for you in one simple step, and has some other options for proportionate scaling.

i don’t think this is a solution; this scale the shape but what he want is offset to get a shape with area = 1500.
the idea is to find the offset distance between the shape with area 1500 and the shape with area >1500
we calculate the lengths of the two shape than the Surface and the height (h) is the offset we need.

The problem was already solved if you reread above, I was just giving an alternate for scaling…just in case.

sorry this is not a solution

1 Like

It helps if you run Galapagos.

Sorry for the confusion. If I want to explain in detail, is basically try to see what shape I get by creating an area of 1500 from the perimeter. Then reverse the process to get the negative and use topography to create new shapes. Hope the attached file help defining.

you can try with range but it is slow ; it will calculate serie of offset than choose the closest area to 1500
it work even you change the shape , but need more work

1 Like

Can you please explain what expression you use for the second offset(the one connected to series). I cant get it working. And also how did you get to the number “16” for the first slider.

Many thanks,

for slider you can modify settings when click twice

hj

the expression is the same of the first one : -x; it’s copy past of your offset

I’m not sure why but there is something wrong that I dont get the same result.
26 FEB 2019 - AREA 3.gh (34.3 KB)

The solution from Seghierkhaled is a good one. The only modification I would suggest is a different sorting method at the end.

When I tested it (using different settings) I got two curves. If you sort using the method highlighted below, you are guaranteed to only get one.

I like this solution, but if you are looking to get as close as possible to a target value, I would probably still go with Galapagos. The downside is that you do have to rerun it (double click on the solver, go to the Solver tab, and click Start Solvers) every time if you do change the curve.

The first step it the same, first you should play with a slider to find the range where the area is within your target goal, then double click the Galapagos slider to set it within that range. That way the solver doesnt have so many options it needs to try and will solve faster.

See both options in the file attached, including the alternate filter option for the solution from Seghierkhaled.

26 FEB 2019 - AREA_V3.gh (16.3 KB)

2 Likes

If you see my diagram I explained how I’m trying tho get the negative.
In the example you provide I minus the original area from 1500 and the remaining will be an offset. But I get a very strange shape which I know its the way it calculate but is there anyway that we get proper offset?

26 FEB 2019 - AREA 4.gh (29.8 KB)

we just posted at the same time! let me read open the file.

step = 0.01 to get more lines closest to 1500

1 Like

Thanks very much Adam Mounsey and Seghierkhaled. Really appreciate your help it works perfectly fine.
Hope I won’t run into more problems along with my design.

Best,

Hello as i mentioned before this is the correct mathematical method
and because the shape change due the offset the calculation must change ; actually this method work only if the shape have the same points and angles

area calcule.gh (20.3 KB)

1 Like

You are right. I used both methods for offsetting as you mentioned, some curves with the same points and angles are not offsetting properly.
Below is the result: