How evaluate a point on a trimmed surface

Hi, everyone.
I am try to evaluate a point on a trimmed surface with holes. How to make sure the point on the surface, not in the hole or outside the out loop?
my thought is to evaluate a point on its underlying surface and detemine if the point is on the trimmed surface. Is there better solution in rhinocommon.
any sugestion?

pointOnTrimmedSurface.3dm (74.0 KB)

A trimmed Surface is a BrepFace (terminology in Rhino is rather confusing, mind).

For a List of Breps (bList) and a List of Points (pList) - or a DataTree or some other collection:

BTW: If no face overlaps exist … then a bool[ ] taken = new bool[pList.Count] could speed things (with regard the inner (j) loop as above).

So if you want to do something more (for instance given a planar face determine the inner Loop curves point relation or find the closest inner Loop curve etc etc) … you’ll need some lines of code more.

thanks a lot. :+1:

Found a simple demo case … so give it a spin.

BrepFace_RndPointsInsideOutside_V1.3dm (70.3 KB) (128.4 KB)