We are using Rhino3dmIO in a .net core environment and it seems I have trouble with Mesh.IsPointInside that is failing failing completely. For comparison I implemented similar “unit test” (see below) that passes in GHpython component, but not with the Rhino3dmIO lib.
Any thoughts?
Tnx, Wei
import Rhino.Geometry
s = 10
# Cube from 0,0,0 to s,s,s
m.Vertices.Add(0,0,0)
m.Vertices.Add(s,0,0)
m.Vertices.Add(s,s,0)
m.Vertices.Add(0,s,0)
m.Vertices.Add(0,0,s)
m.Vertices.Add(s,0,s)
m.Vertices.Add(s,s,s)
m.Vertices.Add(0,s,s)
m.Faces.AddFace(0,1,2,3)
m.Faces.AddFace(0,1,5,4)
m.Faces.AddFace(1,2,6,5)
m.Faces.AddFace(2,3,7,6)
m.Faces.AddFace(3,0,4,7)
m.Faces.AddFace(4,5,6,7)
pointIsInside = m.IsPointInside(Rhino.Geometry.Point3d(1,1,1),0.001,True)
pointIsNotInside = not m.IsPointInside(Rhino.Geometry.Point3d(-1,1,1),0.001,True)
print "pointShouldBeInside : ", pointIsInside
print "pointShouldBeOutside : ", pointIsNotInside