Ë
    £èh>>  ã                  ón  — U d dl mZ d dlmZmZmZmZmZ d dlZd dl	m
Z
mZ d dl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Zg d¢ZdZ G d„ d	e«      Zdd
„Z G d„ de
«      Z G d„ d«      Z	 d	 	 	 	 	 dd„Z	 d	 	 	 	 	 dd„Z dd„Z!eee"e"e"f   ef   Z#de$d<    G d„ d«      Z% G d„ de%«      Z& G d„ de%«      Z'y)é    )Úannotations)ÚIterableÚTupleÚIteratorÚSequenceÚDictN)ÚProtocolÚ	TypeAlias)	ÚVec2ÚVec3ÚUVecÚNULLVECÚintersection_line_line_2dÚBoundingBox2dÚintersection_line_line_3dÚBoundingBoxÚAbstractBoundingBox)ÚConstructionPolylineÚApproxParamTÚintersect_polylines_2dÚintersect_polylines_3dg•Ö&è.>c                  ó¨   — e Zd ZdZdef	 	 	 	 	 dd„Zdd„Zdd„Zd„ Ze	dd„«       Z
e	dd„«       Zdd	„Zdd
„Zdd„Zdd„Zdd„Zdd„Z	 d	 	 	 	 	 dd„Zy)r   a  Construction tool for 3D polylines.

    A polyline construction tool to measure, interpolate and divide anything
    that can be approximated or flattened into vertices.
    This is an immutable data structure which supports the :class:`Sequence`
    interface.

    Args:
        vertices: iterable of polyline vertices
        close: ``True`` to close the polyline (first vertex == last vertex)
        rel_tol: relative tolerance for floating point comparisons

    Example to measure or divide a SPLINE entity::

        import ezdxf
        from ezdxf.math import ConstructionPolyline

        doc = ezdxf.readfile("your.dxf")
        msp = doc.modelspace()
        spline = msp.query("SPLINE").first
        if spline is not None:
            polyline = ConstructionPolyline(spline.flattening(0.01))
            print(f"Entity {spline} has an approximated length of {polyline.length}")
            # get dividing points with a distance of 1.0 drawing unit to each other
            points = list(polyline.divide_by_length(1.0))

    Fc                ó
  — t        |«      | _        t        j                  |«      }|| _        |rEt        |«      dkD  r7|d   j                  |d   | j                  ¬«      s|j                  |d   «       t        |«      | _        y )Né   r   éÿÿÿÿ©Úrel_tol)	ÚfloatÚ_rel_tolr   ÚlistÚ	_verticesÚlenÚiscloseÚappendÚ
_distances)ÚselfÚverticesÚcloser   Úv3lists        ú3lib/python3.12/site-packages/ezdxf/math/polyline.pyÚ__init__zConstructionPolyline.__init__F   sl   € ô ˜g›ˆŒÜ!ŸY™Y xÓ0ˆØ%+ˆŒÙ”S˜“[ 1’_Ø˜!‘9×$Ñ$ V¨B¡Z¸¿¹Ð$ÔGØ—‘˜f Q™iÔ(ä'1°&Ó'9ˆ�ó    c                ó,   — t        | j                  «      S )z	len(self))r"   r!   ©r&   s    r*   Ú__len__zConstructionPolyline.__len__U   s   € ä�4—>‘>Ó"Ð"r,   c                ó,   — t        | j                  «      S )z
iter(self))Úiterr!   r.   s    r*   Ú__iter__zConstructionPolyline.__iter__Y   s   € ä�D—N‘NÓ#Ð#r,   c                ó”   — t        |t        «      r| j                  |   S | j                  | j                  |   | j                  ¬«      S )zvertex = self[item]r   )Ú
isinstanceÚintr!   Ú	__class__r   )r&   Úitems     r*   Ú__getitem__z ConstructionPolyline.__getitem__]   s;   € ä�dœCÔ Ø—>‘> $Ñ'Ð'à—>‘> $§.¡.°Ñ"6ÀÇÁ�>ÓNÐNr,   c                ó:   — | j                   r| j                   d   S y)z+Returns the overall length of the polyline.r   ç        )r%   r.   s    r*   ÚlengthzConstructionPolyline.lengthd   s   € ð �?Š?Ø—?‘? 2Ñ&Ð&Ør,   c                ó¢   — t        | j                  «      dkD  r7| j                  d   j                  | j                  d   | j                  ¬«      S y)zZReturns ``True`` if the polyline is closed
        (first vertex == last vertex).
        r   r   r   r   F)r"   r!   r#   r   r.   s    r*   Ú	is_closedzConstructionPolyline.is_closedk   sM   € ô
 ˆt�~‰~Ó Ò"Ø—>‘> !Ñ$×,Ñ,Ø—‘˜rÑ"¨D¯M©Mð -ó ð ð r,   c                óš   — | j                   }|st        d«      ‚| j                  }|dk(  rdd|d   fS ||dz
     }||   }||   }|||z
  |fS )z‹Returns the tuple (distance from start, distance from previous vertex,
        vertex). All distances measured along the polyline.
        zempty polyliner   r:   é   )r!   Ú
