Ë
    £èhyG  ã                  óZ  — d dl mZ d dlmZmZ d dlZd dlmZ d dlm	Z	 d dl
mZ d dl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 d	lmZ g d
¢ZdZdZdZdZdZ ejB                   G d„ d«      «       Z" G d„ d«      Z#dd„Z$	 	 	 	 	 	 dd„Z%dd„Z&dd„Z'd d„Z(	 	 	 	 d!d„Z)	 	 	 	 	 	 	 	 d"d„Z*d#d„Z+y)$é    )Úannotations)ÚIterableÚSequenceN)Úconst)ÚTags)Údxftag)ÚSpatialFilterÚ	DXFEntityÚ
DictionaryÚInsertÚXRecord)ÚVec2ÚVec3ÚUVecÚZ_AXISÚMatrix44ÚBoundingBox2d)ÚRoundtripXRecord)Úget_spatial_filterÚXClipÚClippingPathÚACAD_FILTERÚACAD_XREC_ROUNDTRIPÚACAD_INVERTEDCLIP_ROUNDTRIPÚ#ACAD_INVERTEDCLIP_ROUNDTRIP_COMPAREÚSPATIALc                  óx   — e Zd ZU dZ e«       Zded<    e«       Zded<    e«       Zded<   dZ	ded<   dd	„Z
dd
„Zy)r   aÝ  Stores the SPATIAL_FILTER clipping paths in original form that I still don't fully
    understand for `inverted` clipping paths. All boundary paths are simple polygons as a
    sequence of :class:`~ezdxf.math.Vec2`.

    Attributes:
        vertices: Contains the boundary polygon for regular clipping paths.
            Contains the outer boundary path for inverted clippings paths - but not always!
        inverted_clip:
            Contains the inner boundary for inverted clipping paths - but not always!
        inverted_clip_compare:
            Contains the combined inner- and the outer boundaries for inverted
            clipping paths - but not always!
        is_inverted_clip: ``True`` for inverted clipping paths

    úSequence[Vec2]ÚverticesÚinverted_clipÚinverted_clip_compareFÚboolÚis_inverted_clipc                ó¨   — | j                   s| j                  S | j                  }t        | j                  «      t        |«      k  r| j                  }|S )z7Returns the inner clipping polygon as sequence of Vec2.)r#   r   Ú	bbox_arear    )ÚselfÚinner_polygons     ú+lib/python3.12/site-packages/ezdxf/xclip.pyr'   zClippingPath.inner_polygon/   sI   € ð ×$Ò$Ø—=‘=Ð ØŸ™ˆÜ�T×'Ñ'Ó(¬9°]Ó+CÒCØ ×.Ñ.ˆMØÐó    c                ón   — | j                   st        | j                  «      S t        | j                  «      S )z-Returns the maximum extents as BoundingBox2d.)r#   r   r   r!   ©r&   s    r(   Úouter_boundszClippingPath.outer_bounds:   s-   € à×$Ò$Ü  §¡Ó/Ð/ô ˜T×7Ñ7Ó8Ð8r)   N©Úreturnr   )r.   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Útupler   Ú__annotations__r    r!   r#   r'   r,   © r)   r(   r   r      sC   … ññ   %›w€HˆnÓ&Ù$)£G€M�>Ó+Ù,1«GÐ˜>Ó3Ø"Ð�dÓ"ó	ô9r)   r   c                  óØ   — e Zd ZdZdd„Zdd„Zdd„Ze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dd„Z	 dddœ	 	 	 dd„Zd d„Z	 	 	 	 	 	 d!d„Zdd„Zdd„Zd„ Zy)"r   a}  Helper class to manage the clipping path of INSERT entities.

    Provides a similar functionality as the XCLIP command in CAD applications.

    .. important::

        This class handles only 2D clipping paths.

    The visibility of the clipping path can be set individually for each block
    reference, but the HEADER variable $XCLIPFRAME ultimately determines whether the
    clipping path is displayed or plotted by the application:

    === =============== ===
    0   not displayed   not plotted
    1   displayed       not plotted
    2   displayed       plotted
    === =============== ===

    The default setting is 2.

    c                ó”   — t        |t        «      s!t        j                  dt	        |«      › �«      ‚|| _        t        |«      | _        y )NzINSERT entity required, got )Ú
