Karana.KUtils.MultibodyTUI.loopdb#

Classes#

LoopConstraintDatabase

Helper to query body / loop constraint relationships

Module Contents#

class Karana.KUtils.MultibodyTUI.loopdb.LoopConstraintDatabase(multibody: Karana.Dynamics.Multibody)[source]#

Helper to query body / loop constraint relationships

multibody#
allLoopConstraints() collections.abc.Generator[Karana.Dynamics.LoopConstraintBase][source]#
emanatingLoopConstraints(body: Karana.Dynamics.PhysicalBody) list[Karana.Dynamics.LoopConstraintBase][source]#

Get all loop constraints directly attached to the body

Parameters:

body (PhysicalBody) – The given body

Returns:

The list of loop constraints

Return type:

list[LoopConstraintBase]

relatedLoopConstraints(body: Karana.Dynamics.PhysicalBody) list[Karana.Dynamics.LoopConstraintBase][source]#

Get all loop constraints having the body in their path

A loop constraint is included if the path through the body tree from their source to target node includes the given body.

Parameters:

body (PhysicalBody) – The given body

Returns:

The list of loop constraints

Return type:

list[LoopConstraintBase]

relatedBodies(loop_constraint: Karana.Dynamics.LoopConstraintBase) list[Karana.Dynamics.PhysicalBody][source]#

Get all bodies allong the loop constraint’s path

Lists the bodies along the path from the source to target node through the body tree.

Parameters:

loop_constraint (LoopConstraintBase) – The given loop constraint

Returns:

The list of bodies

Return type:

list[PhysicalBody]