Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
BrianEkins
in reply to: ieatacid

Creating a work plane requires a planar entity as input.  You see the same thing in the UI.  You can't create a work plane by only selecting a cylindrical face.

 

However, it is possible to find the faces that are on the ends of the hole.  If the hole is a through hole then there are two potential faces and you'll have to choose which one.  If it's a blind hole and the bottom is angled then it's fairly easy.  The cylindrical face you've found is represented by the Face object.  The Face object supports an Edges property which returns all of the edges of the face.  In the case of your hole example, there will be two edges returned.  The edges are represented by the Edge object and the Edge object supports a Face property which returns the faces that are connected to the edge.  This will return two faces, the cylindrical face you already have and the connecting face.  For a blind hole with an angled end, this will return a conical face but the face you're looking for will be a plane.  I'm not able to take the time to code up the sample but that's the workflow I would go through.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com