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

Detailed Description

Base class for all Path.Area based operations.
Provides standard features including debugging properties AreaParams,
PathParams and removalshape, all hidden.
The main reason for existence is to implement the standard interface
to Path.Area so subclasses only have to provide the shapes for the
operations.

Public Member Functions

def opFeatures (self, obj)
 
def areaOpFeatures (self, obj)
 
def initOperation (self, obj)
 
def initAreaOp (self, obj)
 
def areaOpShapeForDepths (self, obj)
 
def areaOpOnChanged (self, obj, prop)
 
def opOnChanged (self, obj, prop)
 
def areaOpOnDocumentRestored (self, obj)
 
def opSetDefaultValues (self, obj, job)
 
def areaOpSetDefaultValues (self, obj, job)
 
def opExecute (self, obj, getsim=False)
 
def areaOpRetractTool (self, obj)
 
def areaOpAreaParams (self, obj, isHole)
 
def areaOpPathParams (self, obj, isHole)
 
def areaOpShapes (self, obj)
 
def areaOpUseProjection (self, obj)
 
def opDetermineRotationRadii (self, obj)
 
def pocketRotationAnalysis (self, obj, objRef, sub, prnt)
 
- Public Member Functions inherited from PathScripts.PathOp.ObjectOp
def setEditorModes (self, obj, features)
 
def __getstate__ (self)
 
def __setstate__ (self, state)
 
def opUpdateDepths (self, obj)
 
