I'm trying to make a script that suppress any patterned holes that are not inside of a boundary sketch. There is a script on the Mod the Machine site (link below) that does this but it fails if there are any partial holes on the edge of the part and I want a more robust version that deals with that edge case.
Here is an example of what I'm looking to do. Every hole in the pattern that is not fully inside the sketch boundary should be suppressed.
I've found code to get the center point of of a hole, so my idea is to see if that center point is inside the sketched boundary. I've searched around and have yet to find a method to check if a point is inside a sketch loop or on a surface if a surface were created from the sketch loop.
So my main question is does anyone know a method to check if a point is inside a sketch loop or on a surface or anything else that would yield the same results?
Attached is a test part with the iLogic script from the link below included also.
Mod the Machine Holes inside a boundary