I’m having a real trouble checking if a point is inside a brep.
I have an entire python code designed to create a wavy, random, tube-like shape, which is then closed with caps to form a brep (when i connect a sticky panel to the output containing the shape, there is only one line, “0 | Closed brep”)
I then have a function to draw a dense 3D array of points, which overlaps my shape. I want to test for each point in the list if it is inside the Brep or not.
I’ve tried two methods: one, coded directly as a function in python (which is commented at the end of my code) using the brep.IsPointInside argument. I have found no ressources online about this except working pieces of code (I’ve tried them, they work but I just can’t use it in my code i don’t know why) I get various errors depending on how I arrange my code. I’ll add the GH file with said code for you guys to try if you want.
The second method is by using the BrepInc (Point in Brep) component directly in the graphical interface. In this method I create a list of booleans corresponding to the points of my points array, and create another python component which is supposed to draw a cube everytime a point is supposed to be “True” in the boolean list.
I’m currently helpless because those two methods won’t work no matter what I try. i feel like there’s a problem in the data type from my outputs but I just don’t find any documentation online about this or maybe I’m just a big noob. I really don’t know.
Thank you in advance for your help.
Projet Grasshopper.gh (12.0 KB)