Ë
    £èh0G  ã                  ó  — d dl mZ d dlmZmZmZmZmZ d dlm	Z	 d dl
mZmZmZmZmZmZmZmZmZ ddlmZmZmZmZmZmZ dgZdZd	Zd
ZdZ G d„ d«      Z ejB                  dejD                  dejF                  dejH                  diZ%dd„Z&y)é    )Úannotations)ÚOptionalÚIteratorÚIterableÚAnyÚCallable)ÚSelf)	ÚVec3ÚNULLVECÚOCSÚBezier3PÚBezier4PÚMatrix44Úhas_clockwise_orientationÚUVecÚBoundingBoxé   )ÚCommandÚLineToÚMoveToÚCurve3ToÚCurve4ToÚPathElementÚPathg{®Gáz„?é   g-Cëâ6?)Ú	_verticesÚ_start_indexÚ	_commandsÚ_has_sub_pathsÚ
_user_datac                  óú  — e Zd ZeZefd*d„Ze	 d+	 	 	 	 	 	 	 d,d„«       Zd-d„Z	d.d„Z
d/d„Zd0d„Zd1d„Zd2d	„Zd3d
„Zd4d„ZeZed5d„«       Zej(                  d6d„«       Zed7d„«       Zej(                  d8d„«       Zed7d„«       Zd9d„Zd:d„Zed;d„«       Zed;d„«       Zed;d„«       Zed;d„«       Zd;d„Zd<d„Zd8d„Zd8d„Z d=d„Z!d>d„Z"d?d„Z#d?d„Z$d@d„Z%d3d „Z&d3d!„Z'd3d"„Z(dAdBd#„Z)dCdDd$„Z*dEd%„Z+dFd&„Z,dGd'„Z-dHd(„Z.dHd)„Z/y)Ir   c                ó^   — t        |«      g| _        g | _        g | _        d| _        d | _        y )NF)r
   r   r   r   r   r    )ÚselfÚstarts     ú/lib/python3.12/site-packages/ezdxf/path/path.pyÚ__init__zPath.__init__,   s-   € ä&*¨5£k ]ˆŒà')ˆÔØ(*ˆŒØ#ˆÔØ#ˆ�ó    Nc                ó¬   —  | «       }t        |«      dk(  r|S ||_        ||_        t        |«      |_        t        d„ |D «       «      |_        ||_        |S )zECreate path instances from a list of vertices and a list of commands.r   c              3  óB   K  — | ]  }|t         j                  k(  –— Œ y ­w©N©r   ÚMOVE_TO©Ú.0Úcmds     r%   Ú	<genexpr>z2Path.from_vertices_and_commands.<locals>.<genexpr>C   s   è ø€ Ð%VÉÀ c¬W¯_©_Õ&<Éùó   ‚)Úlenr   r   Úmake_vertex_indexr   Úanyr   r    )ÚclsÚverticesÚcommand_codesÚ	user_dataÚnew_paths        r%   Úfrom_vertices_and_commandszPath.from_vertices_and_commands5   sY   € ñ “5ˆÜˆx‹=˜AÒØˆOØ%ˆÔØ*ˆÔÜ 1°-Ó @ˆÔÜ"%Ñ%VÉÓ%VÓ"VˆÔØ'ˆÔØˆr'   c                óx   — | j                  «       }t        |j                  | j                  «      «      |_        |S )z„Returns a new transformed path.

        Args:
             m: transformation matrix of type :class:`~ezdxf.math.Matrix44`

        )ÚcloneÚlistÚtransform_verticesr   )r#   Úmr9   s      r%   Ú	transformzPath.transformG   s0   € ð —:‘:“<ˆÜ! !×"6Ñ"6°t·~±~Ó"FÓGˆÔØˆr'   c                ó4   — t        | j                  «       «      S )zoReturns the bounding box of all control vertices as
        :class:`~ezdxf.math.BoundingBox` instance.
        )r   Úcontrol_vertices©r#   s    r%   Úbboxz	Path.bboxR   s   € ô ˜4×0Ñ0Ó2Ó3Ð3r'   c                ó,   — t        | j                  «      S )zReturns count of path elements.)r2   r   rC   s    r%   Ú__len__zPath.__len__X   s   € ä�4—>‘>Ó"Ð"r'   c                óÚ  — t        |t        «      rt        d«      ‚| j                  |   }| j                  |   }| j
                  }|t        j                  k(  rt        ||   «      S |t        j                  k(  rt        ||   «      S |t        j                  k(  rt        ||dz      ||   «      S |t        j                  k(  rt        ||dz      ||   ||dz      «      S t        d|› �«      ‚)zBReturns the path element at given index, slicing is not supported.zslicing not supportedr   é   úInvalid command: )Ú
isinstanceÚsliceÚ	TypeErrorr   r   r   r   r,   r   ÚLINE_TOr   Ú	CURVE3_TOr   Ú	CURVE4_TOr   Ú
ValueError)r#   Úitemr/   Úindexr6   s        r%   Ú__getitem__zPath.__getitem__\   sì   € ä�dœEÔ"ÜÐ3Ó4Ð4Ø�n‰n˜TÑ"ˆØ×!Ñ! $Ñ'ˆØ—>‘>ˆØ”'—/‘/Ò!Ü˜( 5™/Ó*Ð*Ø”'—/‘/Ò!Ü˜( 5™/Ó*Ð*Ø”'×#Ñ#Ò#Ü˜H U¨Q¡YÑ/°¸%±ÓAÐAØ”'×#Ñ#Ò#ÜØ˜ ™Ñ#Ø˜‘Ø˜ ™Ñ#óð ô
 Ð,¨S¨EÐ2Ó3Ð3r'   c                óR   ‡ — ˆ fd„t        t        ‰ j                  «      «      D «       S )Nc              3  ó(   •K  — | ]	  }‰|   –— Œ y ­wr*   © )r.   Úir#   s     €r%   r0   z Path.__iter__.<locals>.<genexpr>r   s   øè ø€ Ð<Ñ!;˜A��Q•Ñ!;ùs   ƒ)Úranger2   r   rC   s   `r%   Ú__iter__zPath.__iter__q   s   ø€ Û<¤¤s¨4¯>©>Ó':Ô!;Ó<Ð<r'   c                ó4   — t        | j                  «       «      S )z"Returns all path elements as list.)r=   rY   rC   s    r%   ÚcommandszPath.commandst   s   € ä�D—M‘M“OÓ$Ð$r'   c                ó†   — | j                  «       }| j                  j                  «       |_        | j                  |«       |S )z?Returns a new copy of :class:`Path` with shared immutable data.)Ú	__class__r   ÚcopyÚ_copy_properties)r#   r^   s     r%   Ú__copy__zPath.__copy__x   s5   € à�~‰~ÓˆàŸ™×,Ñ,Ó.ˆŒØ×Ñ˜dÔ#Øˆr'   c                ó  — t        | j                  «      t        |j                  «      k(  sJ ‚| j                  j                  «       |_        | j                  j                  «       |_        | j
                  |_        | j                  |_        y r*   )r2   r   r   r^   r   r   r    )r#   r<   s     r%   r_   zPath._copy_properties€   sg   € Ü�4—>‘>Ó"¤c¨%¯/©/Ó&:Ò:Ð:Ð:ØŸ.™.×-Ñ-Ó/ˆŒØ!×.Ñ.×3Ñ3Ó5ˆÔØ#×2Ñ2ˆÔàŸ?™?ˆÕr'   c                ó   — | j                   S )zÀAttach arbitrary user data to a :class:`Path` object.
        The user data is copied by reference, no deep copy is applied
        therefore a mutable state is shared between copies.
        ©r    rC   s    r%   r8   zPath.user_dataŠ   s   € ð �‰Ðr'   c                ó   — || _         y r*   rc   )r#   Údatas     r%   r8   zPath.user_data’   s	   € àˆ�r'   c                ó    — | j                   d   S )zc:class:`Path` start point, resetting the start point of an empty
        path is possible.
        r   ©r   rC   s    r%   r$   z