isinstancer   r   ÚDXFTypeErrorÚstrÚ_insertr   Ú_spatial_filter)r&   Úinserts     r(   Ú__init__zXClip.__init__Z   s=   € Ü˜&¤&Ô)Ü×$Ñ$Ð'CÄCÈÃKÀ=Ð%QÓRÐRØˆŒÜ1°&Ó9ˆÕr)   c                ó   — | j                   S )z‡Returns the underlaying SPATIAL_FILTER entity if the INSERT entity has a
        clipping path and returns ``None`` otherwise.
        ©r<   r+   s    r(   r   zXClip.get_spatial_filter`   s   € ð ×#Ñ#Ð#r)   c                ó–   — d}| j                   j                  �0| j                   j                  j                  j                  dd«      }|S )Né   z$XCLIPFRAME)r;   ÚdocÚheaderÚget)r&   Úpolicys     r(   Úget_xclip_frame_policyzXClip.get_xclip_frame_policyf   s>   € ØˆØ�<‰<×ÑÐ'Ø—\‘\×%Ñ%×,Ñ,×0Ñ0°ÀÓBˆFØˆr)   c                ó   — | j                   duS )z1Returns if the INSERT entity has a clipping path.Nr@   r+   s    r(   Úhas_clipping_pathzXClip.has_clipping_pathl   s   € ð ×#Ñ#¨4Ð/Ð/r)   c                óŠ   — t        | j                  t        «      r)t        | j                  j                  j
                  «      S y)z8Returns ``True`` if block reference clipping is enabled.F)r8   r<   r	   r"   ÚdxfÚis_clipping_enabledr+   s    r(   rL   zXClip.is_clipping_enabledq   s4   € ô �d×*Ñ*¬MÔ:Ü˜×,Ñ,×0Ñ0×DÑDÓEÐEØr)   c                ó\   — t        | j                  «      }|€y|j                  t        «      S )z.Returns ``True`` if clipping path is inverted.F)Úget_roundtrip_xrecordr<   Úhas_sectionr   )r&   Úxrecs     r(   r#   zXClip.is_inverted_clipx   s.   € ô % T×%9Ñ%9Ó:ˆØˆ<ØØ×ÑÔ ;Ó<Ð<r)   c                óp   — t        | j                  t        «      rd| j                  j                  _        yy)z Enable block reference clipping.é   N©r8   r<   r	   rK   rL   r+   s    r(   Úenable_clippingzXClip.enable_clipping€   ó+   € ä�d×*Ñ*¬MÔ:Ø;<ˆD× Ñ ×$Ñ$Õ8ð ;r)   c                óp   — t        | j                  t        «      rd| j                  j                  _        yy)z!Disable block reference clipping.r   NrS   r+   s    r(   Údisable_clippingzXClip.disable_clipping…   rU   r)   c                óê  — g }t        | j                  t        «      s
t        «       S | j                  j                  }t        j                  |j                  | j                  j                  «      «      }t        |«      dk(  rt        |«      }t        |d¬«      }t        | j                  «      }t        |t        «      r3t        |t        |«      |_        t        |t         |«      |_        d|_        |S )zNReturns the clipping path in block coordinates (relative to the block origin).rB   F©r#   T)r8   r<   r	   r   Úinverse_insert_matrixr   r3   Útransform_verticesÚboundary_verticesÚlenÚ
_rect_pathrN   r   Úget_roundtrip_verticesr   r    r   r!   r#   )r&   r   ÚmÚclipping_pathrP   s        r(   Úget_block_clipping_pathzXClip.get_block_clipping_pathŠ   sÔ   € à#%ˆÜ˜$×.Ñ.´Ô>Ü“>Ð!Ø× Ñ ×6Ñ6ˆÜ—:‘:Ø× Ñ  ×!5Ñ!5×!GÑ!GÓHó
ˆô ˆx‹=˜AÒÜ! (Ó+ˆHä$ XÀÔFˆÜ$ T×%9Ñ%9Ó:ˆÜ�dÔ,Ô-Ü*@ØÔ1°1ó+ˆMÔ'ô 3IØÔ9¸1ó3ˆMÔ/ð .2ˆMÔ*ØÐr)   c                óÈ  — t        «       }t        | j                  t        «      st	        ||«      S | j                  «       }| j                  j                  «       }t        j                   |j                  |j                  «      «      }t        |«      dk(  rt        |«      j                  «       }t	        ||j                  ¬«      }|j                  r�t        j                   |j                  |j                  «      «      }t        |«      dk(  rt        |«      j                  «       }||_        t        j                   |j                  |j                   «      «      |_        |S )z‚Returns the clipping path in WCS coordinates (relative to the WCS origin) as
        2D path projected onto the xy-plane.
        rB   rY   )r3   r8   r<   r	   r   rb   r;   Úmatrix44r   r[   r   r]   r   Úrect_verticesr#   r    r!   )r&   r   Úblock_clipping_pathr`   Úwcs_clipping_pathr    s         r(   Úget_wcs_clipping_pathzXClip.get_wcs_clipping_path¢   s'  € ô $)£7ˆÜ˜$×.Ñ.´Ô>Ü ¨(Ó3Ð3Ø"×:Ñ:Ó<ÐØ�L‰L×!Ñ!Ó#ˆÜ—:‘:˜a×2Ñ2Ð3F×3OÑ3OÓPÓQˆÜˆx‹=˜AÒÜ$ XÓ.×<Ñ<Ó>ˆHÜ(ØÐ':×'KÑ'Kô
Ðð ×/Ò/Ü ŸJ™JØ×$Ñ$Ð%8×%FÑ%FÓGóˆMô �=Ó! QÒ&Ü -¨mÓ <× JÑ JÓ L�Ø.;ÐÔ+Ü6:·j±jØ×$Ñ$Ð%8×%NÑ%NÓOó7ÐÔ3ð !Ð r)   c                óì  — | j                   €t        | j                  «      | _         | j                   }|j                  |«       t	        ddd«      |j
                  _        t        |j
                  _        d|j
                  _	        d|j
                  _
        d|j
                  _        d|j
                  _        t        «       }|j                  |«       |j                  |«       | j!                  «        y)a¯  Set clipping path in block coordinates (relative to block origin).

        The clipping path is located in the xy-plane, the z-axis of all vertices will
        be ignored.  The clipping path doesn't have to be closed (first vertex != last vertex).
        Two vertices define a rectangle where the sides are parallel to x- and y-axis.

        Raises:
           DXFValueError: clipping path has less than two vertrices

        Nr   ç        )r<   Únew_spatial_filterr;   Úset_boundary_verticesr   rK   Úoriginr   Ú	extrusionÚhas_front_clipping_planeÚfront_clipping_plane_distanceÚhas_back_clipping_planeÚback_clipping_plane_distancer   Úset_inverse_insert_matrixÚset_transform_matrixÚ_discard_inverted_clip)r&   r   Úspatial_filterr`   s       r(   Úset_block_clipping_pathzXClip.set_block_clipping_path½   sÇ   € ð ×ÑÐ'Ü#5°d·l±lÓ#CˆDÔ Ø×-Ñ-ˆØ×,Ñ,¨XÔ6Ü$(¨¨A¨q£Mˆ×ÑÔ!Ü'-ˆ×ÑÔ$Ø67ˆ×ÑÔ3Ø;>ˆ×ÑÔ8Ø56ˆ×ÑÔ2Ø:=ˆ×ÑÔ7ô
 ‹JˆØ×0Ñ0°Ô3Ø×+Ñ+¨AÔ.Ø×#Ñ#Õ%r)   c                ó&  — | j                   j                  «       }	 |j                  «        t	        j
                  |«      }t        |«      dk(  rt        |«      }| j                  |j                  |«      «       y# t        $ r t        d«      ‚w xY w)a   Set clipping path in WCS coordinates (relative to WCS origin).

        The clipping path is located in the xy-plane, the z-axis of all vertices will
        be ignored. The clipping path doesn't have to be closed (first vertex != last vertex).
        Two vertices define a rectangle where the sides are parallel to x- and y-axis.

        Raises:
           DXFValueError: clipping path has less than two vertrices
           ZeroDivisionError: Block reference transformation matrix is not invertible

        z8Block reference transformation matrix is not invertible.rB   N)
r;   rd   ÚinverseÚZeroDivisionErrorr   Úlistr]   r^   rw   r[   )r&   r   r`   Ú	_verticess       r(   Úset_wcs_clipping_pathzXClip.set_wcs_clipping_pathÛ   s„   € ð �L‰L×!Ñ!Ó#ˆð	Ø�I‰IŒKô
 —I‘I˜hÓ'ˆ	Üˆy‹>˜QÒÜ" 9Ó-ˆIØ×$Ñ$ Q×%9Ñ%9¸)Ó%DÕEøô !ò 	Ü#ØJóð ð	ús   œA; Á;BNF)Úignore_acad_compatibilityc               óÆ  — |du ry| j                  «       }t        |j                  «      dk  rt        j                  d«      ‚|j
                  rt        j                  d«      ‚| j                  j                  €J ‚| j                  j                  j                  d«       d}|€| j                  «       }d}t        |«      }|j                  |j                  «       |j                  st        j                  d	«      ‚|r'|j                  t        |j                  «      |z  «       |j                  }t!        ||«      }| j#                  |«       | j%                  ||«       y)