def opExecute (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

◆ areaOpAreaParams()

def PathScripts.PathAreaOp.ObjectOp.areaOpAreaParams (   self,
  obj,
  isHole 
)
areaOpAreaParams(obj, isHole) ... return operation specific area parameters in a dictionary.
Note that the resulting parameters are stored in the property AreaParams.
Must be overwritten by subclasses.

Reimplemented in PathScripts.PathPocketBase.ObjectPocket, and PathScripts.PathProfileBase.ObjectProfile.

◆ areaOpFeatures()

def PathScripts.PathAreaOp.ObjectOp.areaOpFeatures (   self,
  obj 
)
areaOpFeatures(obj) ... overwrite to add operation specific features.
Can safely be overwritten by subclasses.

Reimplemented in PathScripts.PathProfileContour.ObjectContour, PathScripts.PathProfileEdges.ObjectProfile, PathScripts.PathProfileFaces.ObjectProfile, and PathScripts.PathPocketBase.ObjectPocket.

◆ areaOpOnChanged()

def PathScripts.PathAreaOp.ObjectOp.areaOpOnChanged (   self,
  obj,
  prop 
)
areaOpOnChanged(obj, porp) ... overwrite to process operation specific changes to properties.
Can safely be overwritten by subclasses.

Reimplemented in PathScripts.PathProfileBase.ObjectProfile, and PathScripts.PathMillFace.ObjectFace.

◆ areaOpOnDocumentRestored()

def PathScripts.PathAreaOp.ObjectOp.areaOpOnDocumentRestored (   self,
  obj 
)
areaOpOnDocumentRestored(obj) ... overwrite to fully restore receiver

◆ areaOpPathParams()

def PathScripts.PathAreaOp.ObjectOp.areaOpPathParams (   self,
  obj,
  isHole 
)
areaOpPathParams(obj, isHole) ... return operation specific path parameters in a dictionary.
Note that the resulting parameters are stored in the property PathParams.
Must be overwritten by subclasses.

Reimplemented in PathScripts.PathPocketBase.ObjectPocket, and PathScripts.PathProfileBase.ObjectProfile.

◆ areaOpRetractTool()

def PathScripts.PathAreaOp.ObjectOp.areaOpRetractTool (   self,
  obj 
)
areaOpRetractTool(obj) ... return False to keep the tool at current level between shapes. Default is True.

◆ areaOpSetDefaultValues()

def PathScripts.PathAreaOp.ObjectOp.areaOpSetDefaultValues (   self,
  obj,
  job 
)
areaOpSetDefaultValues(obj, job) ... overwrite to set initial values of operation specific properties.
Can safely be overwritten by subclasses.

Reimplemented in PathScripts.PathPocketShape.ObjectPocket, PathScripts.PathProfileFaces.ObjectProfile, PathScripts.PathProfileBase.ObjectProfile, PathScripts.PathMillFace.ObjectFace, PathScripts.PathPocket.ObjectPocket, and PathScripts.PathProfileContour.ObjectContour.

◆ areaOpShapeForDepths()

def PathScripts.PathAreaOp.ObjectOp.areaOpShapeForDepths (   self,
  obj 
)
areaOpShapeForDepths(obj) ... returns the shape used to make an initial calculation for the depths being used.
The default implementation returns the job's Base.Shape

◆ areaOpShapes()

def PathScripts.PathAreaOp.ObjectOp.areaOpShapes (   self,
  obj 
)

◆ areaOpUseProjection()

def PathScripts.PathAreaOp.ObjectOp.areaOpUseProjection (   self,
  obj 
)
areaOpUseProcjection(obj) ... return True if the operation can use procjection, defaults to False.
Can safely be overwritten by subclasses.

Reimplemented in PathScripts.PathProfileBase.ObjectProfile, and PathScripts.PathPocketBase.ObjectPocket.

◆ initAreaOp()

def PathScripts.PathAreaOp.ObjectOp.initAreaOp (   self,
  obj 
)
initAreaOp(obj) ... overwrite if the receiver class needs initialisation.
Can safely be overwritten by subclasses.

Reimplemented in PathScripts.PathProfileContour.ObjectContour, PathScripts.PathProfileFaces.ObjectProfile, PathScripts.PathPocketBase.ObjectPocket, and PathScripts.PathProfileBase.ObjectProfile.

◆ initOperation()

def PathScripts.PathAreaOp.ObjectOp.initOperation (   self,
  obj 
)
initOperation(obj) ... sets up standard Path.Area properties and calls initAreaOp().
Do not overwrite, overwrite initAreaOp(obj) instead.

Reimplemented from PathScripts.PathOp.ObjectOp.

◆ opDetermineRotationRadii()

def PathScripts.PathAreaOp.ObjectOp.opDetermineRotationRadii (   self,
  obj 
)
opDetermineRotationRadii(self, obj)
    Determine rotational radii for 4th-axis rotations, for clearance/safe heights 

◆ opExecute()

def PathScripts.PathAreaOp.ObjectOp.opExecute (   self,
  obj,
  getsim = False 
)
opExecute(obj, getsim=False) ... implementation of Path.Area ops.
determines the parameters for _buildPathArea().
Do not overwrite, implement
    areaOpAreaParams(obj, isHole) ... op specific area param dictionary
    areaOpPathParams(obj, isHole) ... op specific path param dictionary
    areaOpShapes(obj)             ... the shape for path area to process
    areaOpUseProjection(obj)      ... return true if operation can use projection
instead.

◆ opFeatures()

def PathScripts.PathAreaOp.ObjectOp.opFeatures (   self,
  obj 
)
opFeatures(obj) ... returns the base features supported by all Path.Area based operations.
The standard feature list is OR'ed with the return value of areaOpFeatures().
Do not overwrite, implement areaOpFeatures(obj) instead.

Reimplemented from PathScripts.PathOp.ObjectOp.

◆ opOnChanged()

def PathScripts.PathAreaOp.ObjectOp.opOnChanged (   self,
  obj,
  prop 
)
opOnChanged(obj, prop) ... base implementation of the notification framework - do not overwrite.
The base implementation takes a stab at determining Heights and Depths if the operations's Base
changes.
Do not overwrite, overwrite areaOpOnChanged(obj, prop) instead.

Reimplemented from PathScripts.PathOp.ObjectOp.

◆ opSetDefaultValues()

def PathScripts.PathAreaOp.ObjectOp.opSetDefaultValues (   self,
  obj,
  job 
)
opSetDefaultValues(obj) ... base implementation, do not overwrite.
The base implementation sets the depths and heights based on the
areaOpShapeForDepths() return value.
Do not overwrite, overwrite areaOpSetDefaultValues(obj, job) instead.

Reimplemented from PathScripts.PathOp.ObjectOp.

◆ pocketRotationAnalysis()

def PathScripts.PathAreaOp.ObjectOp.pocketRotationAnalysis (   self,
  obj,
  objRef,
  sub,
  prnt 
)
pocketRotationAnalysis(self, obj, objRef, sub, prnt)
    Determine X and Y independent rotation necessary to make normalAt = Z=1 (0,0,1)