Rhino7 bug Geometry.Intersect.Intersection

Hi,

I’ve got a plugin which uses the Geometry.Intersect.Intersection.BrepBrep Method. It worked perfectly fine in Rhino6, but now in Rhino7 it gets hung up. Whenever it finds an actual intersection, it seems unable to return to the main program, effectively crashing the program. Could anyone look into this?

Cheers,
Marie

Sure, send us a sample and we’ll see if we can repeat the issue.

Thanks, I’ve attached the part of the file that’s creating the issue. The code is

            for (int i = 0; i < WorkingSet.Count; i++)
            { var workingobjA = originalFile.Objects.FindId(WorkingSet[i]);
                Brep brepA = Brep.TryConvertBrep(workingobjA.Geometry);
                for (int c = 0; c < WorkingSet.Count; c++)
                { if (c != i)
                    {
                        var workingobjB = originalFile.Objects.FindId(WorkingSet[c]);
                        Brep brepB = Brep.TryConvertBrep(workingobjB.Geometry);
                        bool intersection = Rhino.Geometry.Intersect.Intersection.BrepBrep(brepA, brepB, tolerance, out Curve[] _, out Point3d[] points);
} } }

The tolerance is set to 1e-6. If I reduce the tolerance, it doesn’t find the intersection anymore (but runs through, at least).

Cheers,
Marie

005_03_002_Test Model_V02_bug.3dm (1.4 MB)

Hi @m.romland,

Why are you trying to intersect with such a tight tolerance?

Your document’s tolerance is 0.001. It’s generally best to intersect using the document’s tolerance, as that is the tolerance the geometry was built with.

https://wiki.mcneel.com/rhino/faqtolerances

– Dale

Hi Dale,

I don’t know what the document tolerance will have been - the plug-in will have to work on imported step - files created with different CAD - programs. But even small intersections might create issues downstream. And using the tolerance of 1e-6 (or even less) worked fine in Rhino 6.

Cheers,
Marie

Hi @m.romland,

I am unable to repeat the crash. But I am seeing different results. I’ve created an issue so we can look into this:

https://mcneel.myjetbrains.com/youtrack/issue/RH-61802

The code I used to test with attached to the above issue.

Thanks,

– Dale