a,  Invert clipping path. (experimental feature)

        The outer boundary is defined by the bounding box of the given `extents`
        vertices or auto-detected if `extents` is ``None``.

        The `extents` are BLOCK coordinates.
        Requires an existing clipping path and that clipping path cannot be inverted.

        .. warning::

            You have to set the flag `ignore_acad_compatibility` to ``True`` to use
            this feature.  AutoCAD will not load DXF files with inverted clipping paths
            created by ezdxf!!!!

        FNrB   zno clipping path setz!clipping path is already invertedzN
AutoCAD will not load DXF files with inverted clipping paths created by ezdxfrj   gš™™™™™¹?zextents not detectable)rb   r]   r   r   ÚDXFValueErrorr#   r;   rC   Ú add_acad_incompatibility_messageÚ_detect_block_extentsr   ÚextendÚhas_dataÚgrowÚmaxÚsizeÚ#_get_inverted_clip_compare_verticesrw   Ú_set_inverted_clipping_path)r&   Úextentsr~   Úcurrent_clipping_pathÚgrow_factorÚbboxr    r!   s           r(   Úinvert_clipping_pathzXClip.invert_clipping_pathó   s=  € ð$ %¨Ñ-Øà $× <Ñ <Ó >ÐÜÐ$×-Ñ-Ó.°Ò2Ü×%Ñ%Ð&<Ó=Ð=Ø ×1Ò1Ü×%Ñ%Ð&IÓJÐJà�|‰|×ÑÐ+Ð+Ð+Ø�‰×Ñ×9Ñ9Ø]ô	
ð ˆØˆ?Ø×0Ñ0Ó2ˆGð ˆKä˜WÓ%ˆØ�‰Ð)×2Ñ2Ô3Ø�}Š}Ü×%Ñ%Ð&>Ó?Ð?áØ�I‰I”c˜$Ÿ)™)“n {Ñ2Ô3ð .×6Ñ6ˆä CÀDÈ-Ó XÐà×$Ñ$Ð%:Ô;Ø×(Ñ(¨Ð8MÕNr)   c                ób  — ddl m} | j                  }|j                  }|€J d«       ‚t	        «       }|j
                  j                  |j                  j                  «      }|€|S |j                  |d¬«      }|j                  s|S t        j                  |j                  |j                  g«      S )Nr   )r�   zvalid DXF document requiredT)Úfast)Úezdxfr�   r;   rC   r3   ÚblocksrE   rK   ÚnamerŠ   r„   r   ÚextminÚextmax)r&   r�   r=   rC   Úno_verticesÚblockÚ_bboxs          r(   r‚   zXClip._detect_block_extents)  sŽ   € Ýà—‘ˆØ�j‰jˆØˆÐ=Ð =Ó=ˆÜ&+£gˆØ—