ValueErrorr%   )r&   Úindexr'   Ú	distancesÚprev_distanceÚcurrent_distanceÚvertexs          r*   ÚdatazConstructionPolyline.datav   sr   € ð —>‘>ˆÙÜÐ-Ó.Ð.Ø—O‘Oˆ	à�AŠ:Ø˜˜X a™[Ð(Ð(Ø! %¨!¡)Ñ,ˆØ$ UÑ+ÐØ˜%‘ˆØÐ!1°MÑ!AÀ6ÐIÐIr,   c                ó~   — |dk  ry|| j                   k\  rt        dt        | «      dz
  «      S | j                  |«      S )z¢Returns the data index of the exact or next data entry for the given
        `distance`. Returns the index of last entry if `distance` > :attr:`length`.

        r:   r   r?   )r;   Úmaxr"   Ú	_index_at©r&   Údistances     r*   Úindex_atzConstructionPolyline.index_at†   s>   € ð
 �sŠ?ØØ�t—{‘{Ò"Ü�qœ#˜d›) a™-Ó(Ð(Ø�~‰~˜hÓ'Ð'r,   c                óB   — t        j                  | j                  |«      S ©N)ÚbisectÚbisect_leftr%   rJ   s     r*   rI   zConstructionPolyline._index_at‘   s   € ä×!Ñ! $§/¡/°8Ó<Ð<r,   c                ó¨   — |dk  s|| j                   kD  rt        d«      ‚t        | j                  «      dk  rt        d«      ‚| j	                  |«      S )zhReturns the interpolated vertex at the given `distance` from the
        start of the polyline.
        r:   zdistance out of ranger   ú%not enough vertices for interpolation)r;   r@   r"   r!   Ú
_vertex_atrJ   s     r*   Ú	vertex_atzConstructionPolyline.vertex_at•   sN   € ð �cŠ>˜X¨¯©Ò3ÜÐ4Ó5Ð5Üˆt�~‰~Ó Ò"ÜÐDÓEÐEØ�‰˜xÓ(Ð(r,   c                ó,  — | j                   }| j                  }| j                  |«      }|dk(  r|d   S |dz
  }||   }||   }|dkD  r||k(  r|dz  }||   }|dkD  r||k(  rŒ||k(  rt        d«      ‚||z
  ||z
  z  }||   j	                  ||   |¬«      S )Nr   r?   zinternal interpolation error)Úfactor)r!   r%   rI   ÚArithmeticErrorÚlerp)	r&   rK   r'   rB   Úindex1Úindex0Ú	distance1Ú	distance0rV   s	            r*   rS   zConstructionPolyline._vertex_atŸ   sË   € à—>‘>ˆØ—O‘Oˆ	Ø—‘ Ó)ˆØ�QŠ;Ø˜A‘;ÐØ˜!‘ˆØ˜fÑ%ˆ	Ø˜fÑ%ˆ	à�qŠj˜Y¨)Ò3Ø�a‰KˆFØ! &Ñ)ˆIð �qŠj˜Y¨)Ó3ð ˜	Ò!Ü!Ð"@ÓAÐAà˜YÑ&¨9°yÑ+@ÑAˆØ˜Ñ×$Ñ$ X¨fÑ%5¸fÐ$ÓEÐEr,   c              #  óª   K  — |dk  rt        d|› �«      ‚| j                  }t        j                  d| j                  |«      D ]  } ||«      –— Œ y­w)z²Returns `count` interpolated vertices along the polyline.
        Argument `count` has to be greater than 2 and the start- and end
        vertices are always included.

        r   zinvalid count: r:   N)r@   rS   ÚnpÚlinspacer;   )r&   ÚcountrT   rK   s       r*   ÚdividezConstructionPolyline.divide³   sP   è ø€ ð �1Š9Ü˜¨u¨gÐ6Ó7Ð7Ø—O‘Oˆ	ÜŸ™ C¨¯©°eÖ<ˆHÙ˜HÓ%Ó%ñ =ùs   ‚AAc              #  óV  K  — |dk  rt        d|› �«      ‚t        | j                  «      dk  rt        d«      ‚| j                  }| j                  }d}t
        }||k  r ||«      }|–— ||z  }||k  rŒ|r1|j                  | j                  d   «      s| j                  d   –— yyy­w)a  Returns interpolated vertices along the polyline. Each vertex has a
        fix distance `length` from its predecessor. Yields the last vertex if
        argument `force_last` is ``True`` even if the last distance is not equal
        to `length`.

        r:   zinvalid length: r   rR   r   N)r@   r"   r!   r;   rS   r   r#   )r&   r;   Ú
