Calculating Polygon Areas, based on sorted width

Hi, I’m trying to set up a script that will help facilitate material calculations for some paver studies done in Rhino. Rather than modeling each paver, I have bands of pavers that follow set widths.(IE 4" strips, 8", 10"…etc). I’m hoping to use grasshopper to essentially select the surfaces that are 4" in width, and then calculate the area of that sorted group.

The challenge I’m having at the moment is because the strips are irregular shapes, (some short, some long, but all falling into my set widths), I have to sort them based on their center point distance to the nearest edge, but then can’t get back to the surfaces to calculate the area…

My grasshopper skills are still definitely a work in progress, but I’ve been spinning my wheels for a while, hoping someone can point me in the right direction. Am I just approaching this wrong? Sample files are attached (the imperfect surfaces are another challenge but I feel like I can deal with that once I get the overall logic down)

Thanks in advance!

Paving Study.3dm (6.9 MB)
PavingArea.gh (7.4 KB)

Hello @Jesshami,

Like this?

PavingAreaV2.gh (16.6 KB)

1 Like

Hi Jesshami,

I think you’re after something like this:
PavingArea_edit.gh (31.1 KB)

Same result with three different options

Yes! This is exactly what I was trying to do. Thank you for your help, and the super clear explanation this is wonderful - very much appreciated.

Next I need to figure out how to do this with the curved surfaces. I’ll let you all know if I sort it out.

Thanks for your response as well, these are interesting approaches - but as far as I can tell they are still just sorting by area, rather than by the width of polygon - In the sample I sent it works that the piece with the shortest width also has the smallest area, but what i was really after was sorting by the width and then calculating the areas as in P1r4t3b0y’s explanation.

1 Like

Looks like if I just use the surfaces to generate control point polygons, the center point to edge distance of that can be used for sorting and plugged into P1r4t3b0y’s solution. Thanks again everyone! (sorry for all the posts)