PyFoam.Applications.DisplayBlockMeshQt module

New implementation of DisplayBlockMesh using PyQT4

class PyFoam.Applications.DisplayBlockMeshQt.DisplayBlockMesh[source]

Bases: PyFoam.Applications.PyFoamApplicationQt4.PyFoamApplicationQt4, PyFoam.Applications.CommonTemplateFormat.CommonTemplateFormat

__init__()[source]
Parameters:
  • description – description of the command
  • usage – Usage
  • interspersed – Is the command line allowed to be interspersed (options after the arguments)
  • args – Command line arguments when using the Application as a ‘class’ from a script
  • nr – Number of required arguments
  • changeVersion – May this application change the version of OF used?
  • exactNr – Must not have more than the required number of arguments
__module__ = 'PyFoam.Applications.DisplayBlockMeshQt'
addOptions()[source]

Add options to the parser

setupGUI()[source]

Set up the graphical user interface

class PyFoam.Applications.DisplayBlockMeshQt.DisplayBlockMeshDialog(fName, valuesFile=None, opts=None)[source]

Bases: PyQt4.QtGui.QMainWindow

AddBlockToDict()[source]

Adds block to dict, using pyFoam functions

AddBlockToText()[source]

Inserts block into opened dict

AddPatchToText()[source]

Inserts patch into opened dict

PickEvent(obj, evt)[source]

Callback for picking event

__init__(fName, valuesFile=None, opts=None)[source]

x.__init__(…) initializes x; see help(type(x)) for signature

__module__ = 'PyFoam.Applications.DisplayBlockMeshQt'
addBlock(index)[source]
addInputToPolyData(appendPoly, data)[source]

Helper version needed because of changed API in VTK6

addLine(index1, index2)[source]
addPoint(coord, factor=1)[source]
addProps()[source]
addTmpBlockingLine(index1, index2)[source]

Add a colored line to show blocking progress

addUndefined(i)[source]
addVertex(index)[source]
axisLabelScaleChanged(scale)[source]
axisTubeScaleChanged(scale)[source]
blockMesh()[source]
blockMeshWasModified()[source]
checkMesh()[source]
closeEvent(self, QCloseEvent)[source]
colorBlock(value)[source]
colorPatch(value)[source]
defineBlock()[source]

callback for create block button

definePatch()[source]

Callback for create patch button

executeUtility(util)[source]
executionEnded()[source]
getDivString()[source]

block division string

getEndHexString()[source]

last part of hex string

getPatchString()[source]
getTotalHexString()[source]

total block hex string

getTotalPatchString()[source]

total patch string

insertBlock()[source]

inserts new block

insertPatch()[source]

inserts new patch

makeArc(data)[source]
makeDirection(index1, index2, label)[source]
makeFace(lst)[source]
makeSpline(lst)[source]
numberScaleChanged(scale)[source]
pickBlockVertice()[source]

pick a sphere and add point to block

pickPatchVertice()[source]

pick a sphere and add point to vertice

pickVertice()[source]

pick a vertice, returns Null if invalid

pointScaleChanged(scale)[source]
readFile(resetText=True)[source]
reread(resetText=True)[source]
resetBlocking()[source]

rest block

resetPatch()[source]

rest patch

reverseNormal()[source]
saveBlockMesh()[source]
setAxes()[source]
setStatus(message='Ready')[source]
setupBlockingGui()[source]

sets up the GUI to add the Blocking functions.

showTmpBlock()[source]

Add a colored block

showTmpPatch()[source]

Add a colored patch

startBlocking()[source]

start blocking

startPatch()[source]

start define patch

utilityOutputAppend(line)[source]
class PyFoam.Applications.DisplayBlockMeshQt.ReportToThreadRunner(argv, thread)[source]

Bases: PyFoam.Execution.BasicRunner.BasicRunner

__init__(argv, thread)[source]
Parameters:argv – list with the tokens that are the command line

if not set the standard command line is used :param silent: if True no output is sent to stdout :param logname: name of the logfile :param compressLog: Compress the logfile into a gzip :param lam: Information about a parallel run :param server: Whether or not to start the network-server :type lam: PyFoam.Execution.ParallelExecution.LAMMachine :param noLog: Don’t output a log file :param logTail: only the last lines of the log should be written :param remark: User defined remark about the job :param parameters: User defined dictionary with parameters for

documentation purposes
Parameters:
  • jobId – Job ID of the controlling system (Queueing system)
  • writeState – Write the state to some files in the case
  • echoCommandLine – Prefix that is printed with the command line. If unset nothing is printed
__module__ = 'PyFoam.Applications.DisplayBlockMeshQt'
lineHandle(line)[source]

called every time a new line is read

class PyFoam.Applications.DisplayBlockMeshQt.UtilityThread(argv, parent)[source]

Bases: PyQt4.QtCore.QThread

__init__(argv, parent)[source]

x.__init__(…) initializes x; see help(type(x)) for signature

__module__ = 'PyFoam.Applications.DisplayBlockMeshQt'
append(line)[source]
run(self)[source]
PyFoam.Applications.DisplayBlockMeshQt.doImports()[source]