How to get indices of surfaces that were/will be joined from flattened list? like that:
join brep finds collisions so quick and easy in comparison to other methods!
How to get indices of surfaces that were/will be joined from flattened list? like that:
That’s a classic and rather very simple Clustering task where the criterion is the Brep.Join Method. Clustering means a DataTree of Type int where items are the indices of the co-related items (as Breps) in the input collection. Obviously you can use some other criterion (like Brep/Brep proximity and common Face Edge detection (say overlap) … but why make things complex for no reason?)
Say “like” using this into a standard Custering Method (very easy with C#).
Note: in case that you are familiar with coding DON’T attempt Clustering with a “simple” double Loop. Here’s the “basic” approach on that matter (as you can see it’s a very simple piece of code).
I assume, that under the hood “join brep” component finds intersections, it just does not give the indices. I know the maximum we can get is the tolerance change… I need that because i have a building with curves that represent windows. I want to find all the corners, given i have all facades and floors sorted in branches, and order sorted in lists. I would use indices from join brep to find the corner units of the facade.
Thank you, I will try to write that!
Er … hmm … I assume that you are familiar with C#. That said in real life we use “pre-filters” for excluding items that are not “related” (i.e. BEFORE calling some expensive Method like Join).
The simplest of these are Intervals (in x/y/z) Ccx checks (using Boxes out of your items - thus their Intervals). Say like this (2 dims for this case):
Anyway … If you hit the wall notify.
Wait: since you create all that stuff via some algo … why the pointless reverse engineering part? It’s rather easy to control “ordinary/rnd partitions” on a per horizontal “Interval” basis … meaning that corners (and any other thing imaginable) is easy to spot/locate/manage.
And why you need the corner situation? Maybe to spec a different alu extrusion (i.e. you exploit solutions/options given some alu brand/system).
Or you work for an alu facades provider? (in this case the type of glazing is paramount: classic, structural (avoid) or semi-structural (maybe)).
BTW: In case of … well … you know what … there’s something waiting for you.Spot the diff in Elapsed when using the Interval pre-filter check : i.e.
looks promising, thank you again! I will try to write that code in the evening
BTW: The above (Clustering by the book using ONE criterion: Brep.JoinBreps()) …
… can’t - as it is - take into account angles. But implementing a “composite” check (i.e. using a Method) is elementary: or maybe is not? what angle? maybe the dihedral at the common Edge? and if the Edge is not linear where exactly? maybe the normals angle (case planar Faces) ? and if Faces are not planar … then what?
Moral: life sucks
I feel so stupid, but it is hard for me to understand right now. I made a workaround in gh for now, but i need to return to this when i take a few more lessons in c#, for now it is too advanced for me. But I will return to this for sure, that piece of code would be very useful. I do not need your help for now, I need to understand what you sent me above first. Thank you a lot! I will write you when i come back to this:))
PS: Life is great, do not say things like that. Your words influence your thoughts, and other people. Sometimes to be happy we just need to take a few deep breaths of fresh air and drink a glass of water. Being around people you love helps a lot as well.
PPS. Sorry for these words in case you have depression or anxiety disorder(my case), i know how it is.
Not at all. Later in your life (and in your pro life) maybe you’ll discoved what I mean.
Anyway … get the Cluster thing.
Clusters_Brep_Join_V1_.gh (145.8 KB)
BUT … don’t use it: added a very simple (LOL) 3rd C# that outlines the way to cut the mustard: i.e. deal with the problem at creation time and forget reverse engineering (very rarely justified - LIDAR stuff excluded etc etc).
Still - out of curiosity - why you are after “corners” in your facade panels? And what Mies van der Rohe (The Titan) would think on that “offset” matter?
Good to hear:D
thank you, I will figure out how it works. I know this forum is not ‘do it for me for free’ platform.
because I have corner units and double units from my client, and he wants the curves to be populated with these two types of blocks.
Remember: that indicative C# is NOT using angles. In case that you want a “composite” check do it, say, “like” this:
BTW: Spend a couple of minutes more (geared a stupid primitive C# that does some sort of “tower layout” [for planet Utopia] to the C# that you know).
Facade_rot_zone_V2.gh (123.8 KB)
As a challenge finish it (or maybe > recycle it).
I hear you: what is that stupid “example”? Well … a stupid “example”, what else?
Now that is something I can understand!