Package Pmv :: Module SLCommands :: Class SLCommand
[hide private]
[frames] | no frames]

Class SLCommand

source code

ViewerFramework.VFCommand.Command --+    
                                    |    
                  mvCommand.MVCommand --+
                                        |
                                       SLCommand

Command that performs Bsp tree operations such as 'union', 'difference', 'intersect'.

Instance Methods [hide private]
  __init__(self)
  checkDependencies(self)
virtual method.
  buildFormDescr(self, formName)
descr <- buildFormDescr(self, formName): this virtual method is implemented in the classes derived from Command.
  sort_entries(self, name_dict)
  guiCallback(self)
  updateObjectDict(self)
Updates a list of objects on which set operations canbe performed.
  operate_cb(self)
  __call__(self, name1, name2, operation, newobj_name='', bindToMol=0, **kw)
None <- SL(name1, name2, operation, newobj_name = '', bindToMol=0) name1, name2 - names of two objects (full names, eg: 1crn|msms); operation - can be one of the following: 'union', 'join', 'intersect', 'difference'; newobj_name - name of new object(optional); bindToMol - 1 for binding new object to molecule, 0 if no binding is needed.
  doit(self, name1, name2, opname, res_name, bindToMol)
virtual method.
  doSetOperation(self, name1, name2, opname, res_name, bindToMol)
Performs Bspt set operations.
  timeBspt(self, expon=1.0)
  rm_neg_inds(self, arr)
From every face of the given face array removes entries that == -1
  triangulate_strips(self, faces)
Triangulate surfaces built with triangle strips.
  dismiss_cb(self)
Withdraws the GUI.

Inherited from mvCommand.MVCommand: strArg

Inherited from mvCommand.MVCommand (private): _strArg

Inherited from ViewerFramework.VFCommand.Command: __repr__, addCallbackAfter, addCallbackBefore, addUndoCall, afterDoit, beforeDoit, buildLogArgList, cleanup, customizeGUI, doitWrapper, getArguments, getHelp, getLastUsedValues, getLogArgs, getValNamedArgs, log, logString, onAddCmdToViewer, onAddNewCmd, onCmdRun, setLastUsedValues, setupUndoAfter, setupUndoBefore, showForm, tkCb, updateGeom, warningMsg


Class Variables [hide private]

Inherited from ViewerFramework.VFCommand.Command: negateKw, objArgOnly


Method Details [hide private]

__init__(self)
(Constructor)

source code 
None
Overrides: mvCommand.MVCommand.__init__

checkDependencies(self)

source code 
virtual method. Has to be implemented by the sub classes. Method called when command is loaded, if all the dependencies are not found the command won't be loaded.
Overrides: ViewerFramework.VFCommand.Command.checkDependencies
(inherited documentation)

buildFormDescr(self, formName)

source code 
descr <- buildFormDescr(self, formName): this virtual method is implemented in the classes derived from Command. This is where the inputFormDescr is created and the description of the widgets appended. If a command has several inputForm buildFormDescr should build all the inputFormDescr and you do a if / elif check to know which one to create. formName : string name of the form corresponding to this descr.
Overrides: ViewerFramework.VFCommand.Command.buildFormDescr
(inherited documentation)

sort_entries(self, name_dict)

source code 
None

guiCallback(self)

source code 
None
Overrides: mvCommand.MVCommand.guiCallback

updateObjectDict(self)

source code 
Updates a list of objects on which set operations canbe performed. Called with every callback of the command.

operate_cb(self)

source code 
None

__call__(self, name1, name2, operation, newobj_name='', bindToMol=0, **kw)
(Call operator)

source code 
None <- SL(name1, name2, operation, newobj_name = '', bindToMol=0)
name1, name2 - names of two objects (full names, eg: 1crn|msms);
operation - can be one of the following:
'union', 'join', 'intersect', 'difference';
newobj_name - name of new object(optional);
bindToMol - 1 for binding new object to molecule,
            0 if no binding is needed.

Overrides: ViewerFramework.VFCommand.Command.__call__

doit(self, name1, name2, opname, res_name, bindToMol)

source code 
virtual method. Has to be implemented by the sub classes
Overrides: ViewerFramework.VFCommand.Command.doit
(inherited documentation)

doSetOperation(self, name1, name2, opname, res_name, bindToMol)

source code 
Performs Bspt set operations.

timeBspt(self, expon=1.0)

source code 
None

rm_neg_inds(self, arr)

source code 
From every face of the given face array removes entries that == -1

triangulate_strips(self, faces)

source code 
Triangulate surfaces built with triangle strips.

dismiss_cb(self)

source code 
Withdraws the GUI.