‘
—‘˜vŸz™zŸ™Ó/ˆØˆ=ØÐà—‘˜U¨�Ó.ˆØ�~Š~ØÐÜ�z‰z˜5Ÿ<™<¨¯©Ð6Ó7Ð7r)   c                ó  — | j                   }t        |t        «      sJ ‚t        |«      }|€t	        |«      }t        d„ |D «       «      }t        d„ |D «       «      }|j                  t        |«       |j                  t        |«       y )Nc              3  óF   K  — | ]  }t        d t        |«      «      –— Œ y­w©é
   N©r   r   ©Ú.0Úvs     r(   Ú	<genexpr>z4XClip._set_inverted_clipping_path.<locals>.<genexpr>B  s   è ø€ ÐD±m°œ ¤D¨£G×,±mùó   ‚!c              3  óF   K  — | ]  }t        d t        |«      «      –— Œ y­wr›   r�   rž   s     r(   r¡   z4XClip._set_inverted_clipping_path.<locals>.<genexpr>C  s   è ø€ ÐJÑ9I°AœF 2¤t¨A£w×/Ñ9Iùr¢   )	r<   r8   r	   rN   Únew_roundtrip_xrecordr   Úset_sectionr   r   )r&   Úclip_verticesÚcompare_verticesrv   rP   Ú	clip_tagsÚcompare_tagss          r(   r‰   z!XClip._set_inverted_clipping_path9  s{   € ð ×-Ñ-ˆÜ˜.¬-Ô8Ð8Ð8Ü$ ^Ó4ˆØˆ<Ü(¨Ó8ˆDäÑD±mÓDÓDˆ	ÜÑJÑ9IÓJÓJˆØ×ÑÔ4°iÔ@Ø×ÑÔ<¸lÕKr)   c                ó$  — t        | j                  t        «      sy| j                  j	                  «       }|j                  t        «       | j                  j                  j                  }|€J ‚|j                  | j                  «       d| _        y)z»Delete the clipping path. The clipping path doesn't have to exist.

        This method does not discard the extension dictionary of the base entity,
        even when its empty.
        N)
