Visual Center for Rooms

So slight hiccup. I managed to create a python script that filtered out any element that would result in an empty geometry and the issue still persists. I did try adding random index numbers to the filtered list and it does work. Essentially there is still something in the filter list that is causing an issue but not sure what it could be or what parameter to look for in order to see which rooms are still causing the issue.

Any suggestions?

Try to find all indicies null and empty list…from your element geometry…and remove them or just try list clean…here is is an example…for indicies.

I did some additional experimenting by pulling the code out of the custom node and placing it into a dedicated python node in order to try and get an error code instead of just null. This is what I get when I run the rooms through it

image

I think it has to do with some of the rooms having curves

Yes Paul…thats why the best solution is to look at these rooms and make it right…if not it will follow your project to the end

100% agree @sovitek. Not sure what I can do about rooms with curved edges though

@sovitek @Alban_de_Chasteigner I have confirmed that the current custom node cant handle rooms that have curves. I have tested a couple other rooms with curves and they are the rooms that cause the node to spit out null values.

I did look back at @Alban_de_Chasteigner’s original post about the node and noticed that all the shapes being tested had straight lines. I am still new to Dynamo and Revit but I would like to suggest this as a future feature to be able to handle curved edges. Not sure how easy or difficult this request is.

I would like to thank both of you very much for helping me this far with my problems and for being patient with me. Thank you very much. This has been a great first exposure to the dynamo forum

2 Likes

I had tested too with curved element…here you have right…but then you could take the floors/rooms surface and surface inner centroid i think…not tested :wink:

@sovitek you have peaked my curiosity. Can you elaborate or share what you are talking about?

I just think something here…

1 Like

Your script seems to be working. Couple questions:

  1. Do you mind walking me through what each node is doing. I see it working just not sure how or why it is working.

  2. I want to create a visual of the room in question that I am feeding into the script but not sure how to get it showing in the background like you have it.

1 Like

Hi Paul…try everything here in this forum you see…and take a deep look at dynamo primer and dynamo dictionary…my best advise is learn every ootb first…and then go python and c#…(I building builngs) but honestly is rare i cant fix a situation only with nodes and all these nice people there had made custom nodes that almost take care off all that…thats why dynamo is so strong…in my opinion…good luck :wink: :wink:

Hi Paul,

I edited the custom node.

Replace the old node in C:\Users\%USERNAME%\AppData\Roaming\Dynamo\Dynamo Revit\2.12\packages\Genius Loci\dyf with the new one.

Please note that the algorithm doesn’t work with ellipsoidal or circular surfaces but now with polygons containing curved shapes.

2 Likes

Alban…awesome :wink: :wink:

@Alban_de_Chasteigner Thank you very much for the curved addition