Ë
    £èhoJ  ã                  óæ  — U d dl mZ d dlmZmZmZmZmZmZm	Z	 d dl
mZmZ d dlZd dlZd dlmZ d dlmZmZmZ d dlmZmZ d dlmZ d d	lmZmZmZmZmZm Z  d d
l!m"Z"m#Z#m$Z$m%Z% d dl&m'Z' d dl(m)Z)m*Z* d dl+m,Z, d dl-m.Z. d dl/m0Z0 d dl1m2Z2 ddl3m4Z4m5Z5 ddl6m7Z7m8Z8 ddl9m:Z: ddlm;Z; erd dl<m=Z=m>Z>m?Z?m@Z@ d dlAmBZB d dlCmDZD ddgZEeeFeFeFeFeFf   ZGdeHd<    eId«      ZJdZKdZL ed  ed!ejš                  d"¬#«       ed$d d%¬&«       ed'd d%¬&«       ed(d ¬)«       ed*d d%¬&«       ed+ejœ                  ed%ejž                  e¬,«      d-œ«      ZP e eP«      ZQe: G d.„ de7«      «       ZR G d/„ d0e,«      ZSd3d4d1„ZTd3d5d2„ZUy)6é    )Úannotations)ÚTYPE_CHECKINGÚTupleÚSequenceÚIterableÚUnionÚIteratorÚOptional)Ú	TypeAliasÚSelfN)Úcontextmanager)ÚVec3ÚMatrix44ÚZ_AXIS)ÚOCSTransformÚNonUniformScalingError)Ú	validator)ÚDXFAttrÚDXFAttributesÚDefSubclassÚXTypeÚRETURN_DEFAULTÚgroup_code_mapping)ÚSUBCLASS_MARKERÚDXF2000ÚLWPOLYLINE_CLOSEDÚDXFStructureError)ÚTags)ÚDXFTagÚ	DXFVertex)ÚVertexArray)Úvirtual_lwpolyline_entities©Úexplode_entity)ÚEntityQueryé   )Ú
base_classÚSubclassProcessor)Ú
DXFGraphicÚacdb_entity)Úregister_entity)Údefault_copy)ÚDXFNamespaceÚLineÚArcÚ	DXFEntity)ÚAbstractTagWriter)Ú
BaseLayoutÚ
LWPolylineÚFORMAT_CODESr   ÚLWPointTypeÚxysebvÚxyseb)é
   é   é(   é)   é*   ÚAcDbPolylineéZ   Ú__len__)ÚxtypeÚgetteré&   T)ÚdefaultÚoptionalé'   éF   ©rC   é+   éÒ   )r@   rC   rD   r   Úfixer)ÚcountÚ	elevationÚ	thicknessÚflagsÚconst_widthÚ	extrusionc                  óÊ  ‡ — e Zd ZdZdZ eeee«      Z	e
