ó
    Ÿðh¢  ã                  ó`   • S SK Jr  S SKJr  S SKJrJr  S SKJrJ	r	  S/r
 S       S	S jjrg)
é    )Úannotations)ÚIterable)ÚVec2ÚUVec)ÚConstructionRayÚParallelRaysErrorÚoffset_vertices_2dc              #  ó   #   • [         R                  " U 5      n[        U5      S:  a  [        S5      eU(       a0  US   R	                  US   5      (       d  UR                  US   5        [        5       n[        USS USS 5       H=  u  pVXe-
  R                  5       R                  U5      nUR                  XW-   Xg-   45        M?     U(       a  UR                  SUS   5        U(       d
  US   S   v •  [        U5      S:”  aF  [        USS USS 5       H0  u  u  p‰u  p« [        X‰5      R                  [        X«5      5      v •  M2     U(       d  US   S   v •  gg! [         a%    U	v •  U	R	                  U
5      (       d  U
v •   Mr   Mu  f = f7f)aò  Yields vertices of the offset line to the shape defined by `vertices`.
The source shape consist of straight segments and is located in the xy-plane,
the z-axis of input vertices is ignored. Takes closed shapes into account if
argument `closed` is ``True``, which yields intersection of first and last
offset segment as first vertex for a closed shape. For closed shapes the
first and last vertex can be equal, else an implicit closing segment from
last to first vertex is added. A shape  with equal first and last vertex is
not handled automatically as closed shape.

.. warning::

    Adjacent collinear segments in `opposite` directions, same as a turn by
    180 degree (U-turn), leads to unexpected results.

Args:
    vertices: source shape defined by vertices
    offset: line offset perpendicular to direction of shape segments defined
        by vertices order, offset > ``0`` is 'left' of line segment,
        offset < ``0`` is 'right' of line segment
    closed: ``True`` to handle as closed shape

é   z2 or more vertices required.r   éÿÿÿÿNé   )r   ÚlistÚlenÚ
ValueErrorÚiscloseÚappendÚzipÚ
orthogonalÚ	normalizeÚinsertr   Ú	intersectr   )ÚverticesÚoffsetÚclosedÚ	_verticesÚoffset_segmentsÚstartÚendÚ
offset_vecÚstart1Úend1Ústart2Úend2s               ÚE/var/www/html/env/lib/python3.13/site-packages/ezdxf/math/offset2d.pyr	   r	      sŒ  é € ô2 —	’	˜(Ó#€IÜ
ˆ9ƒ~˜ÓÜÐ7Ó8Ð8æi ‘l×*Ñ*¨9°R©=×9Ñ9à×Ñ˜ 1™Ô&ô “f€OÜ˜) C R˜.¨)°A°B¨-Ö8‰
ˆØ‘k×-Ñ-Ó/×9Ñ9¸&ÓAˆ
Ø×Ñ Ñ 2°CÑ4DÐEÖFñ 9ö Ø×Ñ˜q /°"Ñ"5Ô6ö Ø˜aÑ  Ñ#Ò#ô ˆ?Ó˜aÓÜ.1Ø˜C˜RÐ  /°!°"Ð"5ö/
Ñ*‰NˆV™N˜Vð!Ü% fÓ3×=Ñ=Ü# FÓ1óô ñ	/
ö Ø˜bÑ! !Ñ$Ó$ð øô %ó !Ø’
Ø—|‘| F×+Ñ+à •Lò ,ð!üs*   ‚DFÄ %EÅFÅ(FÆFÆ
FÆFN)F)r   zIterable[UVec]r   Úfloatr   ÚboolÚreturnzIterable[Vec2])Ú
__future__r   Útypingr   Ú
ezdxf.mathr   r   Úezdxf.math.liner   r   Ú__all__r	   © ó    r$   Ú<module>r/      sH   ðõ #Ý ß !ß >ð  Ð
 €ð =Bð?%Øð?%Ø&+ð?%Ø59ð?%àö?%r.   