Remove almost overlapping "duplicate" Breps

Hi,
I thought a simple BooleanUnion or MergeFaces or Join would do the trick, but I’ve been struggling for some time… How can I keep only the outtermost Breps of these buildings? They originated from a shapefile with footprints that I extruded, however it seems that it was a one to many relation, so in some cases I got the same building with different heights.
Breps:
breps_27112019.gh (2.0 MB)

I looked up in the forum, but couldn’t find simillar questions (sorry if they exist and I missed them…)
Help will be much appreciated :slight_smile: Thanks!

2.0 MB! That might be the largest GH file I’ve ever seen.

breps_27112019

Wouldn’t it be better to fix the “one to many relation” that caused the problem instead of sorting out the garble?


P.S. Member Index to the rescue again. From 428 breps down to 51.


breps_27112019_2019Nov27a.gh (2.0 MB)

Thanks for the reply.

Yes you’re absolutely right, but he “one to many” is also needed because I have to Google Earth check and choose which height is more appropriate for each building. However, in case I choose to go along with the maximum heights for the whole set, there must be a more elegant way than manual deletion.
Here is the gh definition (uses Merkat plugin), 18kB now :slight_smile:
area.7z (36.1 KB) area_27112019.gh (17.5 KB)

Did you look at my solution in the “P.S.”?

I’m not going to install Merkat plugin, sorry.

I didn’t notice the P.S - it’s simillar to one of my workarounds, however some of the buildings disappear.
Well, nevermind the plugin. I’ll figure this out. thanks anyway!

FWIW, Generally, it’s a bad idea to edit posts. Users that have seen the first version won’t be notified that there’s a newer version.
-wim

The forum software will actually prevent you from replying to the same post too many times in sequence. It explicitly suggests that the previous post be edited instead. So if I get more ideas and no one else has responded yet, I must either edit the previous post, wait for someone else to reply first or forget about it. I append to posts frequently so I suppose much of that content gets missed and is wasted effort. Bummer, that’s a lose, lose situation.

Hi Joseph, I’m aware that the suggestion comes up, but does it actually prevent you from adding a new post?
-wim

Yes, under some circumstances. I’d have to experiment to replicate it though.

TESTING - Reply #2

TESTING - Reply Number three

Aha, Reply #4 is prevented.

test

But will you see this message? :wink: Catch 22.

1 Like

Thanks for testing, Joseph!
I suppose that, for most purposes, 3 replies in a row should suffice :sunglasses:
-wim

Well, avoiding duplicates is better than sifting through the rubble and deciding which to keep and which to discard. If the Merkat plugin is needed for that, I can’t help you. I would guess there is a way to internalize data from it? Do you already know about Member Index?

Yesterday’s version (above) used Volume ‘C’ (Centroid) for two purposes:

  1. to get an XY coordinate for each building and
  2. to sort each “column” of duplicates, choosing the one with the highest centroid

It was not only slow but may have failed on 44 “Open Breps” found among your list of 428, esp. in R6?

This version (below) is different in several respects:

  1. It doesn’t use Volume so is much faster and handles “Open Breps”.
  2. It deconstructs each brep to get a pseudo centroid for each face, sorts them by Z to use the lowest one as a basis for Member Index magic (columns of duplicates) and the highest one as the height of each building.
  3. It culls duplicate buildings for each “column” by height. (orange group)


breps_27112019_2019Nov28a.gh (2.1 MB)

The cyan group culls nulls (only one) from your list of 428 breps. Of the 427 remaining, 44 are “Open Breps”. Only 5 of those 44 of become “Closed Breps” when Cap Holes is applied to them, but that’s just FYI, the capped breps are not used.


This image (above) shows other things:

  1. The white group has all 427 breps, organized in 50 branches (columns).
  2. The green group shows only the tallest building in each branch. 50 branches/columns = 50 buildings.
  3. The orange group is more subtle. For each of the 50 branches/columns, it culls the buildings by unique height. So the total is reduced from 427 down to 113 buildings, still organized by “column” (branch).
  4. A different copy of Member Index is used to summarize the results as follows.
  • Unique = 25 columns
  • 2 duplicates = 11 columns
  • 3 duplicates = 3 columns
  • 4 duplicates = 3 columns
  • 5 duplicates = 5 columns
  • 6 duplicates = 1 column
  • 7 duplicates = 2 columns

Off to the right is a copy of my ‘Tree/List Viewer’ tool connected to the orange group. With it, you can see each of the culled, unique height buildings (‘list idx’ slider) per column/branch (‘path idx’ slider)

Other than tallest or shortest, which criteria would you suggest for culling?