Associate element from some space in model (clash detection or interference )

Associate element from some space in model (clash detection or interference )

amir.aroesti
Advocate Advocate
861 Views
5 Replies
Message 1 of 6

Associate element from some space in model (clash detection or interference )

amir.aroesti
Advocate
Advocate

Hi 

 

trying to think about my next plug in.

i have a model with some virtual spaces\area\zones that i would like to find out and associate every element in the model by new shared parameter that indicate about this zone.

 

i thought about create a Mass element and then make clash detection (test of every mass with all element) with NavisWork retrieve the list of elelenetID for each test  and specify new shared parameter with this information.

hope it was clear.

The process seems a little complicated. 

so maybe take the bounding box of every element and try to intersect with Mass geometry?

 

thanks

2020-04-22 12_13_52-Window.png

 

 

 

0 Likes
862 Views
5 Replies
Replies (5)
Message 2 of 6

BenoitE&A
Collaborator
Collaborator

Hello Amir,

Your calculation looks tedious indeed.

We have this issue with one of our plug-ins and here what I came with:

- check if the element is in the level you are working with

- project all the faces of your element on the given floor (or on any horizontal plane)

- sum up your projections (using boolean algebra on 2D polygons, we use NetTopologySuite)

- check if the given sum is inside your zone.

In fact this is not simple... but we know how to do all the steps... so it is probably easier for me than for you!

Anyway... it works for me.


Benoit FAVRE
CEO of etudes & automates
www.etudesetautomates.com/
0 Likes
Message 3 of 6

TripleM-Dev.net
Advisor
Advisor

Hi,

 

Depends on some things, I made one that can check for interferences between linked models (revit can only check model items agains links and not Link > Link)

 

BoundingBox will return to many elements, use GetGeometry to get the Solid(s) of the interference element, and then use ElementIntersectsSolidFilter from the retrieved Solid.

 

// VirtualSolid, solid from interference element (mass/family ed)
// ElemCollection, collection to check agains

ElemCollection.WherePasses(new ElementIntersectsSolidFilter(VirtualSolid));

 

- Michel

Message 4 of 6

amir.aroesti
Advocate
Advocate

exactly what i thought about.

ill start it next week so if you have any other tip i would be happy if you can share with me.

 

about the link issue you talked about.

its not an issue because ill run this script on all the model link i have with the same virtual mass (using your name 🙂 ).

 

Amir

0 Likes
Message 5 of 6

RPTHOMAS108
Mentor
Mentor

ElementIntersectsElementFilter?

 

Have used this in the past for similar problem, zoning items.

0 Likes
Message 6 of 6

TripleM-Dev.net
Advisor
Advisor

Don't trust ElementIntersectsElementFilter returns 100% especially with nested elements or elements with only a void.

It's a start, to reduce the elements to be checked on their Solid Geometry.

 

Even the Builtin interference checker gives false positives in various conditions.

 

- Michel

0 Likes