Package Pmv :: Module splineCommands :: Class CustomSplineCommand
[hide private]
[frames] | no frames]

Class CustomSplineCommand

source code

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

This command computes and extrudes spline using the values given or from the widget.
    
Package : Pmv
    
Module  : splineCommands
    
Class   : CustomSplineCommand
    
Command : customSpline
    
Synopsis:
None<---customTrace(nodes, atmtype="CA", curSel=False, nbchords=4,interp='interpolation', continuity=2, closedSpline=False,sortAtms=True,  shape2D=None, capsFlag=False, display=True,**kw)
        
Required Arguments:

        nodes --- self.getSelection()
        
Optional Arguments:

        
atmtype --- specifies the atom type of the control points.
                      the atoms of the current selection of the given
                      atom type are used as the control points.
                      atmtype can be 'CA'(default value) 'CA,N' 'O' etc.... 
                      
        
curSel --- Boolean flag to use the atoms in current selection as control
                      points. (default=False)
        
nbchords --- number of point per control points in the smooth array
        
interp --- flag if set to 'interpolation' interpolate the control
                      points.
        
continuity  --- specifies the continuity of the curve.
        
closedSpline --- Boolean flag when set to True the spline will be closed (1st atom will be connected to the last atom. (default = False)
        
sortAtms --- Boolean flag to sort the ctlAtms or not. (default = True)
        
shape2D --- instance of a DejaVu.Shapes class (Triangle2DDup, Circle2D...)the default shape is a circle2D
        
capsFlag --- Boolean flag to add caps at the end of the spline (default=False)
        
display --- Boolean flag to call or not the displayExtrudedSpline command default value is True.
    



Instance Methods [hide private]
  __init__(self)
  onAddCmdToViewer(self)
method called when an instance of this command is added to the viewer.
  buildFormDescr(self, formName)
descr <- buildFormDescr(self, formName): this virtual method is implemented in the classes derived from Command.
  cursel_cb(self, event=None)
if the use curSel checkbutton is on: the entryField should be disabled.
  guiCallback(self)
  __call__(self, nodes, atmtype="CA", curSel=False, nbchords=4, interp='interpolation', continuity=2, closedSpline=False, sortAtms=True, shape2D=None, capsFlag=False, display=True, **kw)
None<---customTrace(nodes, atmtype="CA", curSel=False, nbchords=4,interp='interpolation', continuity=2, closedSpline=False,sortAtms=True, shape2D=None, capsFlag=False, display=True,**kw) Required Arguments: nodes --- self.getSelection() Optional Arguments: atmtype --- specifies the atom type of the control points.
  doit(self, nodes, **kw)
virtual method.

Inherited from mvCommand.MVCommand: strArg

Inherited from mvCommand.MVCommand (private): _strArg

Inherited from ViewerFramework.VFCommand.Command: __repr__, addCallbackAfter, addCallbackBefore, addUndoCall, afterDoit, beforeDoit, buildLogArgList, checkDependencies, cleanup, customizeGUI, doitWrapper, getArguments, getHelp, getLastUsedValues, getLogArgs, getValNamedArgs, log, logString, 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__

onAddCmdToViewer(self)

source code 
method called when an instance of this command is added to the viewer. This enable viewer-addition time initializations
Overrides: ViewerFramework.VFCommand.Command.onAddCmdToViewer
(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)

cursel_cb(self, event=None)

source code 
if the use curSel checkbutton is on: the entryField should be disabled.

guiCallback(self)

source code 
None
Overrides: mvCommand.MVCommand.guiCallback

__call__(self, nodes, atmtype="CA", curSel=False, nbchords=4, interp='interpolation', continuity=2, closedSpline=False, sortAtms=True, shape2D=None, capsFlag=False, display=True, **kw)
(Call operator)

source code 
None<---customTrace(nodes, atmtype="CA", curSel=False, nbchords=4,interp='interpolation', continuity=2, closedSpline=False,sortAtms=True,  shape2D=None, capsFlag=False, display=True,**kw)
        
Required Arguments:

        nodes --- self.getSelection()
        
Optional Arguments:

        
atmtype --- specifies the atom type of the control points.
                      the atoms of the current selection of the given
                      atom type are used as the control points.
                      atmtype can be 'CA'(default value) 'CA,N' 'O' etc.... 
                      
        
curSel --- Boolean flag to use the atoms in current selection as control
                      points. (default=False)
        
nbchords --- number of point per control points in the smooth array
        
interp --- flag if set to 'interpolation' interpolate the control
                      points.
        
continuity  --- specifies the continuity of the curve.
        
closedSpline --- Boolean flag when set to True the spline will be closed (1st atom will be connected to the last atom. (default = False)
        
sortAtms --- Boolean flag to sort the ctlAtms or not. (default = True)
        
shape2D --- instance of a DejaVu.Shapes class (Triangle2DDup, Circle2D...)the default shape is a circle2D
        
capsFlag --- Boolean flag to add caps at the end of the spline (default=False)
        
display --- Boolean flag to call or not the displayExtrudedSpline command default value is True.
        

Overrides: ViewerFramework.VFCommand.Command.__call__

doit(self, nodes, **kw)

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