force_lastÚtotal_lengthrT   rK   rE   s          r*   Údivide_by_lengthz%ConstructionPolyline.divide_by_length¿   s¶   è ø€ ð �SŠ=ÜÐ/°¨xÐ8Ó9Ð9Üˆt�~‰~Ó Ò"ÜÐDÓEÐEà"Ÿk™kˆØ—O‘Oˆ	ØˆäˆØ˜,Ò&Ù˜xÓ(ˆFØŠLØ˜ÑˆHð ˜,Ó&ñ
 ˜fŸn™n¨T¯^©^¸BÑ-?Ô@Ø—.‘. Ñ$Ó$ð Aˆ:ùs   ‚A2B)Á54B)N)r'   zIterable[UVec]r(   Úboolr   r   )Úreturnr5   )rg   úIterator[Vec3]©rg   r   )rg   rf   )rA   r5   rg   ztuple[float, float, Vec3])rK   r   rg   r5   )rK   r   rg   r   )r`   r5   rg   rh   )F)r;   r   rc   rf   rg   rh   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚREL_TOLr+   r/   r2   r8   Úpropertyr;   r=   rF   rL   rI   rT   rS   ra   re   © r,   r*   r   r   )   sª   „ ñð> Ø ð	:à ð:ð ð:ð ó	:ó#ó$òOð òó ðð òó ðóJó 	(ó=ó)óFó(
