§
    'àj¢  ã                  óP   — d dl mZ d dlmZ d dlmZmZ d dlmZm	Z	 dgZ
	 ddd„ZdS )é    )Úannotations)ÚIterable)ÚVec2ÚUVec)ÚConstructionRayÚParallelRaysErrorÚoffset_vertices_2dFÚverticesúIterable[UVec]ÚoffsetÚfloatÚclosedÚboolÚreturnúIterable[Vec2]c              #  ó°  K  — t          j        | ¦  «        }t          |¦  «        dk     rt          d¦  «        ‚|r<|d                              |d         ¦  «        s|                     |d         ¦  «         t          ¦   «         }t          |dd…         |dd…         ¦  «        D ]L\  }}||z
                       ¦   «                              |¦  «        }|                     ||z   ||z   f¦  «         ŒM|r| 	                    d|d         ¦  «         |s|d         d         V — t          |¦  «        dk    rt          |dd…         |dd…         ¦  «        D ]l\  \  }}	\  }
}	 t          ||	¦  «                             t          |
|¦  «        ¦  «        V — Œ@# t          $ r  |	V — |	                     |
¦  «        s|
V — Y Œiw xY w|s|d         d         V — dS dS )a6  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   )r
   r   r   Ú	_verticesÚoffset_segmentsÚstartÚendÚ
offset_vecÚstart1Úend1Ústart2Úend2s               úM/DATA/AppData/hermes/venv/lib/python3.11/site-packages/ezdxf/math/offset2d.pyr	   r	      sD  è è € õ2 ”	˜(Ñ#Ô#€IÝ
ˆ9~„~˜ÒÐÝÐ7Ñ8Ô8Ð8àð 'i ”l×*Ò*¨9°R¬=Ñ9Ô9ð 'à×Ò˜ 1œÑ&Ô&Ð&õ ‘f”f€OÝ˜) C R Cœ.¨)°A°B°B¬-Ñ8Ô8ð Gð G‰
ˆˆsØ˜E‘k×-Ò-Ñ/Ô/×9Ò9¸&ÑAÔAˆ
Ø×Ò ¨
Ñ 2°C¸*Ñ4DÐEÑFÔFÐFÐFàð 7Ø×Ò˜q /°"Ô"5Ñ6Ô6Ð6ð ð $Ø˜aÔ  Ô#Ð#Ð#Ð#õ ˆ?ÑÔ˜aÒÐÝ.1Ø˜C˜R˜CÔ  /°!°"°"Ô"5ñ/
ô /
ð 	!ð 	!Ñ*‰NˆVT™N˜V Tð!Ý% f¨dÑ3Ô3×=Ò=Ý# F¨DÑ1Ô1ñô ð ð ð ð øõ %ð !ð !ð !Ø


Ø—|’| FÑ+Ô+ð !à LLLøøð	!øøøð ð %Ø˜bÔ! !Ô$Ð$Ð$Ð$Ð$Ð$ð%ð %s   Å!3FÆ'F?Æ>F?N)F)r
   r   r   r   r   r   r   r   )Ú
__future__r   Útypingr   Ú
ezdxf.mathr   r   Úezdxf.math.liner   r   Ú__all__r	   © ó    r)   ú<module>r1      sŽ   ðð #Ð "Ð "Ð "Ð "Ð "Ø Ð Ð Ð Ð Ð Ø !Ð !Ð !Ð !Ð !Ð !Ð !Ð !Ø >Ð >Ð >Ð >Ð >Ð >Ð >Ð >ð  Ð
 €ð =Bð?%ð ?%ð ?%ð ?%ð ?%ð ?%ð ?%r0   