Below appear some commands used in scripts that do not appear in the message log box. The most commonly used commands can be found from the Python shell inside Continuity by doing: dir(self).
Miscellaneous
Command |
import Module |
Description |
self.auto_update_dimensions() |
auto updates dimensions within a script |
Mesh
Command |
import Module |
Description |
self.Send(None, log=0) |
Send Client data (e.g. mesh data, compilable model) to Server (e.g. FE solvers) |
|
nodes = self.stored_data.nodes.obj |
load Continuity-formatted nodes file located at cwd/nodes_file |
|
nodes.loadTableFromFile(cwd+nodes_file) |
||
self.stored_data.store(nodes) |
||
elems = self.stored_data.elem.obj |
load Continuity-formatted elements file located at cwd/elems_file |
|
elems.loadTableFromFile(cwd+elems_file) |
||
self.stored_data.store(elems) |
||
self.EScaleFactors(cwd + sfm_file, log=0) |
load Continuity-formatted scale factor matrix file located at cwd/sfm_file |
|
self.stored_data.nodes.obj.saveTable(cwd+file_nodes) |
save Continuity-formatted nodes file located at cwd/file_nodes |
|
self.stored_data.elem.obj.saveTable(cwd+file_elems) |
save Continuity-formatted elements file located at cwd/file_elems |
|
self.ExScaleFactors(cwd + file_sfm, log=0) |
save Continuity-formatted scale factor matrix file located at cwd/file_sfm |
Render
Command |
import Module |
Description |
self.om.rolist[#].contours = [min,max,step] |
sets the min, max, and step for use of contours with OpenMesh of index “#” in OpenMesh list |
|
self.om.rolist[#].setScheme(“RGB”) |
sets the color scheme to RGB (or other scheme) rather than the default BGR for index “#” in OpenMesh list |
|
self.om.rolist[#].setContoursVisibility(True) |
renders contours |
|
self.om.rolist[#].recalculateContours() |
appears to do the same as setContoursVisibility() |
|
self.om.rolist[#].setContoursLineWidth(3.0) |
sets contour line width, must be called before contour render |
|
self.Save_Animation_Frames(object, ‘filename’, ‘.ext’) |
Saves all animated frames. object = self.om.rolist[#] and must have ‘colors’ attribute, and ext can be one of: .bmp,.png,.gif,.jpeg,.tiff,.eps |
|
self.om.rolist[#].setColor([R,G,B]) |
Set the color of a rendered object (fibers, line, etc.) |
|
self.om.rolist[#].setSize(2.0) |
Set the size of an object (fibers, line, etc.) |
|
self.om.getFirstQuad().play = 0 |
Do not play animation for EP when rendering frames. This us useful when saving animation frames as they may otherwise save out of order |
|
self.om.renderer.viewer.currentCamera.Set(antialiased=value) |
Set the antialiasing value from a script (where value = 0, 2, 3, 4, 8, 15, 24, 66) |
|
self.om.renderer.viewer.currentCamera.ssao = True |
Turn on (True) or off (False) Screen Space Ambient Occlusion from a script |
Fitting
Command |
import Module |
Description |
EP
Command |
import Module |
Description |
self.CompileEPIonic() |
Compile Ionic Model |
|
self.CompileEPConductivity() |
Compile Conductivity Model |
|
self.CompileEP() |
Compile both Ionic and Conductivity model |
|
compileType |
compiled binary type – “C Double Precision” (default), “C Single Precision”, “CUDA Single Precision”, or “CUDA Double Precision”. (e.g. self.CompileEP(compileType = “CUDA Double Precision”) |
Biomechanics
Command |
import Module |
Description |
Example |
self.stored_data.basis.obj |
get current basis functions |
biomechanics06/animateNodes.py |
|
self.stored_data.nodes.obj |
from client.forms.NodeForm import NodeForm |
get current nodes |
biomechanics06/loadAndSnap.py |