pythonocc-core icon indicating copy to clipboard operation
pythonocc-core copied to clipboard

How to Use PythonOCC-Core to Identify Screw Holes, Through Holes, and Blind Holes

Open Joysaaa1112 opened this issue 10 months ago • 1 comments

How to Use PythonOCC-Core to Identify Screw Holes, Through Holes, and Blind Holes

Joysaaa1112 avatar Feb 24 '25 09:02 Joysaaa1112

pythonocc-core does not have an out-of-the-box hole recognition function. For simple circular through-hole and blind-hole recognition, you can try using the boundary-based recognition method:

  1. Extract the surface with inner boundary (base surface) and determine whether there is only one edge on the boundary and it is a concave edge
  2. Get the adjacent surface of the concave edge and check whether it is a cylindrical surface
  3. For the distinction between through holes and blind holes, if the adjacent surface of the cylindrical surface is a base surface and the adjacent edge is a convex edge, it is a through hole; if the outer boundary of the adjacent surface of the cylindrical surface is a concave boundary, it is a blind hole. This method has great limitations and cannot accurately identify more complex holes. If you need more precise identification, you can learn about the feature recognition method based on attribute adjacency graph.

KaboChow avatar Mar 17 '25 09:03 KaboChow