Element.Geometry problem

Hello everyone,
I have a problem with the performance of a script. My problem is that running my script takes 30 minutes. I have reviewed it and the problem is when I want to ask for the geometry (Element.Geometry) of the structural framing. The purpose of the node is to find the interception of the structural framming with the structural columns. They are approximately 1200 structural framming.

Is it possible for you to share the files (Revit and DYN)?

Thanks,
Ritesh

Not sure why you are after with the end goal, but you could use an element location node which would get you a line instead of geometry for the beams which would be much faster to work with but could produce less than desirable results.

That said, I would be shocked if the geometry was your issue (unless they are very elaborately modeled trusses). I would wager that your bigger problem is more with the ‘does any of this geometry intersect with any of that geometry’ test. I did a similar sounding exercise in three 22 story towers and geometry wasn’t my issue.

You are effectively running a geometric test on thousands of members which normally you would logically exclude running the test for - I.E. if the column stops at floor one and the beam is at floor five should you even ask if they intersect? You are also testing members agains each other over, and over, and over again. Even if you know in an instant and would check if the CPU is still testing all 1200 framing members against X columns.

Best bet is narrowing your list of elements for the tests by breaking them into more manageable lists. Could do this based on levels, elevations, areas of the building, nearest grids or a combination thereof before you run the test. If you don’t have a parameter that associates the framing members with nearby grids than set one up and search the forum as there was a good thread on how to do that. Also try try using bounding boxes instead of geometry for the columns (they use less resources than geometry than a box as the geometry thinks about the beveled edges and interior openings whereas bounding boxes are defined by two points in space), offsetting the min and max points by say 2’ to account for member sizes, and then using a bounding box contains node on the results of the element.location node. These results should get you close enough to run the tests of real geometry against real geometry, or simply give you enough info to move on with your script’s desired result.

Hi Jacob,

You are right about how I am applying the logic bad. The truth is that I try all the elements since I do not know how to iterate or test elements only of the same level. I try to find the area of intersection (Column - Beam) to discount the surface area of the column. If you had a better solution I would appreciate it if you could give me a recommendation how to solve my problem.

I have no problem if I run the script by level. But in my office people do not drive dynamo and on the contrary do not want to use it because they feel it is very difficult. For that reason I try to make it simple and for now only have to click on execute. Later I will have to explain the environment and can manage them themselves. Resistance to change is very complicated.

Sorry for my english.

Ritesh_Chandawar

Thanks.