# Remapping grid and detect overlap between selected grids

I am trying to create a logic that maps a floorplan onto irregular plan shapes. So far I have been able to create a grid that adheres to different curves. My next step is to generate different the different rooms. I’m using an attractor point to help isolate grids in the floor plans to represent rooms. The size increases and decrease using a sub list that starts at the attractor point.
I have two challenges with my program:

a) I am having trouble remapping my grid numbering to rows instead of columns. However, Ideally I’d hope to have the grid expand in a radial pattern, rather than linearly along columns.
b) I can’t figure out what method to automatically detect and eliminate overlap between selected grid squares.

I have attached the file below. Does anyone have any tips/suggestions for working around this?
(the area in question has been highlighted in pink)

(edit: Noticed an issue in grasshopper which has been resolved
floor plan generator.gh (26.2 KB)
Grasshopper - floor plan generator.3dm (500.8 KB)

Columns to rows is the easy part, you can flip the matrix of your grid, then the items and branches get swapped (notice the change in where the flattening is happening - your solution wasn’t far off, but by flattening too early it wasn’t responding the way you were expecting it to)

Sorting them radially… I suppose without knowing how that benefits you, it’s difficult to decide which strategy to suggest - so if you clarify how that would help, you might get a better answer imo.

I am not sure by which overlap you’re talking about either, maybe a sketch could help of what you need?

Sash

1 Like

Hey thanks for the response! Tried this out and it worked like a dream!
I’m starting to get a better hang on grasshopper but figuring out which step to modify lists always trips me up!

The radial idea was to use the attractor point to create a sub list on my grid to expand outwards from the surface it is on. Rather than in just one direction; vertically or horizontally. I’ve illustrated what I meant below if it gives you a better idea. Just trying to test the limits of what I can do with grids.

I’ve been able to figure out how to do this with a gradient but I want this to be intentionally selected

All good for the overlap though! I ended up scrapping that idea.

Okay, just sorting them by distance isn’t terribly difficult, this can probably fail in more ways than I can count, but it should get you started

Sash

Yes that’s what I was going for! Was playing around with no success.

Check this as well…

floor plan generator_re.gh (31.5 KB)