&ð 16ð%Øð%Ø)-ð%à	ô%r,   r   c                ó¦   — d}g }t        «       }| D ]=  }|r&||z
  }||j                  z  }|j                  |«       n|j                  |«       |}Œ? |S )Nr:   )r   Ú	magnituder$   )r'   Úcurrent_stationrB   Úprev_vertexrE   Údistant_vecs         r*   r%   r%   Û   sc   € à €OØ€IÜ“&€KÛˆÙØ  ;Ñ.ˆKØ˜{×4Ñ4Ñ4ˆOØ×Ñ˜_Õ-à×Ñ˜_Ô-Ø‰ð ð Ðr,   c                  ó   — e Zd Zdd„Zy)ÚSupportsPointMethodc                 ó   — y rN   rp   )r&   Úts     r*   ÚpointzSupportsPointMethod.pointì   s   € Ør,   N)ry   r   rg   r   )rj   rk   rl   rz   rp   r,   r*   rw   rw   ë   s   „ ôr,   rw   c                  ó^   — e Zd ZdZdddœ	 	 	 	 	 dd„Zedd„«       Zedd„«       Zdd„Zdd	„Z	y
)r   a9  Approximation tool for parametrized curves.

    - approximate parameter `t` for a given distance from the start of the curve
    - approximate the distance for a given parameter `t` from the start of the curve

    These approximations can be applied to all parametrized curves which provide
    a :meth:`point` method, like :class:`Bezier4P`, :class:`Bezier3P` and
    :class:`BSpline`.

    The approximation is based on equally spaced parameters from 0 to `max_t`
    for a given segment count.
    The :meth:`flattening` method can not be used for the curve approximation,
    because the required parameter `t` is not logged by the flattening process.

    Args:
        curve: curve object, requires a method :meth:`point`
        max_t: the max. parameter value
        segments: count of approximation segments

    g      ð?éd   )Úmax_tÚsegmentsc          	     ó´   ‡— t        ‰d«      sJ ‚|dkD  sJ ‚t        ˆfd„t        j                  d||dz   «      D «       «      | _        || _        ||z  | _        y )Nrz   r   c              3  ó@   •K  — | ]  }‰j                  |«      –— Œ y ­wrN   )rz   )Ú.0ry   Úcurves     €r*   Ú	<genexpr>z(ApproxParamT.__init__.<locals>.<genexpr>  s   øè ø€ ð .
Ù$I˜qˆE�K‰K˜�NÑ$Iùs   ƒr:   r?   )Úhasattrr   r^   r_   Ú	_polylineÚ_max_tÚ_step)r&   r‚   r}   r~   s    `  r*   r+   zApproxParamT.__init__  s`   ø€ ô �u˜gÔ&Ð&Ð&Ø˜!Š|Ðˆ|Ü-ó .
Ü$&§K¡K°°U¸HÀq¹LÔ$Ió.
ó 
ˆŒð ˆŒØ˜XÑ%ˆ�
r,   c                ó   — | j                   S rN   )r†   r.   s    r*   r}   zApproxParamT.max_t  s   € à�{‰{Ðr,   c                ó   — | j                   S rN   )r…   r.   s    r*   ÚpolylinezApproxParamT.polyline  s   € à�~‰~Ðr,   c                ó  — | j                   }||j                  k\  r| j                  S | j                  }|j	                  |«      }|j                  |«      \  }}}||z  }|dkD  r||||z
  z  |z  z  }t        | j                  |«      S )z^Approximate parameter t for the given `distance` from the start of
        the curve.
        gê-�™—q=)r…   r;   r†   r‡   rL   rF   Úmin)	r&   rK   ÚpolyÚt_stepÚiÚstationÚd0Ú_ry   s	            r*   Úparam_tzApproxParamT.param_t  s‡   € ð �~‰~ˆØ�t—{‘{Ò"Ø—;‘;Ðà—‘ˆØ�M‰M˜(Ó#ˆØŸ™ 1›‰ˆ��QØ�Q‰JˆØ�Š:Ø�˜7 XÑ-Ñ.°Ñ3Ñ3ˆAÜ�4—;‘; Ó"Ð"r,   c                óâ   — |dk  ry| j                   }|| j                  k\  r|j                  S | j                  }t	        ||z  «      dz   }|j                  |«      \  }}}||||z  |z
  z  |z  z
  S )zdApproximate the distance from the start of the curve to the point
        `t` on the curve.
        r:   r?   )r…   r†   r;   r‡   r5   rF   )r&   ry   r�   ÚsteprA   r�   r‘   r’   s           r*   rK   zApproxParamT.distance-  sz   € ð �Š8ØØ�~‰~ˆØ�—‘ÒØ—;‘;Ðà�z‰zˆÜ�A˜‘H“ Ñ!ˆØŸ™ 5Ó)‰ˆ��QØ˜˜t e™|¨aÑ/Ñ0°4Ñ7Ñ7Ð7r,   N)r‚   rw   r}   r   r~   r5   ri   )rg   r   )rK   r   )ry   r   rg   r   )
