Checking a point in an OCC Geometry

Hello All –

My research project requires me to check whether a random point falls within the geometry of a plate with holes inside. I naively tried (I am a beginning user of netgen) to check a point and got this error:

TypeError: argument of type ‘netgen.libngpy._NgOCC.OCCGeometry’ is not iterable

Is there an attribute that I can check or even a function to call on such an object that will let me know if the point is inside?

Thanks very much for your help — GL

netgen.occ has not wrapped occ classification functions.

You can generate a mesh, and search for the element containing a point. The nr will return -1 if the point is not contained in the mesh:

mesh(0.1,0.3).nr

best, Joachim

It works beautifully. Thank you Joachim