Hi,
Me and @DavidMans are trying to make sense of the false output we get from the Mesh point inclusion component in the example illustrated below. Welding the mesh doesn’t seem to improve the result, but moving the point asymmetrically either along the X or Y direction seems to resolve it. Any ideas of what’s going on and if there is a workaround? Example file is attached.
BTW: Also in R5 the Mesh.IsPointInside(…) Method yields occasionally incorrect results most notably if Mesh.IsClosed returns true AND Mesh.SolidOrientation() returns 0 (meaning propably inward/outward facing normals).
If you are familiar with C# I could provide some temporary sort of solution.
OK, I’ll prepare a simple case with 3 test options (IsPointInside and other 2) as used in some C# that attempts to “heal/fill” Concave Mesh faces on a per topology edge Face adjacency basis.
Thus you can use portions of the code for your purposes.
Just to clarify, you only need to use the rotated mesh and points as inputs for MeshInclusion component. and obviously, elsewhere, you can use the original mesh and points.
As I said the scope of this is to locate edges that yield convex/concave dihedrals (in order to “relax” similar Meshes used for freaky MERO trusses, blah, blah).
In order to find the edges 3 options are provited: 2 of them require answering the 1M question: is it or is it not. At first keep the test mesh as it is (N1) and change the insidePtPolicy and/or the mode: spot that for some cases (i.e. meshes) the Mesh.IsPointInside Rhino Method yields bananas … so use the approach for mode 3 as aalternative/temporary (until the fix) solution.
Also spot what the SolidOrientation has to say (yields 0 while the Mesh is closed: LOL or what).
Thanks @Mahdiyar. For context, the inclusion logic will go straight into a rhinocommon based backend system where the check performed on a modified mesh might cause other issues downstream. The GH definition attached was just to demonstrate the issue.