Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 8557

Rhino 7 - MeshRay intersection changes

$
0
0

Hi all

I wonder if there were some changes in MeshRay intersection logic since version 6?
I have some unpredictable results with sunlight calculation in my grasshopper plugin in Rhino 7. The plugin uses mesh boxes representing buildings and a bunch of vectors for sun rays. The final goal is to calculate the number of unobstructed sun rays.

The algorithm is basically following:

        Extrusion ex  = Extrusion.Create(crv, height, false);
        var brep = ex.ToBrep();
        var mesh = Mesh.CreateFromBrep(brep, MeshingParameters.FastRenderMesh);
        mesh.Vertices.CombineIdentical(true, true);
        mesh.Compact();
        double result = Intersection.MeshRay(mesh, ray);

Since my client started using Rhino 7 there have been some mistakes with intersection between sunlight vectors and meshes. I haven’t figured out yet where exactly the problem is but it seems to be somewhere between Extrusion.Create(), Extrusion.ToBrep() Mesh.CreateFromBrep() and MeshRay().

Is there something in particular I should pay more attention to?

Thanks,
Max

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 8557

Trending Articles