Grasshopper help with dividing a BREP into equal areas

Hello, everyone!

I would like assistance with a Grasshopper development or functionality to divide a BREP into equal areas (preferably rectangles) using both transverse and longitudinal cutting lines along the BREP’s longest side.

I’m looking for something similar, but with the ability to control the number of divisions and ensure equal area distribution.

1 Like

Hello @Lucas_Machado , do you mean generally equal area distribution or exact?

Since the surfaces have varying curvature, the surface area will differ (potentially greatly) based on the amount of surface deviation from “flatness”.

That being said if you just want to control the over “panelization” of this surface I’ll share a script for that in just a moment.

Thank you to reply @michaelvollrath

To be honest, exact area matching isn’t necessary, as long as the cutting lines are regular and equally spaced. The longitudinal and transverse lines would need to be parallel.

Like this, but with irregular BREP

Makes sense, please attach a .gh file with your brep geometry internalized.

Thank you @Lucas_Machado

Here’s the .gh file with the internalized geometry. Thank you very much once again for the help @michaelvollrath .

Irregular surface (6.5 MB)

1 Like

Hi @Lucas_Machado ,

Take a look at this and let me know if it meets your purposes or if you had something else in mind?

-This is isocurve division logic, If you need “straight cut” divisions that is slightly different logic, just let me know.

You can control the divisions here:

This method results in fairly uniform area values as you can see here:

Graph Space:

Model Space:

20230904_Irregular surface (6.2 MB)

1 Like

Thank you very much for the help @michaelvollrath . I believe this dimensionalization with approximate areas is what I was looking for.

One more question: would it be possible to make the division lines regular (parallel to the base)? It’s not a problem if this slightly changes the areas of each division, but it might open up new possibilities

Possibly, it does get a bit trickier given that your “base” is not coplanar to world XY plane but let me see what I can do.

Notice The Bottom Edge/Surface:

Here you go @Lucas_Machado , you can now toggle between “Contour” and “IsoCurve” division mode:

Graph Space:

Contour Result:


20230904_Irregular surface (6.2 MB)


You’re absolutely right; I didn’t notice that difference in base height. Thank you so much for your help! It really solved my problem

This is the most discrete way of a CAD program evolving into a reverse engineering RE program :sweat_smile:

Sorry what does RE mean?

that’s just the acronym I use for Reverse Engineering.

It’s a little less common than CAD for example, so not very popular to see it :blush:

It’s odd to me that this is a polysurface and not a mesh:

I wonder if the mesh could be used instead, and skip the step of converting into a poly for that sake of having a brep.

Or if that’s an advantageous step in the workflow then that’s interesting, but very time-calculation extensive.

Obviously it’s common to want NURBS from mesh, but I’m just wondering if the original mesh could be converted differently, so that the polysrf of countless triangles can be avoided in the workflow.

Of course if there’s an advantage to it, then we’d have to condone the extensive CPU calculation routines.

Although, if not then this file could be lightened up by just using the mesh instead – upfront, maybe.


I see, I thought it was Reverse Engineering but since you said that right before RE I thought, surely he can’t be saying RE twice :grin: but that makes sense.

Yes I had that thought as well though I didn’t express it. Ideally the original surface could be a single surface from the original insanitation but not sure what the “original” geometry creation looks like @Lucas_Machado ?

1 Like

yeah i did say it twice :grin:

yeah I had to say something cause my ol’ laptop is coughing on them 28,401 surfaces :sweat_smile:

imo, it would be neater if it was a mesh and then converted to brep via sub-D or something, then to NURBS :sunglasses:

I still need to study these files, but I surmise the objective to be, to constrain a more consistent uniform matrix of rectangular surface extraction from the original mesh, which is very interesting :thinking: :thought_balloon:

That GH file very complicated :sweat_smile: not sure I’ll ever understand it, but very interesting.

1 Like

I recommend toggling “Only draw preview geometry for selected objects” and then select one node at a time from left to right and visualize what each step is doing.


It will make more sense this way (I hope)

1 Like