Ë
    7^(h  ã            
       ó¦   — d dl mZ d dlmZ d dlmZ d dlmZmZm	Z	 g d¢Z
 G d„ de eddd	g«      «      Z G d
„ de«      Z G d„ de«      Zd„ Zd„ Zy)é    )ÚABC)Ú
namedtuple)ÚBodyBase)ÚVectorÚReferenceFrameÚPoint)ÚLoadBaseÚForceÚTorquec                   ó$   — e Zd ZdZd„ Zd„ ZeZeZy)r	   z2Abstract base class for the various loading types.c                 óv   — t        d| j                  j                  › d|j                  j                  › d�«      ‚)Nz$unsupported operand type(s) for +: 'ú' and 'ú'©Ú	TypeErrorÚ	__class__Ú__name__©ÚselfÚothers     ú[/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/sympy/physics/mechanics/loads.pyÚ__add__zLoadBase.__add__   ó@   € Üð Ø ŸN™N×3Ñ3Ð4ð 5Ø!ŸO™O×4Ñ4Ð5°Qð8ó 9ð 	9ó    c                 óv   — t        d| j                  j                  › d|j                  j                  › d�«      ‚)Nz$unsupported operand type(s) for *: 'r   r   r   r   s     r   Ú__mul__zLoadBase.__mul__   r   r   N)r   Ú
__module__Ú__qualname__Ú__doc__r   r   Ú__radd__Ú__rmul__© r   r   r	   r	   	   s   „ Ù<ò9ò
9ð
 €HØ�Hr   r	   ÚlocationÚvectorc                   óH   ‡ — e Zd ZdZˆ fd„Zd„ Zed„ «       Zed„ «       Zˆ xZ	S )r
   a+  Force acting upon a point.

    Explanation
    ===========

    A force is a vector that is bound to a line of action. This class stores
    both a point, which lies on the line of action, and the vector. A tuple can
    also be used, with the location as the first entry and the vector as second
    entry.

    Examples
    ========

    A force of magnitude 2 along N.x acting on a point Po can be created as
    follows:

    >>> from sympy.physics.mechanics import Point, ReferenceFrame, Force
    >>> N = ReferenceFrame('N')
    >>> Po = Point('Po')
    >>> Force(Po, 2 * N.x)
    (Po, 2*N.x)

    If a body is supplied, then the center of mass of that body is used.

    >>> from sympy.physics.mechanics import Particle
    >>> P = Particle('P', point=Po)
    >>> Force(P, 2 * N.x)
    (Po, 2*N.x)

    c                 óÊ   •— t        |t        «      r|j                  }t        |t        «      st	        d«      ‚t        |t
        «      st	        d«      ‚t        ‰| �  | ||«      S )Nz!Force location should be a Point.z Force vector should be a Vector.)Ú
isinstancer   Ú
masscenterr   r   r   ÚsuperÚ__new__)ÚclsÚpointÚforcer   s      €r   r*   zForce.__new__:   sW   ø€ Ü�eœXÔ&Ø×$Ñ$ˆEÜ˜%¤Ô'ÜÐ?Ó@Ð@Ü˜%¤Ô(ÜÐ>Ó?Ð?Ü‰w‰˜s E¨5Ó1Ð1r   c                 óh   — | j                   j                  › d| j                  › d| j                  › d�S )Nz(point=z, force=ú))r   r   r,   r-   ©r   s    r   Ú__repr__zForce.__repr__C   s6   € Ø—>‘>×*Ñ*Ð+¨7°4·:±:°,ð ?ØŸ™˜ Að'ð 	(r   c                 ó   — | j                   S ©N©r#   r0   s    r   r,   zForce.pointG   ó   € à�}‰}Ðr   c                 ó   — | j                   S r3   ©r$   r0   s    r   r-   zForce.forceK   ó   € à�{‰{Ðr   )
r   r   r   r   r*   r1   Úpropertyr,   r-   Ú__classcell__©r   s   @r   r
   r
      s:   ø„ ñô>2ò(ð ñó ðð ñó ôr   r
   c                   óH   ‡ — e Zd ZdZˆ fd„Zd„ Zed„ «       Zed„ «       Zˆ xZ	S )r   a  Torque acting upon a frame.

    Explanation
    ===========

    A torque is a free vector that is acting on a reference frame, which is
    associated with a rigid body. This class stores both the frame and the
    vector. A tuple can also be used, with the location as the first item and
    the vector as second item.

    Examples
    ========

    A torque of magnitude 2 about N.x acting on a frame N can be created as
    follows:

    >>> from sympy.physics.mechanics import ReferenceFrame, Torque
    >>> N = ReferenceFrame('N')
    >>> Torque(N, 2 * N.x)
    (N, 2*N.x)

    If a body is supplied, then the frame fixed to that body is used.

    >>> from sympy.physics.mechanics import RigidBody
    >>> rb = RigidBody('rb', frame=N)
    >>> Torque(rb, 2 * N.x)
    (N, 2*N.x)

    c                 óÊ   •— t        |t        «      r|j                  }t        |t        «      st	        d«      ‚t        |t
        «      st	        d«      ‚t        ‰| �  | ||«      S )Nz+Torque location should be a ReferenceFrame.z!Torque vector should be a Vector.)r'   r   Úframer   r   r   r)   r*   )r+   r>   Útorquer   s      €r   r*   zTorque.__new__o   sU   ø€ Ü�eœXÔ&Ø—K‘KˆEÜ˜%¤Ô0ÜÐIÓJÐJÜ˜&¤&Ô)ÜÐ?Ó@Ð@Ü‰w‰˜s E¨6Ó2Ð2r   c                 óh   — | j                   j                  › d| j                  › d| j                  › d�S )Nz(frame=z	, torque=r/   )r   r   r>   r?   r0   s    r   r1   zTorque.__repr__x   s6   € Ø—>‘>×*Ñ*Ð+¨7°4·:±:°,ð ?ØŸ+™+˜ að)ð 	*r   c                 ó   — | j                   S r3   r4   r0   s    r   r>   zTorque.frame|   r5   r   c                 ó   — | j                   S r3   r7   r0   s    r   r?   zTorque.torque€   r8   r   )
