Split any shape into rectangles

Hi Everyone,

I would like to subdivide the any complex shape into multiple rectangular shape. Kindly see the attached image where I highlight the rectangle above shape. Is there any plugin to divide? I tired multiple method but didn’t able to archive this.

Thank you so much in advance!
Akshay khaneja

Hello
it could be possible but it could be better if you give more information on the “complex shape”
Are the curves parallel ?
is there a tolerance ?
A min rectangle size ?
What to do with parts not transformed to rectangle ?

Post some files …
and look at theses link

Hello Laurent,

Thank you, but I tried these method’s as well, but it works only for shape which is at right angle but not for acute and obtuse angles. please refer the attached image.
• Yes, the curves always parallel.
• Straight lines and there are no minimum and maximum size it depends on the shape.
• Don’t consider the part not transformed to rectangle.
Split shape into rectangle.3dm (304.3 KB)
Split shape into rectangle.gh (17.3 KB)

Hello
you have surely not tested every thing, the idea is there from some of the scripts.

and mine I didn’t post

But the logic of the 2 are the same. Make perpendicular curves and the start/end of line curves.


But it works less well here

Some logic must be added, depending on type of curve (linear), obtuse acute angle …
Then when rectangle are found, it will be also possible to join some of them.

Gilbert Tessellation will be on Nautilus plugin, but you find it is some discussions
Split shape into rectangle.gh (16.1 KB)

Other logic could be implemented. For example find 2 consecutive right angle which mean that a rectangle could surely be found. Doing that with some recursion could help to cut the shapes. It requires time and/or money to develop this kind of tool.

2 Likes

This is where I’m at ! Merging those clumps into the biggest possible rectangle doesn’t seem that easy though

Split shape into rectangle.gh (30.9 KB)

1 Like

Thank you for your help!.