"Linkelement.Byraybounce" node not working

Hello all,

please refer attached snap for clear explanation of my problem. this “Linkelement.Byraybounce” node is not working for me. it is not showing linked model data. any idea what the reason could be?. tried to run this script on Revit 2020 & 2023 both. still same error. Bimorph node package version is 3.0
thanks in advance for any help.

Hi @parikshit.thombare8X does it work if you feed in a categori ?

Can you show what inputs are connected to the node? Here an example of the node usage:
image

You can check here for further information about the node: Bimorph Nodes LinkElement.ByRayBounce | Dynamo BIM

thank you @sovitek @emrullah.yildiz for addressing it.
I got the solution and I am putting it here if anyone comes across same problem.

the issue was when I was running the script at that time the ceilings, beams from linked model were hidden inside section box and were not visible in view. when I changed section box range to make them visible it worked.
so for this node of raybounce it is necessary to make those elements visible in view when we run that script.

2 Likes

Hi @parikshit.thombare8X in this node default value for this node is set to null so unless u specify what category you want the ray to bounce from it’ll not be able to give you the desired result


so please provide the category hope it’ll work.

Regards,
BM

1 Like

Still facing problem for few supports.

In snap above one of the supports is passing through floor for rod extension, whereas other just restrict their length to bottom of the floor

hi @parikshit.thombare8X the ray for this isn’t going as it’s supposed to be here


in this annotated pic as you can see in green marked if u observed this the line is projecting in Z but in red or the one which is giving u the issue is projecting in some other direction instead of Z and according to the length of that line only u setting the height of supports right…??? so with that length only it’s setting this support passing through the floor.

here to figure that out you need to see in particular what’s different at that location in terms of elements that’s making that line change it’s direction.

without seeing the script and exact scenario this much i could interpret out of it. In case still not resolved try to recreate the issue in a dummy file and post with the script.

Regards,
BM

@bharat.minocha Yes you are right. I have also observed that thing and for those support for which their ray is inclined the supports are penetrated through floor. Also, I did test on another demo file, and it worked fine there.
I am still trying to figure it out. I shall share my script and demo file.
thanks.

It works perfectly fine on another demo model.

attaching my script here.
if not with Ray bounce then is there any other way to do this?
Cable Tray Support-Final-16Jan.dyn (803.4 KB)

@parikshit.thombare8X did u check in your live model with which element that inclined point is connecting coz as in your test model it’s working fine as you created ideal conditions there. I was going through your graph


and here i could see you using this node from Datashapes

which helps in finding nearest not importantly bouncing from the element you want it to.
image
This could give you better result in this case by bouncing from exactly the element you want it to bounce from and also in case you mentioned looking for another way to do this ReferenceIntersector Class (revitapidocs.com) we could write our own python script as well to get it done.

Please try bimorph’s LinkElement.ByRayBounce first otherwise you can share the file as well and if it’s confidential and don’t want to share here, do inbox.

Edit:-
image
Datashapes also having this particular node for specifying category, Also you can refer to these threads as well RayBounce to work on linked files
Extract parameter value from one family and assign to another

Regards,
BM

@bharat.minocha I have tried using node from bimorphs’s package earlier it was still showing same error. however I tried it again by defining category as floor and now it works fine.
but there is another challenge then for few of the cable trays there is ceiling above it and i want to support it from there.
is there a way to define multiple categories like floors, ceilings, beams etc?
regarding other ways i am completely beginner to the python or Revit API so that becomes bit tough for me.
appreciate your support.
thanks .

@parikshit.thombare8X Here As you can see:-

I just tried to recreate the case u asked cable tray having floor above also cable tray having ceiling above coming from the link.
:point_right: In this case i went with just 2 trays and using LinkElement.ByRayBounce because this gives me an edge to control what output i want as in your case there’s gonna be a case where you want it just to bounce from the nearest be it the floor or ceiling similarly as you can see in the video.

:point_right: At first i’m getting 2 lists of points on 2 trays, given those points as origin and as u see on the first cable tray for the first 2 points there is nothing above it so i got empty lists and rest came with floor element and the point

:point_right: Now moving on to 2nd tray which is below ceiling and here as you can see in the node input findnearest is with default value of false so the ray will pass through both the floor and ceiling and i’m getting both the elements and both points of bounceback this is the case when i wanted both elements coming in the way

:point_right: In last scenario i turned FindNearest as True and now it’ll not go beyond the first bounce means it first hit the ceiling and it’ll just give me that point not going to the floor after it.

And after this you can get the points you like to continue further with, hope it helps.

Regards,
BM

@bharat.minocha thank you very much for all your efforts.

however, I have tried updating it as per your suggestion but the problem still remains same. see snap below,



also, it shows ray bounce operation failed. but few supports it actually worked.
I am really wondering about it.

@parikshit.thombare8X In that case can’t say anything without looking at the exact scenario in parent file, i just added a beam as i could see issue was with beam in your case so i modified my sample file but it’s working perfectly as it should


@bharat.minocha thank you.
I shall test it on few more models.
I have seen Project.point method mentioned by @jacob.small in few topics. will that method work here? can we project point on linked model floor or ceiling ang get length from it? any idea how it can be done.

thanks again for all your help.

That method requires Dynamo native geometry, so you’d have to pull all the Revit solids into a single solid and union them all together… and that will take longer than you’d like to wait. Moving to a Revit API based method is the best path forward. There are several examples of this in the thread already - if they aren’t working it’s because you haven’t provided the right content or because your environment is different from what others are assuming… Provide a .dyn and an associated rvt and linked rvt and which recreate your project conditions (not the full project, just the conditions thereof which you’re struggling with) and you’ll likely get better help.

@jacob.small I have already submitted my script in previous post.
still sharing it again along with sample Revit files.
Just to clarify on issue, when i run the script rod height gets adjusted to floors above it and not for beams.
Cable Tray Support-Final-16Jan.dyn (2.1 MB)
Elect.rvt (7.7 MB)
Sample struct.rvt (3.3 MB)

If the script is using the elements level as the reference for the level above… is the fitting assigned to the correct level. Ie: 2700 above Level 1 instead of 5400 above level 0?

@pyXam Yes those are at correct level.

also ray bounce on level 2 penetrates through floor, whereas it should touch at bottom of it. for same model at level 2 it works fine.