Get information about features, e.g. depth and diameter of holes via C++

sala

Looking around for some CAD
Hey, I am trying to use Analysis Situs for extracting feature information from step files. I am for example interested in the number of holes, their diameters and depths. I have seen the following on the Analysis Situs website:
features.png
How do I extract the diameter and the depth of the holes via c++? Currently I am reading step files with the OCCT libary. I am also able to use Analysis Situs methods like GetCavities() of asiAlgo_RecognizeCavities of the libasiAlgo library. Thank you.
 

Quaoar

Administrator
Staff member
Analysis Situs returns face IDs for all holes and cavities unsorted. For extracting detailed properties, including depth, countersinks, counterbores, modeled threads, you would need to perform more analysis on top of what's returned. We do this in our commercial SDK that is not open-sourced (otherwise development of Analysis Situs would have been impossible).

If you are going to implement this logic by your own, that's actually not that difficult. You would need to search for coaxial cylinders and then by projecting their vertices on the extracted axes, you'll get the hole depths.
 
Top