I would like to detect holes in brep. May I know any component or method to extract this. I have attached a sample brep with rectangular cross section. Also cross section wont be box always it may be C shape, W shape so creating bounding box and extracting holes from is not good idea for this. Please help.
Here is another approach with a small python script. Should find cylindrical holes and their edges that pass through planar surfaces (circles or ellipses). Limitation, it will also pick up the outer surfaces of a cylindrical object (somewhat difficult for me at least to filter for those).
Sometimes it catches edges when cross is C shaped. So I tried filtering it out with closed curves but still it wont detect if hole is at edge when its bent.
Adam’s solution works only with box section but failed when it comes to dealing with freeform plates with hole in it. But you SIR!! your work is astounding!!!
If Adam work is Mjolnir , you Helvetosaur work Feels like Stormbreaker!! (Thor’s Hammer Reference from Avengers)
“tol” means tolerance. This is an optional input, if nothing is attached it defaults to the file tolerance. (I didn’t put a proper docstring in the script sorry).
Tolerance is necessary for example to detect “cylinder-like” surfaces that brep.IsCylinder fails to find otherwise, such as those that might have been made with the _Pipe command in Rhino.