Intersection.MeshPolyline ERROR

Hi

RhinoCommon

the routine Intersection.MeshPolyline seems to miss the intersection for the mesh and the line
on layer default from attached file bad_mesh.3dm (88.5 KB)

The intersection within doc tolerance exists If i try to snap to it
Any hint or suggestion to detect this case ?
gerry

It does not seem related to the Absolute tolerance value , I have set to be quite large ( 1.0 m) and still the intersection is not found

Just as a follow up I have tested within grasshopper
and it behaves the same ( no intersection )
Clearly GH is calling RhinoCommon routine,

Nobody from McNeel can give a look at this ?
it seems a bug to me

gerry

Hi @gerryark,

I hope to have time to look at this today - thanks for your patience.

– Dale

Hi @gerryark,

Looks like there is a very small gap between the edge of the mesh (x = 32.804420471191406) and the line (x = 32.804420945913783) that is causing the intersection to fail.

– Dale

Hi Dale
Thanks for looking at this, but with a tollerance set to .01 shouldn’t the intersection get trapped ?
We are talking about the 7 digit , far smaller than a micron. The line has been placed using snap near tools, so something is wrong with the intersection detection

Hi @gerryark,

The method you’re calling does not use the document tolerance.

Internally, the code first test to see of the line intersects the object’s bounding box. This is to eliminate the obvious false cases. Note, no tolerance is used here. This is where the failure occurs in your case.

Had the bounding box intersection succeeded, Rhino’s internal zero tolerance (2^-32) is used for the mesh intersection calculation.

– Dale

Hi dale I got it but something is wrong for me. Same lines placed at other edges are all detected, placement is done using the snap near tool. One line missed over a set is more like a small bug. None of them or all of them should be the result. I don’t think that the bounding box is not inflated by a eps before first intersection test

Hi @gerryark,

I don’t disagree - https://mcneel.myjetbrains.com/youtrack/issue/RH-59369

– Dale

Thanks
Is there any other routine I can use for mesh curve intersection ?

Hi @gerryark

We’ve been discussing this internally lately. There’s not much at present.
But I am wondering, if you were needing something for mesh|curve or mesh|polyline?

Thanks,

Giulio


Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

Hi Giulio
I needed a mesh curve but moved to mesh polyline since it was not available. I am working on a tool to convert a model made out of curves, surfaces meshes into a fem model ready for analysis

I reported RH-59446 earlier on.