API bug in ElementIntersectsElementFilter

API bug in ElementIntersectsElementFilter

Anonymous
Not applicable
1,076 Views
9 Replies
Message 1 of 10

API bug in ElementIntersectsElementFilter

Anonymous
Not applicable

Hi there,

 

During development I found that the Revit API ElementIntersectsElementFilter fails on finding the intersection between the rebar and Beam(T-Girder) FLAT member at some specific positions.

 

 

I have attached the model(2016), .addin and .dll file. 

Hope someone can help me with this issue.

 

 

Thank you!

 

Best,

Siwan

0 Likes
Accepted solutions (1)
1,077 Views
9 Replies
Replies (9)
Message 2 of 10

Revitalizer
Advisor
Advisor

Hi,

 

in the RevitAPI.chm, on the ElementIntersectsElementFilter page, it says:

 

"[...] Also, elements which have no solid geometry, such as Rebar, will never be detected as intersecting by this filter."

 

It's not a bug.

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





0 Likes
Message 3 of 10

Anonymous
Not applicable

Hi Revitalizer,

 

If you open the project, you can see that it's not a Revit Rebar, it's a customer family and it has solid geometry.

 

Thank you for your help.

 

Best,

Siwan

0 Likes
Message 4 of 10

Revitalizer
Advisor
Advisor

Hi,

 

I've opened your Revit file but cannot tell you why the Filter does not function.

Since you did provide the dll but none of the code, there are no other hints.

Sorry, no idea.

 

 

Revitalizer




Rudolf Honke
Software Developer
Mensch und Maschine





0 Likes
Message 5 of 10

FAIR59
Advisor
Advisor

the beam family has no geometry defined  (geometry is part of the nested shared family). so nothing intersects with the beam.

0 Likes
Message 6 of 10

Anonymous
Not applicable

Hi,

 

I am actually looking for the intersection between the "FLAT" (nested) member of that beam and the custom rebar family (specialty equipment) so I think both of them have family geometry. Also if you move the rebar to other places the function would return that they're intersected.

 

I've attached the code. Thanks!

 

0 Likes
Message 7 of 10

Anonymous
Not applicable

Hi, I've attached the code in the screen shot for you to see if it helps.

 

I am looking for the intersection between the "FLAT" (nested) member of that beam and the custom rebar family (specialty equipment), and it works in most intersection places but not the position that I put the rebar on. 

 

Thanks!

0 Likes
Message 8 of 10

Anonymous
Not applicable

Please see attached file

0 Likes
Message 9 of 10

FAIR59
Advisor
Advisor
Accepted solution

on analysing the nested families, I noted that the path of the Warped family is a part of a very large circle. So the host face of the rebar-family is ever so slightly non horizontal. So you're entering into areas of numerical imprecision when dealing with pointy things, slightly of axis elements and things like that. So the bug is not a bug of the filter, but a "bug" of imperfect calculation.

If you replace the swept-path with a straight line, the Flat-family will find the intersection with the rebar family. 

Message 10 of 10

Anonymous
Not applicable

Looks like the case.  The radius is 29999' 11 7/8" and with single precision values we basically get about 6-7 digits of precision so 29999.9895833333 which probably gives us a resulting 29999.98 (roughly) and the rebar 1/2 diameter is 0.015625' so it's pretty close to the murky region. 

 

The consternation is that it isn't a failed intersection all over the piece, only at certain locations so in calculating it must just be random enough, in terms of floating point rounding, that it works sometimes and not others.  I would like to see it a little more consistently failing at the middle of the element (where the camber delta is greatest and not at the end where the camber delta is not) but as it's really rounding precision error it's probably too much to ask.

 

If, however, Revit is working in double precision then this is a legit bug, even with the bar hosted to the warped element.