Path.start–   s   € ð
 �~‰~˜aÑ Ð r'   c                ób   — | j                   rt        d«      ‚t        |«      | j                  d<   y )NzRequires an empty path.r   )r   rP   r
   r   ©r#   Úlocations     r%   r$   z
Path.start�   s'   € à�>Š>ÜÐ6Ó7Ð7ä $ X£ˆD�N‰N˜1Òr'   c                ó    — | j                   d   S )z:class:`Path` end point.éÿÿÿÿrg   rC   s    r%   ÚendzPath.end¤   s   € ð �~‰~˜bÑ!Ð!r'   c                óH   — | j                   rt        | j                  «      S g S )z6Yields all path control vertices in consecutive order.)r   r=   r   rC   s    r%   rB   zPath.control_vertices©   s   € à�>Š>Ü˜Ÿ™Ó'Ð'Øˆ	r'   c                ó,   — t        | j                  «      S )zInternal API.)r=   r   rC   s    r%   r7   zPath.command_codes¯   s   € ä�D—N‘NÓ#Ð#r'   c                óf   — | j                   }t        |«      dkD  r|d   j                  |d   «      S y)z>Returns ``True`` if the start point is close to the end point.r   r   rl   F)r   r2   Úisclose)r#   r6   s     r%   Ú	is_closedzPath.is_closed³   s5   € ð —>‘>ˆÜˆx‹=˜1ÒØ˜A‘;×&Ñ& x°¡|Ó4Ð4Ør'   c                ó:   — t         j                  | j                  v S )z3Returns ``True`` if the path has any line segments.)r   rM   r   rC   s    r%   Ú	has_lineszPath.has_lines»   s   € ô �‰ $§.¡.Ð0Ð0r'   c                óv   — t         j                  | j                  v xs t         j                  | j                  v S )z4Returns ``True`` if the path has any curve segments.)r   rO   r   rN   rC   s    r%   Ú
has_curveszPath.has_curvesÀ   s/   € ô ×Ñ §¡Ð/ÒV´7×3DÑ3DÈÏÉÐ3Vð	
r'   c                ó   — | j                   S )zoReturns ``True`` if the path is a :term:`Multi-Path` object that
        contains multiple sub-paths.

        )r   rC   s    r%   Úhas_sub_pathszPath.has_sub_pathsÇ   s   € ð ×"Ñ"Ð"r'   c                óZ   — | j                   rt        d«      ‚t        | j                  «      S )zÐReturns ``True`` if 2D path has clockwise orientation, ignores
        z-axis of all control vertices.

        Raises:
            TypeError: can't detect orientation of a :term:`Multi-Path` object

        z/can't detect orientation of a multi-path object)rx   rL   r   r   rC   s    r%   r   zPath.has_clockwise_orientationÏ   s(   € ð ×ÒÜÐMÓNÐNÜ(¨¯©Ó8Ð8r'   c                óð  — |j                   }|t        j                  k(  r| j                  |j                  «       y|t        j
                  k(  r| j                  |j                  «       y|t        j                  k(  r'| j                  |j                  |j                  «       y|t        j                  k(  r2| j                  |j                  |j                  |j                  «       yt        d|› �«      ‚)zAppend a single path element.rI   N)Útyper   rM   Úline_torm   r,   Úmove_torN   Ú	curve3_toÚctrlrO   Ú	curve4_toÚctrl1Úctrl2rP   )r#   r/   Úts      r%   Úappend_path_elementzPath.append_path_elementÛ   s¤   € à�H‰HˆØ”—‘ÒØ�L‰L˜Ÿ™Õ!Ø”'—/‘/Ò!Ø�L‰L˜Ÿ™Õ!Ø”'×#Ñ#Ò#Ø�N‰N˜3Ÿ7™7 C§H¡HÕ-Ø”'×#Ñ#Ò#Ø�N‰N˜3Ÿ7™7 C§I¡I¨s¯y©yÕ9äÐ0°°Ð4Ó5Ð5r'   c                óú   — | j                   j                  t        j                  «       | j                  j                  t        | j                  «      «       | j                  j                  t        |«      «       y)z4Add a line from actual path end point to `location`.N)r   Úappendr   rM   r   r2   r   r
   ri   s     r%   r|   zPath.line_toé   sK   € à�‰×ÑœgŸo™oÔ.Ø×Ñ× Ñ ¤ T§^¡^Ó!4Ô5Ø�‰×Ñœd 8›nÕ-r'   c                óö  — | j                   }|st        |«      | j                  d<   yd| _        |d   t        j
                  k(  rD|j                  «        | j                  j                  «        | j                  j                  «        |j                  t        j
                  «       | j                  j                  t        | j                  «      «       | j                  j                  t        |«      «       y)aS  Start a new sub-path at `location`. This creates a gap between the
        current end-point and the start-point of the new sub-path. This converts
        the instance into a :term:`Multi-Path` object.

        If the :meth:`move_to` command is the first command, the start point of
        the path will be reset to `location`.

        r   NTrl   )
r   r
   r   r   r   r,   Úpopr   r†   r2   )r#   rj   r[   s      r%   r}   zPath.move_toï   s«   € ð —>‘>ˆÙÜ $ X£ˆD�N‰N˜1ÑØØ"ˆÔØ�B‰<œ7Ÿ?™?Ò*à�L‰LŒNØ�N‰N×ÑÔ Ø×Ñ×!Ñ!Ô#Ø�‰œŸ™Ô(Ø×Ñ× Ñ ¤ T§^¡^Ó!4Ô5Ø�‰×Ñœd 8›nÕ-r'   c                ó  — | j                   j                  t        j                  «       | j                  j                  t        | j                  «      «       | j                  j                  t        |«      t        |«      f«       y)u•   Add a quadratic BÃ¨zier-curve from actual path end point to
        `location`, `ctrl` is the control point for the quadratic BÃ¨zier-curve.
        N)	r   r†   r   rN   r   r2   r   Úextendr
   )r#   rj   r   s      r%   r~   zPath.curve3_to  sX   € ð 	�‰×Ñœg×/Ñ/Ô0Ø×Ñ× Ñ ¤ T§^¡^Ó!4Ô5Ø�‰×Ñœt D›z¬4°«>Ð:Õ;r'   c                ó$  — | j                   j                  t        j                  «       | j                  j                  t        | j                  «      «       | j                  j                  t        |«      t        |«      t        |«      f«       y)uœ   Add a cubic BÃ¨zier-curve from actual path end point to `location`,
        `ctrl1` and `ctrl2` are the control points for the cubic BÃ¨zier-curve.
        N)	r   r†   r   rO   r   r2   r   rŠ   r
   )r#   rj   r�   r‚   s       r%   r€   zPath.curve4_to  s^   € ð 	�‰×Ñœg×/Ñ/Ô0Ø×Ñ× Ñ ¤ T§^¡^Ó!4Ô5Ø�‰×Ñœt E›{¬D°«K¼¸h»ÐHÕIr'   c                óT   — | j                   s| j                  | j                  «       yy)z[Close path by adding a line segment from the end point to the start
        point.
        N)rr   r|   r$   rC   s    r%   Úclosez