r   r   r   r   r*   r1   r9   r>   r?   r:   r;   s   @r   r   r   P   s:   ø„ ñô<3ò*ð ñó ðð ñó ôr   r   c                 óÊ   — g }|D ][  }t        |t        «      st        t        |«      › d�«      ‚|j	                  t        |j                  |j                  | z  «      «       Œ] |S )a  
    Returns a list of gravity forces given the acceleration
    due to gravity and any number of particles or rigidbodies.

    Example
    =======

    >>> from sympy.physics.mechanics import ReferenceFrame, Particle, RigidBody
    >>> from sympy.physics.mechanics.loads import gravity
    >>> from sympy import symbols
    >>> N = ReferenceFrame('N')
    >>> g = symbols('g')
    >>> P = Particle('P')
    >>> B = RigidBody('B')
    >>> gravity(g*N.y, P, B)
    [(P_masscenter, P_mass*g*N.y),
     (B_masscenter, B_mass*g*N.y)]

    z is not a body type)r'   r   r   ÚtypeÚappendr
   r(   Úmass)ÚaccelerationÚbodiesÚgravity_forceÚbodys       r   ÚgravityrK   …   se   € ð* €MØò OˆÜ˜$¤Ô)Üœt D›z˜lÐ*=Ð>Ó?Ð?Ø×ÑœU 4§?¡?°D·I±IÀÑ4LÓMÕNðOð Ðr   c                 óh  — t        | t        «      r| S t        | t        «      ryt        | «      dk7  rt	        d| › d�«      ‚t        | d   t
        «      rt        | d   | d   «      S t        | d   t        «      rt        | d   | d   «      S t	        d| d   › d�«      ‚t        dt        | «      › d	�«      ‚)
zBHelper function to parse loads and convert tuples to load objects.é   zLoad z should have a length of 2.r   é   z'Load not recognized. The load location z. should either be a Point or a ReferenceFrame.z
Load type zA not recognized as a load. It should be a Force, Torque or tuple.)r'   r	   ÚtupleÚlenÚ
ValueErrorr   r
   r   r   r   rD   )Úloads    r   Ú_parse_loadrS   ¢   sÅ   € ä�$œÔ!ØˆÜ	�Dœ%Ô	 Üˆt‹9˜Š>Ü˜u T FÐ*EÐFÓGÐGÜ�d˜1‘gœuÔ%Ü˜˜a™ $ q¡'Ó*Ð*Ü˜˜Q™¤Ô0Ü˜$˜q™' 4¨¡7Ó+Ð+äÐFÀtÈAÁwÀiØMðOó Pð Pä
�j¤ d£ ð -:ð ;ó <ð <r   N)Úabcr   Úcollectionsr   Ú!sympy.physics.mechanics.body_baser   Úsympy.physics.vectorr   r   r   Ú__all__r	   r
   r   rK   rS   r"   r   r   ú<module>rY      sW   ðÝ Ý "Ý 6ß >Ñ >â
)€ôˆs‘J˜z¨J¸Ð+AÓBô ô"3ˆHô 3ôl2ˆXô 2òjó:<r   