Zˆ fd„Zefd!d„Z	 d"	 	 	 d#ˆ fd„Zd$d„Zd%d„Zd&ˆ fd„Zed'd	„«       Zej*                  d(d
„«       Zed'd„«       Zd)d*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d0d„Zd1d„Z d1d„Z!e"fd2d„Z#e"f	 	 	 	 	 	 	 d3d„Z$e"f	 	 	 	 	 d4d„Z%e&e"fd5d„«       Z'e"fd6d„Z(e"f	 	 	 	 	 d4d„Z)d7d„Z*d8d„Z+d9d„Z,d"d:d „Z-ˆ xZ.S );r3   zDXF LWPOLYLINE entityÚ
LWPOLYLINEc                ó@   •— t         ‰| �  «        t        «       | _        y ©N)ÚsuperÚ__init__ÚLWPolylinePointsÚlwpoints)ÚselfÚ	__class__s    €ú9lib/python3.12/site-packages/ezdxf/entities/lwpolyline.pyrV   zLWPolyline.__init__f   s   ø€ Ü‰ÑÔÜ(Ó*ˆ�ó    c                óp   — t        |t        «      sJ ‚t        j                  | j                  «      |_        y)zCopy lwpoints.N)Ú
isinstancer3   ÚcopyÚdeepcopyrX   )rY   ÚentityÚcopy_strategys      r[   Ú	copy_datazLWPolyline.copy_dataj   s&   € ä˜&¤*Ô-Ð-Ð-ÜŸ-™-¨¯©Ó6ˆ�r\   c                óÚ   •— t         ‰| �  |«      }|rX|j                  d«      }|r,| j                  |«      }|j	                  |t
        |d¬«       |S t        d|j                  › d�«      ‚|S )zŒ
        Adds subclass processing for AcDbPolyline, requires previous base class
        and AcDbEntity processing by parent class.
        é   T)ÚsubclassÚrecoverz/missing 'AcDbPolyline' subclass in LWPOLYLINE(#Ú))rU   Úload_dxf_attribsÚsubclass_by_indexÚload_verticesÚfast_load_dxfattribsÚacdb_lwpolyline_group_codesr   Úhandle)rY   Ú	processorÚdxfÚtagsrZ   s       €r[   ri   zLWPolyline.load_dxf_attribso   s‡   ø€ ô ‰gÑ& yÓ1ˆÙØ×.Ñ.¨qÓ1ˆDÙØ×)Ñ)¨$Ó/�Ø×.Ñ.ØÜ/Ø!Ø ð	 /ô ð ˆ
ô (ØEÀcÇjÁjÀ\ÐQRÐSóð ð ˆ
r\   c                ó@   — t         j                  |«      \  | _        }|S rT   )rW   Ú	from_tagsrX   )rY   rq   Úunprocessed_tagss      r[   rk   zLWPolyline.load_vertices‡   s    € Ü*:×*DÑ*DÀTÓ*JÑ'ˆŒÐ'ØÐr\   c                ó2   — t        | j                  «      dkD  S ©Nr   ©ÚlenrX   )rY   Ú	tagwriters     r[   Úpreprocess_exportzLWPolyline.preprocess_export‹   s   € ô �4—=‘=Ó! AÑ%Ð%r\   c                óD  •— t         ‰| �  |«       |j                  t        t        j
                  «       | j                  j                  |g d¢«       |j                  t        | j                  j                  «       «      «       | j                  j                  |d«       y)z(Export entity specific data as DXF tags.)rK   rN   rO   rL   rM   rP   N)rU   Úexport_entityÚ
