所以我有一个封闭的网格和一个单点。如何检查一个是否在另一个内部?
我试过了:
def is_inside(point):
points = pv.PolyData([point,])
point_in_question = points.points[0]
select = mesh_model.select_enclosed_points(points)
inside = select.threshold(0.5)
if len(inside.points) >0:
print(len(inside.points))
print(f"inside atom {i}")
else:
print("outside")
但我在len(inside.points)
. 那么如何检查一个点是否在网格内?