Sun rays intersection with shading/building

Hi everyone

I would like to see the intersection of sun rays with the shading of my building model and the model itself.
I found, in the old forum, a definition that works well for the intersection, but i have a problem that comes before.

I have, somehow, to interrupt the ray path on the first obstacle and then i would like to highlight hitted points with a different colour mesh (now i’m using ugly spheres).

How can i do it?

intersection definition (7.4 KB)

my definition solaer (553.3 KB)

rhino model m1.3dm (8.5 MB)

I see that you are using a little C# (NOT the right one for this case since there’s other Intersection Methods far more handy for the job). If by accident you are familiar with the language I could provide a def that does what you want (using Ray3d ccx events against Breps or Meshes (better option: speed)) .

But I have a feeling that you are after shadows … and that is another animal.

Hi thanks for you reply

i’m not familiar with the code, i took it as it was.
My goal is to show, togheter with the sun path, point that are hitted by sun rays in given moments.
Any help will be much appreciated :raised_hands:

That’s quite unfortunate I confess.

Anyway, get a static (with regard the data used) demo on rays VS meshes (many emitters + many rays + many boxes as meshes) as an entry level indication on that matter. This with a few changes (easy) could serve your goal … IF the goal is getting hit points on objects due to some rays.

But since you don’t speak C# … the usage of the def attached is highly questionable. (123.6 KB)

And these are early tests using the actual C# def (for the moment: a WIP def for some EXPO project [lasers vs randomly placed objects in some 3d grid]) - results are either hits on meshes or reflections on breps (required: 10+ times more time):

1 Like

Sorry for the late reply, but i had had an exam.

Thank you for your time. I tried to use the script but without success :worried:. I’ll find another way

As I said is unfortunate the fact that you are not familiar with coding. Anyway this semi-static demo could(?) shed some light more on that matter: just replace the demo meshes with yours (and mastermind a more interactive sun path). (135.7 KB)