Karana.KUtils.MultibodyTUI.loopdb
=================================

.. py:module:: Karana.KUtils.MultibodyTUI.loopdb

.. autoapi-nested-parse::

   Contains the LoopConstraintDatabase class, which is used to query body/loop constraint relationships.



Classes
-------

.. autoapisummary::

   Karana.KUtils.MultibodyTUI.loopdb.LoopConstraintDatabase


Module Contents
---------------

.. py:class:: LoopConstraintDatabase(multibody: Karana.Dynamics.Multibody)

   Helper to query body / loop constraint relationships.


   .. py:attribute:: multibody


   .. py:method:: allLoopConstraints() -> collections.abc.Generator[Karana.Dynamics.LoopConstraintBase]

      Retrieve all the loop constraints.

      :returns: All the loop constraints as a generator.
      :rtype: Generator[LoopConstraintBase]



   .. py:method:: emanatingLoopConstraints(body: Karana.Dynamics.PhysicalBody) -> list[Karana.Dynamics.LoopConstraintBase]

      Get all loop constraints directly attached to the body.

      :param body: The given body
      :type body: PhysicalBody

      :returns: The list of loop constraints
      :rtype: list[LoopConstraintBase]



   .. py:method:: relatedLoopConstraints(body: Karana.Dynamics.PhysicalBody) -> list[Karana.Dynamics.LoopConstraintBase]

      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.

      :param body: The given body
      :type body: PhysicalBody

      :returns: The list of loop constraints
      :rtype: list[LoopConstraintBase]



   .. py:method:: relatedBodies(loop_constraint: Karana.Dynamics.LoopConstraintBase) -> list[Karana.Dynamics.PhysicalBody]

      Get all bodies along the loop constraint's path.

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

      :param loop_constraint: The given loop constraint
      :type loop_constraint: LoopConstraintBase

      :returns: The list of bodies
      :rtype: list[PhysicalBody]



