mpacts.commands.geometry. transformcontrolpoints

In order to be able to use this module import it like this:

import mpacts.commands.geometry.transformcontrolpoints
#or assign it to a shorter name
import mpacts.commands.geometry.transformcontrolpoints as tra

RotateNormalsCommand

class mpacts.commands.geometry.transformcontrolpoints.RotateNormalsCommand

Bases: mpacts.core.command.Command, mpacts.core.baseobject.BaseObject

Command for rotating the normals in an array manager from the body frame to the inertial frame using the parent quaternion ‘q’. It is expected that an array ‘normal_BF’ as wel as an array ‘normal’ are present. The user is trusted to ensure that the array ‘normal_BF’ is correct at this point.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • normal_BF (default value = None) — Vector with body frame normals from which the rotated normals will be computed. If not given, array ‘normal_BF’ is searched.
    • normal (default value = None) — Vector with normal directions to which rotated normals will be stored. If not given, array ‘normal’ is searched.
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, [gate, predicate, normal, normal_BF]
RotateNormalsCommand(name, parent, **kwargs)

TransformControlPointsCommand

class mpacts.commands.geometry.transformcontrolpoints.TransformControlPointsCommand

Bases: mpacts.core.command.Command, mpacts.core.baseobject.BaseObject

Transforms the controlpoints ‘xBF’ from body coordinates to inertial frame coordinates of a manager using the orientation ‘q’ and position ‘x’ of its parent. It will put these transformed coordinates in x, and generate this array if necessary.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • xBF (default value = None) — Array of positions in body frame (Default: ‘xBF’)
    • x (default value = None) — Array of positions in inertial frame (Default: ‘x’)
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, [gate, predicate, x, xBF]
TransformControlPointsCommand(name, parent, **kwargs)

TransformRigidBodyCommand

class mpacts.commands.geometry.transformcontrolpoints.TransformRigidBodyCommand

Bases: mpacts.core.command.Command, mpacts.core.baseobject.BaseObject

Transforms the body frame orientation and translation of the rigid body based on the position and orientation of its parent into a inertial frame coordinates. Also computes rigid body velocity/ angular velocity. This allows complex motions by creating several levels of particle containers which will inherit the parents motion.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
object __init__(tuple args, dict kwds) :
args: name, parent kwds: pc, [gate, predicate]
TransformRigidBodyCommand(name, parent, **kwargs)