Path.close  s    € ð �~Š~Ø�L‰L˜Ÿ™Õ$ð r'   c                óÊ   — | j                   rG| j                  «       }|€J d«       ‚| j                  j                  |«      s| j	                  |«       yy| j                  «        y)z¿Close last sub-path by adding a line segment from the end point to
        the start point of the last sub-path. Behaves like :meth:`close` for
        :term:`Single-Path` instances.
        Nz2internal error: required MOVE_TO command not found)rx   Ú_start_of_last_sub_pathrm   rq   r|   r�   )r#   Ústart_points     r%   Úclose_sub_pathzPath.close_sub_path  sa   € ð
 ×ÒØ×6Ñ6Ó8ˆKàÐ'ðDàCóDØ'à—8‘8×#Ñ# KÔ0Ø—‘˜[Õ)ð 1ð �J‰J�Lr'   c                óÀ   — t         j                  }| j                  }t        |«      dz
  }|dkD  r/||   |k(  r| j                  | j
                  |      S |dz  }|dkD  rŒ/y )Nr   r   )r   r,   r   r2   r   r   )r#   r}   r[   rR   s       r%   r�   zPath._start_of_last_sub_path,  sf   € Ü—/‘/ˆØ—>‘>ˆÜ�H“ Ñ!ˆà�aŠiØ˜‰ 'Ò)Ø—~‘~ d×&7Ñ&7¸Ñ&>Ñ?Ð?Ø�Q‰JˆEð �a‹ið r'   c                óü  — | j                  «       }|j                  s|S |j                  d   t        j                  k(  ro|j                  j	                  «        |j
                  j	                  «        |j                  j	                  «        t        d„ |j                  D «       «      |_        |j                  j                  «        |j
                  j                  «        t        |j                  «      |_        |S )zZReturns a new :class:`Path` with reversed commands and control
        vertices.

        rl   c              3  óB   K  — | ]  }|t         j                  k(  –— Œ y ­wr*   r+   r-   s     r%   r0   z Path.reversed.<locals>.<genexpr>G  s   è ø€ ð &Ù2@¨3�”w—‘Õ&±.ùr1   )r<   r   r   r,   rˆ   r   r   r4   r   Úreverser3   )r#   Úpaths     r%   ÚreversedzPath.reversed7  sº   € ð
 �z‰z‹|ˆØ�~Š~ØˆKØ�>‰>˜"Ñ¤§¡Ò0ð
 �N‰N×ÑÔ Ø�N‰N×ÑÔ Ø×Ñ×!Ñ!Ô#Ü"%ñ &Ø26·.².ó&ó #ˆDÔð 	�‰×ÑÔ Ø�‰×ÑÔ Ü-¨d¯n©nÓ=ˆÔØˆr'   c                ób   — | j                  «       r| j                  «       S | j                  «       S )z�Returns new :class:`Path` in clockwise orientation.

        Raises:
            TypeError: can't detect orientation of a :term:`Multi-Path` object

        )r   r<   r—   rC   s    r%   Ú	clockwisezPath.clockwiseO  s(   € ð ×)Ñ)Ô+Ø—:‘:“<Ðà—=‘=“?Ð"r'   c                ób   — | j                  «       r| j                  «       S | j                  «       S )z¥Returns new :class:`Path` in counter-clockwise orientation.

        Raises:
            TypeError: can't detect orientation of a :term:`Multi-Path` object

        )r   r—   r<   rC   s    r%   Úcounter_clockwisezPath.counter_clockwise[  s(   € ð ×)Ñ)Ô+Ø—=‘=“?Ð"à—:‘:“<Ðr'   c                ó@   ‡— dˆfd„}dˆfd„}| j                  ||«      S )uY  Approximate path by vertices, `segments` is the count of
        approximation segments for each BÃ©zier curve.

        Does not yield any vertices for empty paths, where only a start point
        is present!

        Approximation of :term:`Multi-Path` objects is possible, but gaps are
        indistinguishable from line segments.

        c                óP   •— t        t        | ||f«      j                  ‰«      «      S r*   )Úiterr   Úapproximate)Úp0Úp1Úp2Úsegmentss      €r%   Úcurve3z Path.approximate.<locals>.curve3t  s$   ø€ Üœ " b¨" Ó.×:Ñ:¸8ÓDÓEÐEr'   c                óR   •— t        t        | |||f«      j                  ‰«      «      S r*   )rž   r   rŸ   )r    r¡   r¢   Úp3r£   s       €r%   Úcurve4z Path.approximate.<locals>.curve4w  s'   ø€ Üœ " b¨"¨bÐ!1Ó2×>Ñ>¸xÓHÓIÐIr'   ©r    r
   r¡   r
   r¢   r
   ÚreturnúIterator[Vec3]©