write_tag2r   Úacdb_lwpolylineÚnamerp   Úexport_dxf_attribsÚ
write_tagsr   rX   Údxftags)rY   ry   rZ   s     €r[   r|   zLWPolyline.export_entity�   st   ø€ ä‰Ñ˜iÔ(Ø×Ñœ_¬o×.BÑ.BÔCØ�‰×#Ñ#ØÚGô	
ð 	×ÑœT $§-¡-×"7Ñ"7Ó"9Ó:Ô;Ø�‰×#Ñ# I¨{Õ;r\   c                ó,   — | j                  t        «      S )zˆGet/set closed state of polyline.  A closed polyline has a connection
        segment from the last vertex to the first vertex.
        ©Úget_flag_stater   ©rY   s    r[   ÚclosedzLWPolyline.closed›   ó   € ð
 ×"Ñ"Ô#4Ó5Ð5r\   c                ó0   — | j                  t        |«       y rT   )Úset_flag_stater   )rY   Ústatuss     r[   r‡   zLWPolyline.closed¢   s   € à×ÑÔ-¨vÕ6r\   c                ó,   — | j                  t        «      S )z]Get closed state of LWPOLYLINE.
        Compatibility interface to :class:`Polyline`
        r„   r†   s    r[   Ú	is_closedzLWPolyline.is_closed¦   rˆ   r\   c                ó   — || _         y)z]Set closed state of LWPOLYLINE.
        Compatibility interface to :class:`Polyline`
        N)r‡   )rY   Ústates     r[   ÚclosezLWPolyline.close­   s   € ð ˆ�r\   c                ó:   — t        d„ | j                  D «       «      S )z2Returns ``True`` if LWPOLYLINE has an arc segment.c              3  ó>   K  — | ]  \  }}}}}t        |«      –— Œ y ­wrT   )Úbool©Ú.0ÚxÚyÚsÚeÚbs         r[   Ú	<genexpr>z%LWPolyline.has_arc.<locals>.<genexpr>¶   s   è ø€ Ð>±™}˜q ! Q¨¨1”4˜—7±ùs   ‚)ÚanyrX   r†   s    r[   Úhas_arczLWPolyline.has_arc³   s   € ô Ñ>°·²Ó>Ó>Ð>r\   c                ó¢   — | j                   j                  d«      r| j                   j                  dk7  S t        d„ | j                  D «       «      S )z�Returns ``True`` if LWPOLYLINE has any segment with width attributes
        or the DXF attribute const_width is not 0.

        rO   ç        c              3  ó4   K  — | ]  \  }}}}}|xs |–— Œ y ­wrT   © r”   s         r[   r›   z'LWPolyline.has_width.<locals>.<genexpr>Â   s!   è ø€ Ð?±¡  1 a¨¨A�A’F˜“F±ùs   ‚)rp   ÚhasattrrO   rœ   rX   r†   s    r[   Ú	has_widthzLWPolyline.has_width¸   sB   € ð �8‰8×Ñ˜MÔ*ð —8‘8×'Ñ'¨3Ñ.Ð.ÜÑ?°·²Ó?Ó?Ð?r\   c                ó,   — t        | j                  «      S )z!Returns count of polyline points.rw   r†   s    r[   r?   zLWPolyline.__len__Ä   s   € ä�4—=‘=Ó!Ð!r\   c                ó,   — t        | j                  «      S )zAReturns iterable of tuples (x, y, start_width, end_width, bulge).)ÚiterrX   r†   s    r[   Ú__iter__zLWPolyline.__iter__È   s   € ä�D—M‘MÓ"Ð"r\   c                ó    — | j                   |   S )a  Returns point at position `index` as (x, y, start_width, end_width,
        bulge) tuple. start_width, end_width and bulge is 0 if not present,
        supports extended slicing. Point format is fixed as "xyseb".

        All coordinates in :ref:`OCS`.

        ©rX   ©rY   Úindexs     r[   Ú__getitem__zLWPolyline.__getitem__Ì   s   € ð �}‰}˜UÑ#Ð#r\   c                ó4   — t        |«      | j                  |<   y)a  
        Set point at position `index` as (x, y, [start_width, [end_width,
        [bulge]]]) tuple. If start_width or end_width is 0 or left off the
        default width value is used. If the bulge value is left off, bulge is 0
        by default (straight line).
        Does NOT support extend slicing. Point format is fixed as "xyseb".

        All coordinates in :ref:`OCS`.

        Args:
            index: point index
            value: point value as (x, y, [start_width, [end_width, [bulge]]]) tuple

        N)Úcompile_arrayrX   )rY   r«   Úvalues      r[   Ú__setitem__zLWPolyline.__setitem__Ö   s   € ô  -¨UÓ3ˆ�‰�eÒr\   c                ó   — | j                   |= y)z<Delete point at position `index`, supports extended slicing.Nr©   rª   s     r[   Ú__delitem__zLWPolyline.__delitem__ç   s   € à�M‰M˜%Ñ r\   c              #  ó2   K  — | D ]  }|d   |d   f–— Œ y­w)zŽ
        Returns iterable of all polyline points as (x, y) tuples in :ref:`OCS`
        (:attr:`dxf.elevation` is the z-axis value).

        r   r&   Nr¡   )rY   Úpoints     r[   ÚverticeszLWPolyline.verticesë   s%   è ø€ ó ˆEØ˜‘(˜E !™HÐ$Ó$ñ ùs   ‚c              #  ó¾   K  — | j                  «       }| j                  dd¬«      }| j                  «       D ]#  \  }}|j                  t	        |||«      «      –— Œ% y­w)zGReturns iterable of all polyline points as Vec3(x, y, z) in :ref:`WCS`.rL   rŸ   rG   N)ÚocsÚget_dxf_attribrµ   Úto_wcsr   )rY   r·   rL   r–   r—   s        r[   Úvertices_in_wcszLWPolyline.vertices_in_wcsô   sR   è ø€ à�h‰h‹jˆØ×'Ñ'¨¸SÐ'ÓAˆ	Ø—M‘M–O‰DˆAˆqØ—*‘*œT ! Q¨	Ó2Ó3Ó3ñ $ùs   ‚AAc              #  ó€   K  — | j                  dd¬«      }| j                  «       D ]  \  }}t        |||«      –— Œ y­w)zGReturns iterable of all polyline points as Vec3(x, y, z) in :ref:`OCS`.rL   rŸ   rG   N)r¸   rµ   r   )rY   rL   r–   r—   s       r[   Úvertices_in_ocszLWPolyline.vertices_in_ocsû   s>   è ø€ à×'Ñ'¨¸SÐ'ÓAˆ	Ø—M‘M–O‰DˆAˆqÜ�q˜!˜YÓ'Ó'ñ $ùs   ‚<>c                ó>   — | j                   j                  ||¬«       y)a%  Append `point` to polyline, `format` specifies a user defined
        point format.

        All coordinates in :ref:`OCS`.

        Args:
            point: (x, y, [start_width, [end_width, [bulge]]]) tuple
            format: format string, default is "xyseb", see: `format codes`_

        ©ÚformatN©rX   Úappend)rY   r´   r¿   s      r[   rÁ   zLWPolyline.append  s   € ð 	�‰×Ñ˜U¨6ÐÕ2r\   c                óV   — t        ||¬«      }| j                  j                  ||«       y)a1  Insert new point in front of positions `pos`, `format` specifies a
        user defined point format.

        All coordinates in :ref:`OCS`.

        Args:
            pos: insert position
            point: point data
            format: format string, default is "xyseb", see: `format codes`_

        r¾   N)r®   rX   Úinsert)rY   Úposr´   r¿   Údatas        r[   rÃ   zLWPolyline.insert  s$   € ô ˜U¨6Ô2ˆØ�‰×Ñ˜S $Õ'r\   c                óL   — |D ]  }| j                   j                  ||¬«       Œ! y)a`  
        Append new `points` to polyline, `format` specifies a user defined
        point format.

        All coordinates in :ref:`OCS`.

        Args:
            points: iterable of point, point is (x, y, [start_width, [end_width,
                [bulge]]]) tuple
            format: format string, default is "xyseb", see: `format codes`_

        r¾   NrÀ   )rY   Úpointsr¿   r´   s       r[   Úappend_pointszLWPolyline.append_points  s%   € ó ˆEØ�M‰M× Ñ  ¨vÐ Õ6ñ r\   c              #  ó^   K  — | j                  |¬«      }|–— | j                  ||¬«       y­w)zîContext manager for polyline points. Returns a standard Python list
        of points, according to the format string.

        All coordinates in :ref:`OCS`.

        Args:
            format: format string, see `format codes`_

        r¾   N)Ú