rj   rk   rl   rm   r+   ro   r}   rŠ   r“   rK   rp   r,   r*   r   r   ð   sb   „ ñð2 Øñ&à"ð&ð ð	&ð
 ó&ð òó ðð òó ðó#ô 8r,   r   c                óT   — t        | ||«      }|j                  «        |j                  S )aV  Returns the intersection points for two polylines as list of :class:`Vec2`
    objects, the list is empty if no intersection points exist.
    Does not return self intersection points of `p1` or `p2`.
    Duplicate intersection points are removed from the result list, but the list
    does not have a particular order! You can sort the result list by
    :code:`result.sort()` to introduce an order.

    Args:
        p1: first polyline as sequence of :class:`Vec2` objects
        p2: second polyline as sequence of :class:`Vec2` objects
        abs_tol: absolute tolerance for comparisons

    )Ú_PolylineIntersection2dÚexecuteÚintersections©Úp1Úp2Úabs_tolÚ	intersects       r*   r   r   =  ó*   € ô  (¨¨B°Ó8€IØ×ÑÔØ×"Ñ"Ð"r,   c                óT   — t        | ||«      }|j                  «        |j                  S )aV  Returns the intersection points for two polylines as list of :class:`Vec3`
    objects, the list is empty if no intersection points exist.
    Does not return self intersection points of `p1` or `p2`.
    Duplicate intersection points are removed from the result list, but the list
    does not have a particular order! You can sort the result list by
    :code:`result.sort()` to introduce an order.

    Args:
        p1: first polyline as sequence of :class:`Vec3` objects
        p2: second polyline as sequence of :class:`Vec3` objects
        abs_tol: absolute tolerance for comparisons

    )Ú_PolylineIntersection3dr˜   r™   rš   s       r*   r   r   R  rŸ   r,   c                ó   — | |z   dz  }| |||fS )Nr   rp   )ÚaÚbÚms      r*   ra   ra   g  s   € Ø	
ˆQ‰�1‰€AØˆa��Aˆ:Ðr,   r
   ÚTCachec                  óŽ   — e Zd ZU ded<   ded<   dd„Zej                  dd„«       Zej                  dd„«       Zdd„Z	dd„Z
dd	„Zy
)Ú_PolylineIntersectionr   r›   rœ   c                ó   — i | _         y rN   )Ú
bbox_cacher.   s    r*   r+   z_PolylineIntersection.__init__s  s   € ð #%ˆ�r,   c                 ó   — y rN   rp   ©r&   Úpointss     r*   Úbboxz_PolylineIntersection.bboxx  ó   € àr,   c                 ó   — y rN   rp   )r&   Ús1Úe1Ús2Úe2s        r*   Úline_intersectionz'_PolylineIntersection.line_intersection|  r¯   r,   c                ó¢   — t        | j                  «      }t        | j                  «      }|dk  s|dk  ry | j                  d|dz
  d|dz
  «       y )Nr   r   r?   )r"   r›   rœ   rž   )r&   Úl1Úl2s      r*   r˜   z_PolylineIntersection.execute€  sF   € Ü�d—g‘g“,ˆÜ�d—g‘g“,ˆØ�Š6�R˜!’VØØ�‰�q˜"˜q™& ! R¨!¡VÕ,r,   c                ó^  — |dz  }|dz  }||z
  dk  s||z
  dk  ry| j                   }d||f}|j                  |«      }|€#| j                  | j                  || «      }|||<   d||f}|j                  |«      }	|	€#| j                  | j                  || «      }	|	||<   |j                  |	«      S )Nr?   r   F)rª   Úgetr®   r›   rœ   Úhas_overlap)