r8   r<   r	   r;   Úget_extension_dictÚdiscardr   rC   ÚentitydbÚdelete_entity)r&   Úxdictr­   s      r(   Údiscard_clipping_pathzXClip.discard_clipping_pathG  sr   € ô ˜$×.Ñ.´Ô>Øà—‘×/Ñ/Ó1ˆØ�‰”kÔ"Ø—<‘<×#Ñ#×,Ñ,ˆØÐ#Ð#Ð#Ø×Ñ˜t×3Ñ3Ô4Ø#ˆÕr)   c                ón   — t        | j                  t        «      r| j                  j                  «        y y ©N)r8   r<   r	   Údiscard_extension_dictr+   s    r(   ru   zXClip._discard_inverted_clipW  s)   € Ü�d×*Ñ*¬MÔ:Ø× Ñ ×7Ñ7Õ9ð ;r)   c                ó8   — | j                   j                  «        y)z?Discard the extension dictionary of the base entity when empty.N)r;   Údiscard_empty_extension_dictr+   s    r(   ÚcleanupzXClip.cleanup[  s   € à�‰×1Ñ1Õ3r)   )r=   r   r.   ÚNone)r.   úSpatialFilter | None)r.   Úint)r.   r"   )r.   r·   )r.   r   )r   zIterable[UVec]r.   r·   r²   )rŠ   zIterable[UVec] | Noner.   r·   r-   )r¦   úIterable[Vec2]r§   rº   r.   r·   )r/   r0   r1   r2   r>   r   rG   ÚpropertyrI   rL   r#   rT   rW   rb   rh   rw   r}   rŽ   r‚   r‰   r°   ru   r¶   r5   r)   r(   r   r   C   sÍ   „ ñó,:ó$óð ò0ó ð0ð òó ðð ò=ó ð=ó=ó
=ó
ó0!ó6&ó<Fð2 04ð4OØRWñ4OØ,ð4Oà	ó4Oól8ð LØ+ðLØ?MðLà	óLó$ó :ó4r)   r   c                ó4   — t        | «      j                  «       S )zcReturns the path vertices for the smallest rectangular boundary around the given
    vertices.
    )r   re   )r   s    r(   r^   r^   `  s   € ô ˜Ó"×0Ñ0Ó2Ð2r)   c                óh   — ddl m} | j                  �| j                  €J ‚ |t	        |«      | ¬«      S )Nr   )Úmake_inverted_clipping_polygon)r'   r,   )Úezdxf.math.clippingr¾   r•   r”   r{   )r�   Úholer¾   s      r(   rˆ   rˆ   g  s3   € õ
 Cà�K‰KÐ#¨$¯+©+Ð*AÐBÐBÙ)¼¸T»
ÐQUÔVÐVr)   c                óÞ   — 	 | j                  «       }|j                  t        «      }t	        |t
        «      sy|j                  t        «      }t	        |t        «      r|S y# t        $ r Y yw xY w)z€Returns the underlaying SPATIAL_FILTER entity if the given `entity` has a
    clipping path and returns ``None`` otherwise.
    N)r«   ÚAttributeErrorrE   r   r8   r   r   r	   )Úentityr¯   Úacad_filterÚacad_spatial_filters       r(   r   r   r  si   € ðØ×)Ñ)Ó+ˆð —)‘)œKÓ(€KÜ�k¤:Ô.ØØ%Ÿ/™/¬'Ó2ÐÜÐ%¤}Ô5Ø"Ð"Øøô ò Ùðús   ‚A  Á 	A,Á+A,c                óì  — | j                   }|€t        j                  d«      ‚	 | j                  «       }|j                  j                  t        d¬«      }|j                  t        «      }t        |t        «      sH|j                  j                  dd|j                  j                   i«      }|j#                  t        |«       t        |t        «      sJ ‚|S # t        $ r | j                  «       }Y Œ½w xY w)zoCreates the extension dict, the sub-dictionary ACAD_FILTER and the SPATIAL_FILTER
    entity if not exist.
    z/Cannot add new clipping path to virtual entity.T)Ú
hard_ownedÚSPATIAL_FILTERÚowner)rC   r   r9   r«   rÂ   Únew_extension_dictÚ
dictionaryÚget_required_dictr   rE   r   r8   r	   ÚobjectsÚadd_dxf_object_with_reactorrK   ÚhandleÚadd)rÃ   rC   r¯   Úacad_filter_dictrv   s        r(   rk   rk   ƒ  sâ   € ð �*‰*€CØ
€{Ü× Ñ Ð!RÓSÐSð,Ø×)Ñ)Ó+ˆð ×'Ñ'×9Ñ9¼+ÐRVÐ9ÓWÐØ%×)Ñ)¬'Ó2€NÜ�n¤mÔ4ØŸ™×@Ñ@Ø˜wÐ(8×(<Ñ(<×(CÑ(CÐDó
ˆð 	×ÑœW nÔ5Ü�n¤mÔ4Ð4Ð4ØÐøô ò ,Ø×)Ñ)Ó+Šð,ús   ¥C ÃC3Ã2C3c                ó,  — 	 | j                  «       }|j                  t        «      }|€1|j                  t        «      }|j                  |j                  g«       t        |t        «      sJ ‚t        |«      S # t        $ r | j                  «       }Y Œ€w xY wr²   )r«   rÂ   rÊ   rE   r   Úadd_xrecordÚset_reactorsrÏ   r8   r   r   )rv   r¯   rP   s      r(   r¤   r¤   ™  sŠ   € ð4Ø×1Ñ1Ó3ˆð �9‰9Ô(Ó)€DØ€|Ø× Ñ Ô!4Ó5ˆØ×Ñ˜5Ÿ<™<˜.Ô)Ü�dœGÔ$Ð$Ð$Ü˜DÓ!Ð!øô ò 4Ø×1Ñ1Ó3Šð4ús   ‚A7 Á7BÂBc                óª   — | €y 	 | j                  «       }|j                  t        «      }t	        |t
        «      rt        |«      S y # t        $ r Y y w xY wr²   )r«   rÂ   rE   r   r8   r   r   )rv   r¯   Úxrecords      r(   rN   rN   ¦  s]   € ð ÐØðØ×1Ñ1Ó3ˆð �i‰iÔ+Ó,€GÜ�'œ7Ô#Ü Ó(Ð(Øøô ò Ùðús   …A Á	AÁAc                ó~   — | j                  |«      }|j                  d„ |D «       «      }t        j                  |«      S )Nc              3  óF   K  — | ]  }t        |j                  «      –— Œ y ­wr²   )r   Úvalue)rŸ   Úts     r(   r¡   z)get_roundtrip_vertices.<locals>.<genexpr>¹  s   è ø€ Ð#@¹4°a¤D¨¯©§M¹4ùr¢   )Úget_sectionr[   r   r3   )rP   Úsection_namer`   Útagsr   s        r(   r_   r_   µ  s9   € ð ×Ñ˜LÓ)€DØ×#Ñ#Ñ#@¹4Ó#@Ó@€HÜ�:‰:�hÓÐr)   c                ó|   — t        | «      }|j                  r%|j                  }|j                  |j                  z  S y)Nrj   )r   r„   r‡   ÚxÚy)Úverticer�   r‡   s      r(   r%   r%   ½  s1   € Ü˜Ó!€DØ‡}‚}Ø�y‰yˆØ�v‰v˜Ÿ™‰ÐØr)   )r   rº   r.   r   )r�   r   rÀ   r   r.   r   )rÃ   r
   r.   r¸   )rÃ   r
   r.   r	   )rv   r	   r.   r   )rv   r¸   r.   zRoundtripXRecord | None)rP   r   rÜ   r:   r`   r   r.   r   )rá   r   r.   Úfloat),Ú
__future__r   Útypingr   r   ÚdataclassesÚezdxf.lldxfr   Úezdxf.lldxf.tagsr   Úezdxf.lldxf.typesr   Úezdxf.entitiesr	   r
   r   r   r   Ú
ezdxf.mathr   r   r   r   r   r   Ú"ezdxf.entities.acad_xrec_roundtripr   Ú__all__r   r   r   r   r   Ú	dataclassr   r   r^   rˆ   r   rk   r¤   rN   r_   r%   r5   r)   r(   Ú<module>rî      sê   ðõ #ß %Û å Ý !Ý $ß PÕ Pß H× HÝ ?â
9€à€Ø+Ð Ø;Ð Ø&KÐ #à
€ð ×Ñ÷'9ð '9ó ð'9÷TZ4ñ Z4óz3ðWØ
ðWØ-ðWàóWóó"ó,
"ðØ(ðàóð Ø
ð Ø*-ð Ø2:ð àó ôr)   