mor.utility.writeScene.writeGraphScene

writeGraphScene(packageName, nodeName, myMORModel, myModel)[source]

Write a SOFA scene from lists

With 2 lists describing the 2 Sofa.Node containing the components for our reduced model, this function will write each component with their initial parameters and clean or add parameters in order to have in the end a reduced model component reusable as a function with arguments as :

def MyReducedModel(
                  attachedTo=None,
                  name="MyReducedModel",
                  rotation=[0.0, 0.0, 0.0],
                  translation=[0.0, 0.0, 0.0],
                  scale=[1.0, 1.0, 1.0],
                  surfaceMeshFileName=False,
                  surfaceColor=[1.0, 1.0, 1.0],
                  nbrOfModes=nbrOfModes,
                  hyperReduction=True):

Args:

argument

type

definition

packageName

str

Name of the file were we will write (without any extension)

nodeName

str

Name of the Sofa.Node we reduce

myMORModel

list

list of tuple (solver_type , param_solver) more details see myMORModel

myModel

OrderedDict

Ordered dic containing has key Sofa.Node.name &
has var a tuple of (Sofa_componant_type , param)
more details see myModel