get_pointsÚ
set_points)rY   r¿   rÇ   s      r[   rÇ   zLWPolyline.points1  s-   è ø€ ð —‘¨�Ó/ˆØŠØ�‰˜ vˆÕ.ùs   ‚+-c                óV   — | j                   D �cg c]  }t        ||¬«      ‘Œ c}S c c}w )a'  Returns all points as list of tuples, format specifies a user
        defined point format.

        All points in :ref:`OCS` as (x, y) tuples (:attr:`dxf.elevation` is
        the z-axis value).

        Args:
            format: format string, default is "xyseb", see `format codes`_

        r¾   )rX   Úformat_point)rY   r¿   Úps      r[   rÊ   zLWPolyline.get_points@  s'   € ð 9=¿ºÓF¹°1”˜Q vÖ.¸ÑFÐFùÒFs   �&c                ó^   — | j                   j                  «        | j                  ||¬«       y)a(  Remove all points and append new `points`.

        All coordinates in :ref:`OCS`.

        Args:
            points: iterable of point, point is (x, y, [start_width, [end_width,
                [bulge]]]) tuple
            format: format string, default is "xyseb", see `format codes`_

        r¾   N)rX   ÚclearrÈ   )rY   rÇ   r¿   s      r[   rË   zLWPolyline.set_pointsM  s'   € ð 	�‰×ÑÔØ×Ñ˜6¨&ÐÕ1r\   c                ó8   — | j                   j                  «        y)zRemove all points.N)rX   rÐ   r†   s    r[   rÐ   zLWPolyline.clear]  s   € à�‰×ÑÕr\   c                ó(  ‡— | j                   }t        | j                   j                  |«      Š‰j                  s| j                  rt        d«      ‚t        ˆfd„| j                  «       D «       «      }g }t        || j                  «      D ]Y  \  }}|\  }}}}	}
‰j                  |«      }‰j                  |	«      }	|j                  |j                  |j                  ||	|
f«       Œ[ | j                  |«       |r|d   j                  |_        |j#                  d«      r ‰j                  |j$                  «      |_        |j#                  d«      r ‰j'                  |j(                  «      |_        ‰j*                  |_        | j-                  |«       | S )aš  Transform the LWPOLYLINE entity by transformation matrix `m` inplace.

        A non-uniform scaling is not supported if the entity contains circular
        arc segments (bulges).

        Args:
            m: transformation :class:`~ezdxf.math.Matrix44`

        Raises:
            NonUniformScalingError: for non-uniform scaling of entity containing
                circular arc segments (bulges)

        zHLWPOLYLINE containing arcs (bulges) does not support non uniform scalingc              3  ó@   •K  — | ]  }‰j                  |«      –— Œ y ­wrT   )Útransform_vertex)r•   Úvr·   s     €r[   r›   z'LWPolyline.transform.<locals>.<genexpr>w  s   øè ø€ ÐPÑ9O°A˜×,Ñ,¨Q×/Ñ9Oùs   ƒr   rO   rM   )rp   r   rP   Úscale_uniformr�   r   Úlistr¼   ÚziprX   Útransform_widthrÁ   r–   r—   rË   ÚzrL   r¢   rO   Útransform_thicknessrM   Únew_extrusionÚpost_transform)rY   Úmrp   rµ   rX   rÕ   rÎ   Ú_Ústart_widthÚ	end_widthÚbulger·   s              @r[   Ú	transformzLWPolyline.transforma  sQ  ø€ ð �h‰hˆÜ˜4Ÿ8™8×-Ñ-¨qÓ1ˆØ× Ò  T§\¢\Ü(ØZóð ô
 ÓP¸×9MÑ9MÔ9OÓPÓPˆØˆÜ˜ $§-¡-Ö0‰DˆAˆqØ23Ñ/ˆAˆq�+˜y¨%à×-Ñ-¨kÓ:ˆKØ×+Ñ+¨IÓ6ˆIØ�O‰O˜QŸS™S !§#¡# {°I¸uÐEÕFð 1ð 	�‰˜Ô!ñ Ø$ Q™KŸM™MˆCŒMà�;‰;�}Ô%Ø!×1Ñ1°#·/±/ÓBˆCŒOà�;‰;�{Ô#Ø×3Ñ3°C·M±MÓBˆCŒMØ×)Ñ)ˆŒØ×Ñ˜AÔØˆr\   c              #  óV   K  — t        | «      D ]  }|j                  | «       |–— Œ y­w)a   Yields the graphical representation of LWPOLYLINE as virtual DXF
        primitives (LINE or ARC).

        These virtual entities are located at the original location, but are not
        stored in the entity database, have no handle and are not assigned to
        any layout.

        N)r"   Úset_source_of_copy)rY   r™   s     r[   Úvirtual_entitieszLWPolyline.virtual_entities�  s*   è ø€ ô -¨TÖ2ˆAØ× Ñ  Ô&Ø‹Gñ 3ùs   ‚')c                ó   — t        | |«      S )aæ  Explode the LWPOLYLINE entity as DXF primitives (LINE or ARC) into
        the target layout, if the target layout is ``None``, the target layout
        is the layout of the source entity. This method destroys the source entity.

        Returns an :class:`~ezdxf.query.EntityQuery` container referencing all DXF
        primitives.

        Args:
            target_layout: target layout for the DXF primitives, ``None`` for
                same layout as the source entity.

        r#   )rY   Útarget_layouts     r[   ÚexplodezLWPolyline.explodeœ  s   € ô ˜d MÓ2Ð2r\   )ra   r   ÚreturnÚNonerT   )ro   zOptional[SubclassProcessor]rê   r-   )rq   r   rê   r   )ry   r1   rê   r“   )ry   r1   rê   rë   )rê   r“   )r‹   r“   rê   rë   )T)r�   r“   rê   rë   )rê   Úint)rê   zIterator[LWPointType])r«   rì   rê   r5   )r«   rì   r¯   úSequence[float]rê   rë   )r«   rì   rê   rë   )rê   zIterator[tuple[float, float]])rê   zIterator[Vec3]©r´   rí   r¿   Ústrrê   rë   )rÄ   rì   r´   rí   r¿   rï   rê   rë   )rÇ   zIterable[Sequence[float]]r¿   rï   rê   rë   )r¿   rï   rê   zIterator[list[Sequence[float]]])r¿   rï   rê   zlist[Sequence[float]])rê   rë   )rÞ   r   rê   r3   )rê   zIterator[Union[Line, Arc]])rè   zOptional[BaseLayout]rê   r%   )/Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚDXFTYPEr   r'   r*   r~   Ú
