i came across a annoying "feature" about the rhino.isPointinSurface() method.
Often when I use this function to exclude points from a bunch of points with the help of a closed Cylinder or a Sphere most of the points are processed correctly but some of them remain although they are definitely INSIDE the solid.
In the Rhino4-version of the function there was no option for giving a tolerance, in Rhino5 there is but it doesn't matter if I specify a tolerance or not - some of the points won't be recognized as inside.
What I did:
1. created a bunch of points with rhino.AddPoint()
2. created the solid for exclusion
3. applied the rhino.IsPointInSurface()-method
-> some of the points won't be recognized as inside
but If I:
1. take one of this "error"-points
2. delete it
3. draw this point manually
4. apply the rhino.IsPointInSurface()-method
-> the point gets processed correctly
So where is the problem? Does anybody have clue of what I'm doing wrong?
Can you post both a sample model and a sample script?
please see the attached files; the script adds a TextDot on the points which are not processed correctly..imho
Thx in advance, Regards
Definately a tolerance issue. Use the document's absolute tolerance and you will have better results (see attached).
Also, you might want to check the model relative tolerance. 1e-07 is a little tight. 1.0 percent is a little more reasonable.