r    r
   r¡   r
   r¢   r
   r¦   r
   r©   rª   ©Ú_approximate)r#   r£   r¤   r§   s    `  r%   rŸ   zPath.approximateh  s$   ø€ õ	Fõ	Jð × Ñ  ¨Ó0Ð0r'   c                óF   ‡‡— dˆˆfd„}dˆˆfd„}| j                  ||«      S )ug  Approximate path by vertices and use adaptive recursive flattening
        to approximate BÃ¨zier curves. The argument `segments` is the
        minimum count of approximation segments for each curve, if the distance
        from the center of the approximation segment to the curve is bigger than
        `distance` the segment will be subdivided.

        Does not yield any vertices for empty paths, where only a start point
        is present!

        Flattening of :term:`Multi-Path` objects is possible, but gaps are
        indistinguishable from line segments.

        Args:
            distance: maximum distance from the center of the curve to the
                center of the line segment between two approximation points to
                determine if a segment should be subdivided.
            segments: minimum segment count per BÃ©zier curve

        c                ór   •— ‰dk(  rt        d«      ‚t        t        | ||f«      j                  ‰‰«      «      S ©Ng        zinvalid max distance: 0.0)rP   rž   r   Ú
flattening)r    r¡   r¢   Údistancer£   s      €€r%   r¤   zPath.flattening.<locals>.curve3‘  s9   ø€ Ø˜3ŠÜ Ð#<Ó>Ð>Üœ " b¨" Ó.×9Ñ9¸(ÀHÓMÓNÐNr'   c                ót   •— ‰dk(  rt        d«      ‚t        t        | |||f«      j                  ‰‰«      «      S r°   )rP   rž   r   r±   )r    r¡   r¢   r¦   r²   r£   s       €€r%   r§   zPath.flattening.<locals>.curve4–  s<   ø€ Ø˜3ŠÜ Ð#<Ó>Ð>Üœ " b¨"¨bÐ!1Ó2×=Ñ=¸hÈÓQÓRÐRr'   r¨   r«   r¬   )r#   r²   r£   r¤   r§   s    ``  r%   r±   zPath.flattening|  s$   ù€ ö*	Oö
	Sð
 × Ñ  ¨Ó0Ð0r'   c              #  ó8  K  — | j                   sy | j                  d   }|–— | j                  }t        | j                  | j                   «      D ]Ã  \  }}|t        j
                  k(  s|t        j                  k(  r
||   }|–— nŒ|t        j                  k(  r+|||dz    \  }} ||||«      }	t        |	«       |	E d {  –—†  nN|t        j                  k(  r-|||dz    \  }
}} |||
||«      }	t        |	«       |	E d {  –—†  nt        d|› �«      ‚|}ŒÅ y 7 ŒX7 Œ­w)Nr   rH   é   rI   )r   r   Úzipr   r   rM   r,   rN   ÚnextrO   rP   )r#   r¤   r§   r$   r6   Úsir/   Úend_locationr   Úptsr�   r‚   s               r%   r­   zPath._approximate�  s  è ø€ Ø�~Š~Øà—‘˜qÑ!ˆØŠà—>‘>ˆÜ˜4×,Ñ,¨d¯n©nÖ=‰GˆB�Ø”g—o‘oÒ%¨´·±Ò)?Ø'¨™|�Ø"Ó"Øœ×)Ñ)Ò)Ø%-¨b°2¸±6Ð%:Ñ"��lÙ˜U D¨,Ó7�Ü�S”	Ø—‘Øœ×)Ñ)Ò)Ø-5°b¸2À¹6Ð-BÑ*��u˜lÙ˜U E¨5°,Ó?�Ü�S”	Ø—‘ä Ð#4°S°EÐ!:Ó;Ð;Ø ‰Eñ! >ð øð
 ús$   ‚B;DÂ=DÂ>?DÃ=DÃ>DÄDc                óP   ‡‡— t        ˆˆfd„| j                  D «       «      | _        y)z;Transform path from given `ocs` to WCS coordinates inplace.c              3  ór   •K  — | ].  }‰j                  |j                  t        ‰«      ¬ «      «      –— Œ0 y­w))ÚzN)Úto_wcsÚreplaceÚfloat)r.   ÚvÚ	elevationÚocss     €€r%   r0   zPath.to_wcs.<locals>.<genexpr>¹  s.   øè ø€ ð 
