Raycaster to intersect solid face

Raycaster to intersect solid face

MiguelGT17
Advocate Advocate
296 Views
2 Replies
Message 1 of 3

Raycaster to intersect solid face

MiguelGT17
Advocate
Advocate

Hi folks, 

 

how can I manage to intersect the face of a solid using the ray intersector?
so far I receive null values when using my solid.Id and Faces as references:

MiguelGT17_0-1689988265016.png

Not even if I pass the ds.id:

MiguelGT17_1-1689988676649.png

 

 

Is not working either if I create a direct shape from the solid as a generic model and pass the generic model category filter to the intersector:

MiguelGT17_2-1689989002669.png

 

I want to project a ray from the center of the room so I can set the far clip offset to the elevation so I only what is inside the room space.

 

Any insights on this topic?

All the best

 

 

 

 

 

 

 

0 Likes
Accepted solutions (1)
297 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni
Accepted solution

 The room solid does not exist in the BIM. It is a pure abstract geometrical in-memory Revit API object.

  

The reference intersector processes real hard-core database resident existing BIM elements and nothing else.

  

So, there is no way that the reference intersector will ever be able to see the room solid that you are passing in.

  

The direct shape element that you create from it, however, is a database resident BIM element, so the reference intersector should be able to find that just fine.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 3

MiguelGT17
Advocate
Advocate

Thanks for confirming this!,

Indeed I needed to regenerate the doc so the raycaster can intersect the direct shape

 

all the best

0 Likes