Ray Shoot Error Report

error.3dm (191.2 KB)
error.gh (10.8 KB)
geometrically the result must be only 1 point hit.
But the result is 2 points hit, and 1 of them is out of ray direction.

The RS Method rather works OK. See attached.

RayShoot_EntryLevel_V1.gh (126.2 KB)

it looks like your VB script is outputting one more bounce: what you indicat as Error Point is indeed the next bounce, and if you increase the bounce_count you’ll always get one more point than desired

BTW: Forgot to mention that Trims in Breps are ignored (of course you can cut the mustard with a proper analytic way : Ccx Crv/Brep/Mesh/Crv … then get the Normal > compute reflection … continue). See this (no Trims) as well.

RayShoot_EntryLevel_V1A.gh (127.8 KB)

I misunderstood Rayshoot function.
Ray reflects inside the surfaces.
Thank you.

As an entry level challenge try to do (forget dead meat VB > go for C#) this:

Or that (Trims and the likes):



2 Likes

Peter, here my version