Ù?M¸!ˆC�J‰J�q—y‘y¤5¨Ó#3�yÓ4×5¹~ùs   ƒ47N)r=   r   )r#   rÃ   rÂ   s    ``r%   r¾   zPath.to_wcs·  s    ù€ äô 
Ø?C¿~º~ó
ó 
ˆ�r'   c              #  ó\  K  — | j                  | j                  ¬«      }| j                  |_        t        j                  }| j                  «       D ]T  }|j                  |k(  r2|–— | j                  |j                  ¬«      }| j                  |_        ŒD|j                  |«       ŒV |–— y­w)zÄYield all sub-paths as :term:`Single-Path` objects.

        It's safe to call :meth:`sub_paths` on any path-type:
        :term:`Single-Path`, :term:`Multi-Path` and :term:`Empty-Path`.

        )r$   N)	r]   r$   r    r   r,   r[   r{   rm   r„   )r#   r–   r}   r/   s       r%   Ú	sub_pathszPath.sub_paths½  s…   è ø€ ð �~‰~ D§J¡Jˆ~Ó/ˆØŸ/™/ˆŒÜ—/‘/ˆØ—=‘=–?ˆCØ�x‰x˜7Ò"Ø’
Ø—~‘~¨C¯G©G�~Ó4�Ø"&§/¡/�•à×(Ñ(¨Õ-ð #ð ‹
ùs   ‚B*B,c                óž   — t        |«      rB| j                  |j                  «       |j                  «       D ]  }| j	                  |«       Œ yy)zÿExtend the path by another path. The source path is automatically a
        :term:`Multi-Path` object, even if the previous end point matches the
        start point of the appended path. Ignores paths without any commands
        (empty paths).

        N)r2   r}   r$   r[   r„   ©r#   r–   r/   s      r%   Úextend_multi_pathzPath.extend_multi_pathÐ  s>   € ô ˆtŒ9Ø�L‰L˜Ÿ™Ô$Ø—}‘}–�Ø×(Ñ(¨Õ-ñ 'ð r'   c                ó*  — t        |«      dk(  ry| j                  rA| j                  j                  |j                  «      s-| j                  |j                  «       n|j                  | _        |j                  «       D ]  }| j                  |«       Œ y)z’Append another path to this path. Adds a :code:`self.line_to(path.start)`
        if the end of this path != the start of appended path.

        r   N)r2   r   rm   rq   r$   r|   r[   r„   rÇ   s      r%   Úappend_pathzPath.append_pathÜ  sh   € ô
 ˆt‹9˜Š>ØØ�>Š>Ø—8‘8×#Ñ# D§J¡JÔ/Ø—‘˜TŸZ™ZÕ(àŸ™ˆDŒJØ—=‘=–?ˆCØ×$Ñ$ SÕ)ñ #r'   )r$   r   r*   )r6   ú
list[Vec3]r7   zlist[Command]r8   r   r©   r	   )r?   r   r©   r	   )r©   r   )r©   Úint)r©   r   )r©   zIterator[PathElement])r©   zlist[PathElement])r©   r	   )r<   r   r©   ÚNone)r©   r   )re   r   )r©   r
   )rj   r   r©   rÍ   )r©   rË   )r©   ú	list[int])r©   Úbool)r/   r   r©   rÍ   )rj   r   r   r   r©   rÍ   )rj   r   r�   r   r‚   r   r©   rÍ   )r©   rÍ   )r©   zOptional[Vec3])é   )r£   rÌ   r©   rª   )r   )r²   rÀ   r£   rÌ   r©   rª   )r¤   r   r§   r   r©   rª   )rÃ   r   rÂ   rÀ   r©   rÍ   )r©   zIterator[Self])r–   r   r©   rÍ   )0Ú__name__Ú