r&   r±   r²   r³   r´   ÚcacheÚkey1Úbbox1Úkey2Úbbox2s
             r*   Úoverlapz_PolylineIntersection.overlap‡  sÄ   € Ø
ˆa‰ˆØ
ˆa‰ˆð �‰7�QŠ;˜"˜r™' Aš+Øà—‘ˆØ�2�rˆ{ˆØ—	‘	˜$“ˆØˆ=Ø—I‘I˜dŸg™g b¨˜nÓ-ˆEØˆE�$‰Kà�2�rˆ{ˆØ—	‘	˜$“ˆØˆ=Ø—I‘I˜dŸg™g b¨˜nÓ-ˆEØˆE�$‰KØ× Ñ  Ó'Ð'r,   c                óì  — ||kD  r||kD  sJ ‚||z
  dk(  r||z
  dk(  r| j                  ||||«       y t        ||«      \  }}}}t        ||«      \  }	}
}}| j                  |||	|
«      r| j                  |||	|
«       | j                  ||||«      r| j                  ||||«       | j                  |||	|
«      r| j                  |||	|
«       | j                  ||||«      r| j                  ||||«       y y )Nr?   )rµ   ra   rÁ   rž   )r&   r±   r²   r³   r´   Ús1_aÚe1_bÚs1_cÚe1_dÚs2_aÚe2_bÚs2_cÚe2_ds                r*   rž   z_PolylineIntersection.intersect�  sþ   € Ø�BŠw˜2 š7Ð"Ð"Ø�‰7�aŠ<˜B ™G qšLØ×"Ñ" 2 r¨2¨rÔ2ØÜ!'¨¨B£Ñˆˆd�D˜$Ü!'¨¨B£Ñˆˆd�D˜$à�<‰<˜˜d D¨$Ô/Ø�N‰N˜4  t¨TÔ2Ø�<‰<˜˜d D¨$Ô/Ø�N‰N˜4  t¨TÔ2Ø�<‰<˜˜d D¨$Ô/Ø�N‰N˜4  t¨TÔ2Ø�<‰<˜˜d D¨$Ô/Ø�N‰N˜4  t¨TÕ2ð 0r,   N)rg   ÚNone©r­   r   rg   r   ©
r±   r5   r²   r5   r³   r5   r´   r5   rg   rË   )
r±   r5   r²   r5   r³   r5   r´   r5   rg   rf   )rj   rk   rl   Ú__annotations__r+   ÚabcÚabstractmethodr®   rµ   r˜   rÁ   rž   rp   r,   r*   r¨   r¨   o  sT   … ØƒLØƒLó%ð
 	×Ñòó ðð 	×Ñòó ðó-ó(ô,3r,   r¨   c                  ó2   ‡ — e Zd Zddˆ fd„Zdd„Zdd„Zˆ xZS )r—   c                óZ   •— t         ‰| �  «        || _        || _        g | _        || _        y rN   ©Úsuperr+   r›   rœ   r™   r�   ©r&   r›   rœ   r�   r6   s       €r*   r+   z _PolylineIntersection2d.__init__°  ó+   ø€ Ü‰ÑÔØˆŒØˆŒØ)+ˆÔØˆ�r,   c                ó   — t        |«      S rN   )r   r¬   s     r*   r®   z_PolylineIntersection2d.bbox·  s   € Ü˜VÓ$Ð$r,   c                ó.  ‡ ‡— ‰ j                   |   ‰ j                   |   f}‰ j                  |   ‰ j                  |   f}t        ||d‰ j                  ¬«      Š‰�<t	        ˆˆ fd„‰ j
                  D «       «      s‰ j
                  j                  ‰«       y y y )NF©Úvirtualr�   c              3  óX   •K  — | ]!  }‰j                  |‰j                  ¬ «      –— Œ# y­w©)r�   N©r#   r�   ©r�   ÚipÚpr&   s     €€r*   rƒ   z<_PolylineIntersection2d.line_intersection.<locals>.<genexpr>À  ó'   øè ø€ ð %
