tpaviot/pythonocc-core

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

Opened this issue · 1 comments

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

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.