I am trying to get the intersections areas (to define them as openings in floors later) as showed in the photo how can I get it by dynamo nodes or even python code ?
Any suggestions, Please?
Thanks in advance
I tried to use Geometry. intersect by give me 10 items of intersections and duplicate many surfaces and when i try to get the unique items still give me the 10 items!
You’re on the right path. First,
List.UniqueItems only works for comparable objects and surfaces are not comparable. That’s ok, you’ll just have to handle duplicates another way. Second, you don’t want to flatten your intersections since they’ll be grouped by surface already. It’ll be helpful to know which surfaces are intersecting later when you clean up duplicates. The problem right now is you’re intersecting each surface with itself, so you end up with 4 extra intersections. Keeping the intersections grouped allows you to identify and remove the self-intersections.
Yes, you got my problem here but can you tell me exactly how to remove the self-intersections from the list ?
I actually simplified my question but in the fact i have a dozen of areas intersects each other so i can not use code block to select that indices as you did to avoid the self intersection.
So if you can help by giving me a python code to use it in a wide way regardless the number of areas?
You know that each surface is going to intersect with itself so you either need to remove each surface from it’s own list of geometries to intersect or you need to remove the intersection from its respective index after all intersections have been found.
Essentially, you either need to:
- Create a specific list of viable intersections for each surface. (S1 can intersect S2, S3, and S4 but not S1).
- Find all intersections and then remove the self-intersection based on indices. (With 4 intersections each, index 0 would be a self-intersection item 0, index 1 would be a self-intersection with item 1, etc.)
Option 2 is probably the cleanest and pretty straightforward with the use of
Many thanks to you but i faced another problem after removed the self intersection i found 6 areas, and i tried to remove the duplicated areas but in vain beacuse dynamo consider them not eaqual? so any suggestions to keep only 3 areas ?
This is the part that requires a little creativity. I don’t believe there is a way to definitively compare geometries, which means we have to do our best to make an educated guess and what’s considered “equal”. This basically means comparing geometric properties until you have a reasonable level of confidence.
This could be as simple as comparing surface areas. If you know you have considerably different geometries and can make pairs with matching surface areas, then you can pretty confidently say those are duplicate surfaces. You can continue this kind of comparison with other properties (like perimeter length or even specific perimeter curves) to whatever level of confidence you think is necessary.
All of that being said, you have an easy out in this scenario. Because you’re already dealing with combined overlaps you don’t have any areas of further congruence. Simply put, your intersections are already isolated so you can do a really easy comparison of just the center points. I’d use
GroupByKey to group the surfaces by center point (points are still uncomparable geometries so you’ll have to convert to a string) and then get a single surface from each group.
I really appreciate your time to help me and it works after I convert the center point to string and grouped them as you said.
Thanks again my dear friend,
God bless you always
Thanks for your concern,
But where i can find “Surface.Downward” node, Is it in a package or updated dynamo version?
and why you used code block after using list flatten at the beginning?
Bro are you still here, I didn’t find this node yet?
What version of orchid is that node in? I can’t find it =??
no possible to check - just take a bottom surface in any your possible way