DXFATTRIBSr   ÚMIN_DXF_VERSION_FOR_EXPORTrV   r,   rc   ri   rk   rz   r|   Úpropertyr‡   Úsetterr�   r�   r�   r£   r?   r§   r¬   r°   r²   rµ   rº   r¼   ÚDEFAULT_FORMATrÁ   rÃ   rÈ   r   rÇ   rÊ   rË   rÐ   rã   ræ   ré   Ú__classcell__©rZ   s   @r[   r3   r3   ^   s©  ø„ áà€GÙ˜z¨;¸ÓH€JØ!(Ðô+ð 5Aô 7ð 8<ðØ4ðà	õó0 ó&õ
	<ð ò6ó ð6ð ‡]�]ò7ó ð7ð ò6ó ð6ôð ò?ó ð?ð ò	@ó ð	@ó"ó#ó$ó4ó"!ó%ó4ó(ð <Jô 3ð ?Mð(Øð(Ø.ð(Ø8;ð(à	ó(ð$ @Nð7Ø/ð7Ø9<ð7à	ó7ð$ Ø#1ó /ó ð/ð (6ô Gð @Nð2Ø/ð2Ø9<ð2à	ó2ó ó,ó\÷3ð 3r\   c                  óV   ‡ — e Zd ZdZdZdZdZdZdZe	d
d„«       Z
efdˆ fd„Zdd	„Zˆ xZS )rW   )Úvaluesr8   r:   r;   r<   é   c                óŠ  ‡ ‡— dˆˆ fd„}t        «       }g }d}i Š|D ]‚  }|j                  t        v r]|j                  dk(  r4|�|j                   ||«      «       t	        |j
                  dd «      }i ŠŒX|j
                  ‰|j                  <   Œr|j                  |«       Œ„ |�|j                   ||«      «        ‰ |¬«      |fS )zSetup point array from tags.c                ó
  •— | j                  ‰j                  ‰j                  d«      «       | j                  ‰j                  ‰j                  d«      «       | j                  ‰j                  ‰j                  d«      «       | S rv   )rÁ   ÚgetÚSTART_WIDTH_CODEÚEND_WIDTH_CODEÚ