Ù:L°BˆA�I‰I�b $§,¡,ˆI×/Ñ:Lùó   ƒ'*)r›   rœ   r   r�   Úanyr™   r$   ©r&   r±   r²   r³   r´   Úline1Úline2rà   s   `      @r*   rµ   z)_PolylineIntersection2d.line_intersectionº  óŒ   ù€ Ø—‘˜‘˜TŸW™W R™[Ð(ˆØ—‘˜‘˜TŸW™W R™[Ð(ˆÜ%Ø�5 %°·±ô
ˆð ˆ=¤ô %
Ø:>×:LÒ:Ló%
ô "
ð ×Ñ×%Ñ% aÕ(ð"
ˆ=r,   ©g»½×Ùß|Û=)r›   úSequence[Vec2]rœ   ré   rÌ   rÍ   ©rj   rk   rl   r+   r®   rµ   Ú__classcell__©r6   s   @r*   r—   r—   ¯  s   ø„ öó%÷	)r,   r—   c                  ó2   ‡ — e Zd Zddˆ fd„Zdd„Zdd„Zˆ xZS )r¡   c                óZ   •— t         ‰| �  «        || _        || _        g | _        || _        y rN   rÓ   rÕ   s       €r*   r+   z _PolylineIntersection3d.__init__Ç  rÖ   r,   c                ó   — t        |«      S rN   )r   r¬   s     r*   r®   z_PolylineIntersection3d.bboxÎ  s   € Ü˜6Ó"Ð"r,   c                ó.  ‡ ‡— ‰ j                   |   ‰ j                   |   f}‰ j                  |   ‰ j                  |   f}t        ||d‰ j                  ¬«      Š‰�<t	        ˆˆ fd„‰ j
                  D «       «      s‰ j
                  j                  ‰«       y y y )NFrÙ   c              3  óX   •K  — | ]!  }‰j                  |‰j                  ¬ «      –— Œ# y­wrÜ   rÝ   rÞ   s     €€r*   rƒ   z<_PolylineIntersection3d.line_intersection.<locals>.<genexpr>×  rá   râ   )r›   rœ   r   r�   rã   r™   r$   rä   s   `      @r*   rµ   z)_PolylineIntersection3d.line_intersectionÑ  rç   r,   rè   )r›   úSequence[Vec3]rœ   rò   rÌ   rÍ   rê   rì   s   @r*   r¡   r¡   Æ  s   ø„ öó#÷	)r,   r¡   )r'   zIterable[Vec3]rg   zlist[float]rè   )r›   ré   rœ   ré   rg   z
list[Vec2])r›   rò   rœ   rò   rg   z
list[Vec3])r£   r5   r¤   r5   rg   ztuple[int, int, int, int])(Ú
__future__r   Útypingr   r   r   r   r   rÏ   Útyping_extensionsr	   r
   Únumpyr^   Ú
ezdxf.mathr   r   r   r   r   r   r   r   r   rO   Ú__all__rn   r   r%   rw   r   r   r   ra   r5   r¦   rÎ   r¨   r—   r¡   rp   r,   r*   Ú<module>rù      sþ   ðö #÷õ ó ß 1Û ÷
÷ 
õ 
ó ò€ð €ôo%˜8ô o%ódô ˜(ô ÷
J8ñ J8ð\ 5:ð#Øð#Ø*ð#àó#ð, 5:ð#Øð#Ø*ð#àó#ó*ð
 ˜˜s C¨˜}Ñ-Ð/BÐBÑC€ˆ	Ó C÷=3ñ =3ô@)Ð3ô )ô.)Ð3õ )r,   