PathScripts.drillableLib Namespace Reference

Functions

def checkForBlindHole (baseshape, selectedFace)
 
def compareVecs (vec1, vec2, exact=False)
 
def getDrillableTargets (obj, ToolDiameter=None, vector=App.Vector(0, 0, 1))
 
def isDrillable (obj, candidate, tooldiameter=None, vector=App.Vector(0, 0, 1))
 
def isDrillableCylinder (obj, candidate, tooldiameter=None, vector=App.Vector(0, 0, 1))
 
def isDrillableEdge (obj, candidate, tooldiameter=None, vector=App.Vector(0, 0, 1))
 
def isDrillableFace (obj, candidate, tooldiameter=None, vector=App.Vector(0, 0, 1))
 

Function Documentation

◆ checkForBlindHole()

def PathScripts.drillableLib.checkForBlindHole (   baseshape,
  selectedFace 
)
check for blind holes, returns the bottom face if found, none
if the hole is a thru-hole

Referenced by PathScripts.drillableLib.isDrillableCylinder().

◆ compareVecs()

def PathScripts.drillableLib.compareVecs (   vec1,
  vec2,
  exact = False 
)
compare the two vectors to see if they are aligned for drilling.
if exact is True, vectors must match direction. Otherwise,
alignment can indicate the vectors are the same or exactly opposite

Referenced by PathScripts.drillableLib.isDrillableCylinder(), PathScripts.drillableLib.isDrillableEdge(), and PathScripts.drillableLib.isDrillableFace().

◆ getDrillableTargets()

def PathScripts.drillableLib.getDrillableTargets (   obj,
  ToolDiameter = None,
  vector = App.Vector(0, 0, 1) 
)
Returns a list of tuples for drillable subelements from the given object
[(obj,'Face1'),(obj,'Face3')]

Finds cylindrical faces that are larger than the tool diameter (if provided) and
oriented with the vector.  If vector is None, all drillables are returned

References PathScripts.drillableLib.isDrillable().

◆ isDrillable()

def PathScripts.drillableLib.isDrillable (   obj,
  candidate,
  tooldiameter = None,
  vector = App.Vector(0, 0, 1) 
)
Checks candidates to see if they can be drilled at the given vector.
Candidates can be either faces - circular or cylindrical or circular edges.
The tooldiameter can be optionally passed.  if passed, the check will return
False for any holes smaller than the tooldiameter.

vector defaults to (0,0,1) which aligns with the Z axis.  By default will return False
for any candidate not drillable in this orientation.  Pass 'None' to vector to test whether
the hole is drillable at any orientation.

obj=Shape
candidate = Face or Edge
tooldiameter=float
vector=App.Vector or None

References PathScripts.drillableLib.isDrillable(), PathScripts.drillableLib.isDrillableCylinder(), PathScripts.drillableLib.isDrillableEdge(), and PathScripts.drillableLib.isDrillableFace().

Referenced by PathScripts.drillableLib.getDrillableTargets(), and PathScripts.drillableLib.isDrillable().

◆ isDrillableCylinder()

def PathScripts.drillableLib.isDrillableCylinder (   obj,
  candidate,
  tooldiameter = None,
  vector = App.Vector(0, 0, 1) 
)
checks if a candidate cylindrical face is drillable

References PathScripts.drillableLib.checkForBlindHole(), and PathScripts.drillableLib.compareVecs().

Referenced by PathScripts.drillableLib.isDrillable().

◆ isDrillableEdge()

def PathScripts.drillableLib.isDrillableEdge (   obj,
  candidate,
  tooldiameter = None,
  vector = App.Vector(0, 0, 1) 
)
checks if an edge is drillable

References PathScripts.drillableLib.compareVecs().

Referenced by PathScripts.drillableLib.isDrillable().

◆ isDrillableFace()

def PathScripts.drillableLib.isDrillableFace (   obj,
  candidate,
  tooldiameter = None,
  vector = App.Vector(0, 0, 1) 
)
checks if a flat face or edge is drillable

References PathScripts.drillableLib.compareVecs().

Referenced by PathScripts.drillableLib.isDrillable().