mcneel / rhinocommon

RhinoCommon is the .NET SDK for Rhino5 / Grasshopper
http://wiki.mcneel.com/developer/rhinocommon
244 stars 93 forks source link

BrepFace.PullPointsToFace() unexpected results #189

Open ThomasMahon opened 4 years ago

ThomasMahon commented 4 years ago

I'm using BrepFace.PullPointsToFace() with a tolerance which doesn't seem to do anything other than act like a boolean switch. In the RhinoCommon documentation it states: image

So I would expect that a point which is beyond the proximity of the face to not be returned, yet I can enter any value and a point which is beyond the tolerance will get returned on the face? If I input 0 then no points are returned. This seems very inconsistent and makes the use of the tolerance pointless. Is this a known limitation?

Example - the C# node is calling PullPointsToFace() on the brep show. The BrepFace being evaluated is the underside face: Projecting the point in the middle of the Brep to its underside face. It is elevated by the value in the slider (2211.538) so I would expect a threshold less than this to exclude the point from the pull, however, if I input a tolerance below the distance of the point to the face (950.655) it still returns the point pulled, when according to the RhinoCommon documentation it should be omitted.

I've noticed that the tolerance only prevents the point from being pulled if its 0.0. Even points which are coincident with the face and should therefore pass with a tolerance of 0.0 also get excluded which is why I described the tolerance input more like a boolean switch, as it seems to exhibit behaviour more accurately described as an on or off switch: image