__module__Ú__qualname__Ú_slotsÚ	__slots__r   r&   Úclassmethodr:   r@   rD   rF   rS   rY   r[   r`   r_   r<   Úpropertyr8   Úsetterr$   rm   rB   r7   rr   rt   rv   rx   r   r„   r|   r}   r~   r€   r�   r‘   r�   r—   r™   r›   rŸ   r±   r­   r¾   rÅ   rÈ   rÊ   rV   r'   r%   r   r   )   sœ  „ Ø€Ià%,ô $ð àRVðØ!ðØ2?ðØLOðà	òó ðó"	ó4ó#ó4ó*=ó%óó+ð €Eàòó ðð ×Ñòó ðð ò!ó ð!ð ‡\�\ò/ó ð/ð ò"ó ð"óó$ð òó ðð ò1ó ð1ð ò
ó ð
ð ò#ó ð#ó
9ó6ó.ó.ó.<óJó%óó	óó0
#ó ô1ô(1óB!ó4
óó&
.ô*r'   rH   rµ   c                óZ   — t         }d}g }| D ]  }|j                  |«       |||   z  }Œ |S )Nr   )ÚCMD_SIZEr†   )r7   Úcmd_sizer$   Ústart_indexÚcodes        r%   r3   r3   ô  s?   € Ü€HØ€EØ€KÛˆØ×Ñ˜5Ô!Ø�˜$‘Ñ‰ð ð Ðr'   N)r7   zIterable[Command]r©   rÎ   )'Ú
__future__r   Útypingr   r   r   r   r   Útyping_extensionsr	   Ú
ezdxf.mathr
   r   r   r   r   r   r   r   r   r[   r   r   r   r   r   r   Ú__all__ÚMAX_DISTANCEÚMIN_SEGMENTSÚG1_TOLrÔ   r   r,   rM   rN   rO   rÚ   r3   rV   r'   r%   Ú<module>ræ      s’   ðõ #÷õ õ #÷
÷ 
õ 
÷÷ ð ˆ(€à€Ø€Ø	€Ø	S€÷@*ñ @*ðH ‡O�O�QØ‡O�O�QØ×Ñ�qØ×Ñ�qð	€ôr'   