FreeCAD Python
Public Member Functions | List of all members
PathScripts.PathCircularHoleBase.ObjectOp Class Reference

Detailed Description

Base class for proxy objects of all operations on circular holes.

Public Member Functions

def opFeatures (self, obj)
 
def circularHoleFeatures (self, obj)
 
def initOperation (self, obj)
 
def initCircularHoleOperation (self, obj)
 
def baseIsArchPanel (self, obj, base)
 
def getArchPanelEdge (self, obj, base, sub)
 
def holeDiameter (self, obj, base, sub)
 
def holePosition (self, obj, base, sub)
 
def isHoleEnabled (self, obj, base, sub)
 
def opExecute (self, obj)
 
def circularHoleExecute (self, obj, holes)
 
def findHoles (self, obj, baseobject)
 
- Public Member Functions inherited from PathScripts.PathOp.ObjectOp
def setEditorModes (self, obj, features)
 
def __getstate__ (self)
 
def __setstate__ (self, state)
 
def opOnDocumentRestored (self, obj)
 
def opOnChanged (self, obj, prop)
 
def opSetDefaultValues (self, obj, job)
 
def opUpdateDepths (self, obj)
 
def opRejectAddBase (self, obj, base, sub)
 
def onChanged (self, obj, prop)
 
def applyExpression (self, obj, prop, expr)
 
def setDefaultValues (self, obj)
 
def getJob (self, obj)
 
def updateDepths (self, obj, ignoreErrors=False)
 
def execute (self, obj)
 

Member Function Documentation

◆ baseIsArchPanel()

def PathScripts.PathCircularHoleBase.ObjectOp.baseIsArchPanel (   self,
  obj,
  base 
)
baseIsArchPanel(obj, base) ... return true if op deals with an Arch.Panel.

◆ circularHoleExecute()

def PathScripts.PathCircularHoleBase.ObjectOp.circularHoleExecute (   self,
  obj,
  holes 
)
circularHoleExecute(obj, holes) ... implement processing of holes.
holes is a list of dictionaries with 'x', 'y' and 'r' specified for each hole.
Note that for Vertexes, non-circular Edges and Locations r=0.
Must be overwritten by subclasses.

Reimplemented in PathScripts.PathDrilling.ObjectDrilling, and PathScripts.PathHelix.ObjectHelix.

◆ circularHoleFeatures()

def PathScripts.PathCircularHoleBase.ObjectOp.circularHoleFeatures (   self,
  obj 
)
circularHoleFeatures(obj) ... overwrite to add operations specific features.
Can safely be overwritten by subclasses.

Reimplemented in PathScripts.PathDrilling.ObjectDrilling, and PathScripts.PathHelix.ObjectHelix.

◆ findHoles()

def PathScripts.PathCircularHoleBase.ObjectOp.findHoles (   self,
  obj,
  baseobject 
)
findHoles(obj, baseobject) ... inspect baseobject and identify all features that resemble a straight cricular hole.

◆ getArchPanelEdge()

def PathScripts.PathCircularHoleBase.ObjectOp.getArchPanelEdge (   self,
  obj,
  base,
  sub 
)
getArchPanelEdge(obj, base, sub) ... helper function to identify a specific edge of an Arch.Panel.
Edges are identified by 3 numbers:
    <holeId>.<wireId>.<edgeId>
Let's say the edge is specified as "3.2.7", then the 7th edge of the 2nd wire in the 3rd hole returned
by the panel sheet is the edge returned.
Obviously this is as fragile as can be, but currently the best we can do while the panel sheets
hide the actual features from Path and they can't be referenced directly.

◆ holeDiameter()

def PathScripts.PathCircularHoleBase.ObjectOp.holeDiameter (   self,
  obj,
  base,
  sub 
)
holeDiameter(obj, base, sub) ... returns the diameter of the specified hole.

◆ holePosition()

def PathScripts.PathCircularHoleBase.ObjectOp.holePosition (   self,
  obj,
  base,
  sub 
)
holePosition(obj, base, sub) ... returns a Vector for the position defined by the given features.
Note that the value for Z is set to 0.

◆ initCircularHoleOperation()

def PathScripts.PathCircularHoleBase.ObjectOp.initCircularHoleOperation (   self,
  obj 
)
initCircularHoleOperation(obj) ... overwrite if the subclass needs initialisation.
Can safely be overwritten by subclasses.

Reimplemented in PathScripts.PathDrilling.ObjectDrilling, and PathScripts.PathHelix.ObjectHelix.

◆ initOperation()

def PathScripts.PathCircularHoleBase.ObjectOp.initOperation (   self,
  obj 
)
initOperation(obj) ... adds Disabled properties and calls initCircularHoleOperation(obj).
Do not overwrite, implement initCircularHoleOperation(obj) instead.

Reimplemented from PathScripts.PathOp.ObjectOp.

◆ isHoleEnabled()

def PathScripts.PathCircularHoleBase.ObjectOp.isHoleEnabled (   self,
  obj,
  base,
  sub 
)
isHoleEnabled(obj, base, sub) ... return true if hole is enabled.

◆ opExecute()

def PathScripts.PathCircularHoleBase.ObjectOp.opExecute (   self,
  obj 
)
opExecute(obj) ... processes all Base features and Locations and collects
them in a list of positions and radii which is then passed to circularHoleExecute(obj, holes).
If no Base geometries and no Locations are present, the job's Base is inspected and all
drillable features are added to Base. In this case appropriate values for depths are also
calculated and assigned.
Do not overwrite, implement circularHoleExecute(obj, holes) instead.

Reimplemented from PathScripts.PathOp.ObjectOp.

◆ opFeatures()

def PathScripts.PathCircularHoleBase.ObjectOp.opFeatures (   self,
  obj 
)
opFeatures(obj) ... calls circularHoleFeatures(obj) and ORs in the standard features required for processing circular holes.
Do not overwrite, implement circularHoleFeatures(obj) instead

Reimplemented from PathScripts.PathOp.ObjectOp.