BULGE_CODE)r´   ÚattribsÚclss    €€r[   Úbuild_vertexz0LWPolylinePoints.from_tags.<locals>.build_vertex¸  s]   ø€ Ø�L‰L˜Ÿ™ S×%9Ñ%9¸1Ó=Ô>Ø�L‰L˜Ÿ™ S×%7Ñ%7¸Ó;Ô<Ø�L‰L˜Ÿ™ S§^¡^°QÓ7Ô8ØˆLr\   Nr8   r   re   )rÅ   )r´   úlist[float]rê   r  )r   ÚcodeÚLWPOINTCODESrÁ   r×   r¯   )r  rq   r  rt   rµ   r´   Útagr  s   `      @r[   rs   zLWPolylinePoints.from_tags´  s¼   ù€ ö	ô  ›6ÐØ)+ˆØ$(ˆØ#%ˆÛˆCØ�x‰xœ<Ñ'Ø—8‘8˜r’>ØÐ(Ø Ÿ™©°UÓ(;Ô<ä  §¡¨1¨Q Ó0�EØ ‘Gà(+¯	©	�G˜CŸH™HÒ%à ×'Ñ'¨Õ,ð ð ÐØ�O‰O™L¨Ó/Ô0Ù˜Ô!Ð#3Ð3Ð3r\   c                ó:   •— t         ‰| �  t        ||¬«      «       y )Nr¾   )rU   rÁ   r®   )rY   r´   r¿   rZ   s      €r[   rÁ   zLWPolylinePoints.appendÒ  s   ø€ Ü‰‰”} U°6Ô:Õ;r\   c              #  óü   K  — | D ]s  }|\  }}}}}t        | j                  ||f«      –— |s|r0t        | j                  |«      –— t        | j                  |«      –— |sŒ\t        | j
                  |«      –— Œu y ­wrT   )r    ÚVERTEX_CODEr   r  r  r  )rY   r´   r–   r—   rà   rá   râ   s          r[   r‚   zLWPolylinePoints.dxftagsÕ  sx   è ø€ ÛˆEØ27Ñ/ˆAˆq�+˜y¨%Ü˜D×,Ñ,¨q°!¨fÓ5Ò5Ù™iô ˜T×2Ñ2°KÓ@Ò@Ü˜T×0Ñ0°)Ó<Ò<ÚÜ˜TŸ_™_¨eÓ4Ó4ñ ùs   ‚AA<Á!A<)rq   zIterable[DXFTag]rê   ztuple[Self, Tags]rî   )rê   zIterator[DXFTag])rð   rñ   rò   Ú	__slots__r  r  r  r  ÚVERTEX_SIZEÚclassmethodrs   rù   rÁ   r‚   rú   rû   s   @r[   rW   rW   ¬  sD   ø„ Ø€IØ€KØÐØ€NØ€JØ€Kàò4ó ð4ð: <Jö <÷
5r\   rW   c                ót   ‡— | \  }}}}}||f}t        «       Št        ˆfd„|j                  «       D «       «      S )a³  Reformat point components.

    Format codes:

        - ``x`` = x-coordinate
        - ``y`` = y-coordinate
        - ``s`` = start width
        - ``e`` = end width
        - ``b`` = bulge value
        - ``v`` = (x, y) as tuple

    Args:
        point: list or tuple of (x, y, start_width, end_width, bulge)
        format: format string, default is "xyseb"

    Returns:
        Sequence[float]: tuple of selected components

    c              3  ó:   •K  — | ]  }|t         v sŒ‰|   –— Œ y ­wrT   )r4   )r•   r	  Úvarss     €r[   r›   zformat_point.<locals>.<genexpr>ù  s   øè ø€ ÐO© ¸$Ä,Ò:N��d•©ùs   ƒ‘
)ÚlocalsÚtupleÚlower)	r´   r¿   r–   r—   r˜   r™   rš   rÕ   r  s	           @r[   rÍ   rÍ   â  s;   ø€ ð( �M€A€qˆ!ˆQ�Ø	
ˆAˆ€AÜ‹8€DÜÓO¨¯©¬ÓOÓOÐOr\   c                óH  — t        j                   dd«      }|j                  «       D �cg c]  }|t        v sŒ|‘Œ }}t        || «      D ]Q  \  }}|t        vrŒ|dk(  r*t	        |«      }|j
                  |d<   |j                  |d<   Œ>||dj                  |«      <   ŒS |S c c}w )aØ  Gather point components from input data.

    Format codes:

        - ``x`` = x-coordinate
        - ``y`` = y-coordinate
        - ``s`` = start width
        - ``e`` = end width
        - ``b`` = bulge value
        - ``v`` = (x, y [,z]) tuple (z-axis is ignored)

    Args:
        data: list or tuple of point components
        format: format string, default is "xyseb"

    Returns:
        array.array: array.array('d', (x, y, start_width, end_width, bulge))

    Úd)rŸ   rŸ   rŸ   rŸ   rŸ   rÕ   r   r&   r7   )Úarrayr  r4   rØ   r   r–   r—   r«   )rÅ   r¿   Úar	  r¯   Úvertexs         r[   r®   r®   ü  s    € ô( 	�‰�CÐ2Ó3€AØ%Ÿ|™|œ~ÓF™~�t°¼Ò1EŠd˜~€FÐFÜ˜6 4Ö(‰ˆˆeØ”|Ñ#ØØ�3Š;Ü˜%“[ˆFØ—8‘8ˆAˆa‰DØ—8‘8ˆAˆaŠDà%*ˆAˆg�m‰m˜DÓ!Ò"ð )ð €Hùò Gs
   ©B·B)r7   )r´   rí   r¿   rï   rê   rí   )rÅ   rí   rê   zarray.array)VÚ
__future__r   Útypingr   r   r   r   r   r	   r
   Útyping_extensionsr   r   r  r_   Ú
contextlibr   Ú
ezdxf.mathr   r   r   Úezdxf.math.transformtoolsr   r   Úezdxf.lldxfr   Úezdxf.lldxf.attributesr   r   r   r   r   r   Úezdxf.lldxf.constr   r   r   r   Úezdxf.lldxf.tagsr   Úezdxf.lldxf.typesr   r    Úezdxf.lldxf.packedtagsr!   Úezdxf.render.polyliner"   Úezdxf.exploder$   Úezdxf.queryr%   Ú	dxfentityr'   r(   Údxfgfxr)   r*   Úfactoryr+   r,   Úezdxf.entitiesr-   r.   r/   r0   Úezdxf.lldxf.tagwriterr1   Úezdxf.layoutsr2   Ú__all__Úfloatr5   Ú__annotations__Ú	frozensetr4   rù   r
  ÚcallbackÚpoint3dÚis_not_null_vectorr~   rm   r3   rW   rÍ   r®   r¡   r\   r[   Ú<module>r9     sn  ðö #÷÷ ñ ÷ .Û Û Ý %ß -Ñ -ß JÝ !÷÷ ÷ó õ "ß /Ý .Ý =Ý (Ý #ß 4ß +Ý $Ý áßAÓAÝ7Ý(à˜Ð
(€à˜u e¨U°E¸5Ð@ÑA€ˆYÓ Aá˜Ó"€Ø€Ø#€ñ
 Øñ ˜ 5§>¡>¸)ÔDá˜R¨°TÔ:á˜R¨°TÔ:ñ ˜ QÔ'ñ ˜r¨1°tÔ<ÙØØ—-‘-ØØØ×2Ñ2Ø ô
ñó€ñ< 1°ÓAÐ ð ôJ3�ó J3ó ðJ3ôZ
35�{ô 35ôlPõ4r\   