
    Og*o                       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 d dlZd dlZ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mZmZmZ d dlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z& d d	l'm(Z(m)Z) d d
l*m+Z+m,Z, d dl-m.Z. d dl/m0Z0 d dl1m2Z2 ddl3m4Z4m5Z5 ddl6m7Z7m8Z8m9Z9m:Z: ddl;m<Z< ddl=m>Z> er$d dl1m?Z? d dl-m@Z@mAZAmBZB d dlCmDZDmEZE d dlFmGZG d dlHmIZI dgZJ ej                  d      ZLdZM ed edd d       edej                         ed ej                  !       ed"d d       ed#ddej                  e$       ed%ddej                  e$       ed&ddej                  e$       ed'd d       ed(ddej                  e$       ed)ddej                  e$       ed*d d       ed+d d       ed,ej                  e#dej                  e-      d.      ZT eeT      ZU ee:eU      ZVe.j                   G d/ de<             ZXy)0    )annotations)TYPE_CHECKINGIterableIteratorcastUnionOptionalCallable)SelfN)	validator)DXFAttrDXFAttributesDefSubclassXTypeRETURN_DEFAULTgroup_code_mappingmerge_group_code_mappings)DXF12SUBCLASS_MARKERDXFValueErrorDXFKeyErrorDXFStructureError)Vec3UVecX_AXISY_AXISZ_AXISMatrix44UCSNULLVEC)InsertTransformationErrorInsertCoordinateSystem)explode_block_reference virtual_block_reference_entities)factory)EntityQuery)
AuditError   )
base_classSubclassProcessor)
DXFGraphicacdb_entityelevation_to_z_axisacdb_entity_group_codes)LinkedEntities)Attrib)Auditor)DXFNamespaceAttDef	DXFEntity)
BaseLayoutBlockLayout)AbstractTagWriter)xrefInsertezdxfg&.>AcDbBlockReferenceB   T)defaultoptional   
   )xtype&   )   )r=   r>   r   fixer*   +   2   F   G   ,   -      )rA   r=   r>   r   rD   )attribs_follownameinsert	elevationxscaleyscalezscalerotationcolumn_count	row_countcolumn_spacingrow_spacing	extrusionc                      e Zd ZdZdZ eeee      Z	e
d(d       Ze
d)d       Z	 d*	 	 	 d+ fdZd, fdZd- fdZd. fd	Zd/ fd
Ze
d)d       Ze
d)d       Zd0dZd1dZd)dZ	 	 	 d2	 	 	 	 	 	 	 d3dZ	 d4	 	 	 	 	 d5dZ	 d6	 	 	 	 	 d7dZ	 d8	 	 	 	 	 	 	 d9dZd6d:dZ	 d;	 	 	 	 	 	 	 d<dZd6d=dZd>dZd?dZd@dZ dAdZ!d Z"d>dZ#	 d*dd	 	 	 dBdZ$dCd Z%ddd!	 	 	 dDd"Z&e
dEd#       Z'dFd$Z(dGd%Z)dH fd&Z*dId'Z+ xZ,S )Jr9   aD  DXF INSERT entity

    The INSERT entity is hard owner of its ATTRIB entities and the SEQEND entity:

        ATTRIB.dxf.owner == INSERT.dxf.handle
        SEQEND.dxf.owner == INSERT.dxf.handle

    Note:

        The ATTDEF entity in block definitions is owned by the BLOCK_RECORD like
        all graphical entities.

    INSERTc                    | j                   S N)_sub_entitiesselfs    Z/var/www/html/public_html/myphp/venv/lib/python3.12/site-packages/ezdxf/entities/insert.pyattribszInsert.attribs   s    !!!    c                >    t        t        | j                              S r]   )boollenrb   r_   s    ra   rM   zInsert.attribs_follow   s    C%&&rc   Nc                    t         t        |   |      }|r.|j                  |t               |j
                  rt        |d       |S )z!Loading interface. (internal API))rO   )superr+   load_dxf_attribssimple_dxfattribs_loadermerged_insert_group_codesr12r-   )r`   	processordxf	__class__s      ra   ri   zInsert.load_dxf_attribs   s@    
 J6yA..s4MN}}#C5
rc   c                   t         |   |       |j                  t        kD  r_| j                  j
                  dkD  s| j                  j                  dkD  r|j                  t        d       n|j                  t        d       | j                  r|j                  dd       | j                  j                  |g d       y)z(Export entity specific data as DXF tags.r(   AcDbMInsertBlockr;   r<   )rN   rO   rQ   rR   rS   rT   rU   rV   rW   rX   rY   N)rh   export_entity
dxfversionr   rn   rU   rV   
write_tag2r   rM   export_dxf_attribsr`   	tagwriterro   s     ra   rr   zInsert.export_entity   s    i(%'%%)txx/A/AA/E$$_6HI$$_6JK  Q'##	
rc   c                h    t         |          | j                  r| j                  fd       y y )Nc                &    | j                        S r]   )
export_dxf)erw   s    ra   <lambda>z#Insert.export_dxf.<locals>.<lambda>   s    Y0G rc   )rh   rz   rM   process_sub_entitiesrv   s    `ra   rz   zInsert.export_dxf   s-    9%%%&GH rc   c                n    t         |   |       |j                  | j                  j                         y r]   )rh   register_resourcesadd_block_namern   rN   )r`   registryro   s     ra   r   zInsert.register_resources   s&    "8,.rc   c                    t         |   ||       |j                  | j                  j                        |j                  _        y r]   )rh   map_resourcesget_block_namern   rN   )r`   clonemappingro   s      ra   r   zInsert.map_resources   s0    eW- //>		rc   c                B   | j                   j                  d      r| j                   j                  dk7  ry| j                   j                  d      r| j                   j                  dk7  ry| j                   j                  d      r| j                   j                  dk7  ryy)z3Returns ``True`` if scaling is applied to any axis.rQ   r(   TrR   rS   F)rn   hasattrrQ   rR   rS   r_   s    ra   has_scalingzInsert.has_scaling   ss     88H%$((//Q*>88H%$((//Q*>88H%$((//Q*>rc   c                    t        | j                  j                        t        | j                  j                        cxk(  xr" t        | j                  j                        k(  S c S )zReturns ``True`` if the scale factor is uniform for x-, y- and z-axis,
        ignoring reflections e.g. (1, 1, -1) is uniform scaling.

        )absrn   rQ   rR   rS   r_   s    ra   has_uniform_scalingzInsert.has_uniform_scaling  sA     488??#s488??';Ss488???SSSSSrc   c                    |dk(  rt        d      || j                  _        || j                  _        || j                  _        | S )zSet a uniform scale factor.r   zInvalid scale factor.)
ValueErrorrn   rQ   rR   rS   )r`   factors     ra   	set_scalezInsert.set_scale	  s;    Q;455   rc   c                    | j                   r9| j                   j                  j                  | j                  j                        S y)z;Returns the associated :class:`~ezdxf.layouts.BlockLayout`.N)docblocksgetrn   rN   r_   s    ra   blockzInsert.block  s-    8888??&&txx}}55rc   c                T    | j                         }||j                  j                  S y)zGReturn ``True`` if the INSERT entity represents a XREF or XREF_OVERLAY.F)r   block_recordis_xrefr`   r   s     ra   r   zInsert.is_xref  s(    

%%---rc   c                    ||| j                   _        |Rt        |      dk7  rt        d      |\  }}}|| j                   _        || j                   _        || j                   _        ||| j                   _        | S )a)  
        Set the location, scaling and rotation attributes. Arguments which are ``None``
        will be ignored.

        Args:
            insert: insert location as (x, y [,z]) tuple
            scale: (x-scale, y-scale, z-scale) tuple
            rotation : rotation angle in degrees

           z-Argument scale has to be a (x, y[, z]) tuple.)rn   rO   rf   r   rQ   rR   rS   rT   )r`   rO   scalerT   xyzs          ra   placezInsert.place  su      $DHHO5zQ#$STTGAq!DHHODHHODHHO (DHHrc   c                   	 |\  }}|| j                  _        || j                  _        	 |\  }}|| j                  _        || j                  _        | S # t         $ r t        d      w xY w# t         $ r t        d      w xY w)aP  Place block reference in a grid layout, grid `size` defines the
        row- and column count, `spacing` defines the distance between two block
        references.

        Args:
            size: grid size as (row_count, column_count) tuple
            spacing: distance between placing as (row_spacing, column_spacing) tuple

        z1Size has to be a (row_count, column_count) tuple.z8Spacing has to be a (row_spacing, column_spacing) tuple.)r   r   rn   rV   rU   rX   rW   )r`   sizespacingrowscolsrX   col_spacings          ra   gridzInsert.grid<  s    	UJD$ " $	'.$K
  +"-  	U STT	U  	J 	s   A A+ A(+B Fc                :   | j                   D ]  }||j                  j                  k(  s|c S  |rk| j                  _| j                  j                  | j                  j
                     }|j                         D ]  }||j                  j                  k(  s|c S  y)a  Get an attached :class:`Attrib` entity with the given `tag`,
        returns ``None`` if not found.  Some applications do not attach constant
        ATTRIB entities, set `search_const` to ``True``, to get at least the
        associated :class:`AttDef` entity.

        Args:
            tag: tag name of the ATTRIB entity
            search_const: search also const ATTDEF entities

        N)rb   rn   tagr   r   rN   get_const_attdefs)r`   r   search_constattribr   attdefs         ra   
get_attribzInsert.get_attribX  s     ll 	Ffjjnn$	 DHH0HHOODHHMM2E113 "&**..(!M" rc   c                Z    | j                  ||      }||S |j                  j                  S )a  Get content text of an attached :class:`Attrib` entity with
        the given `tag`, returns the `default` value if not found.
        Some applications do not attach constant ATTRIB entities, set
        `search_const` to ``True``, to get content text of the
        associated :class:`AttDef` entity.

        Args:
            tag: tag name of the ATTRIB entity
            default: default value if ATTRIB `tag` is absent
            search_const: search also const ATTDEF entities

        )r   rn   text)r`   r   r=   r   r   s        ra   get_attrib_textzInsert.get_attrib_texto  s,     l3>Nzzrc   c                *    | j                  ||      duS )a  Returns ``True`` if the INSERT entity has an attached ATTRIB entity with the
        given `tag`.  Some applications do not attach constant ATTRIB entities, set
        `search_const` to ``True``, to check for an associated :class:`AttDef` entity
        with constant content.


        Args:
            tag: tag name fo the ATTRIB entity
            search_const: search also const ATTDEF entities

        N)r   )r`   r   r   s      ra   
has_attribzInsert.has_attrib  s     sL1==rc   c                    t        |xs i       }||d<   ||d<   ||d<   t        d| j                  d|            }| j                  j	                  |       | j
                  | j                          |S )a  Attach an :class:`Attrib` entity to the block reference.

        Example for appending an attribute to an INSERT entity::

            e.add_attrib('EXAMPLETAG', 'example text').set_placement(
                (3, 7), align=TextEntityAlignment.MIDDLE_CENTER
            )

        Args:
            tag: tag name of the ATTRIB entity
            text: content text as string
            insert: insert location as (x, y[, z]) tuple in :ref:`OCS`
            dxfattribs: additional DXF attributes for the ATTRIB entity

        r   r   rO   r0   ATTRIB)dictr   _new_compound_entityrb   appendseqend
new_seqend)r`   r   r   rO   
dxfattribsr   s         ra   
add_attribzInsert.add_attrib  sw    $ **+

5!
6%
8h 9 9(J OPF# ;;OOrc   c                    t        | j                        D ]=  \  }}|j                  j                  |k(  s | j                  |= |j	                           y |st        |      y)a  Delete an attached :class:`Attrib` entity from INSERT. Raises an
        :class:`DXFKeyError` exception, if no ATTRIB for the given `tag` exist if
        `ignore` is ``False``.

        Args:
            tag: tag name of the ATTRIB entity
            ignore: ``False`` for raising :class:`DXFKeyError` if ATTRIB `tag`
                does not exist.

        Raises:
            DXFKeyError: no ATTRIB for the given `tag` exist

        N)	enumeraterb   rn   r   destroyr   )r`   r   ignoreindexr   s        ra   delete_attribzInsert.delete_attrib  s^     't||4 	ME6zz~~$LL' 		
 c"" rc   c                n    | j                   sy| j                  D ]  }|j                           g | _        y)zBDelete all :class:`Attrib` entities attached to the INSERT entity.N)is_aliverb   r   r^   )r`   r   s     ra   delete_all_attribszInsert.delete_all_attribs  s1    }}ll 	FNN	rc   c                \   | j                   }t        t        |j                        |j                  |j
                  |j                  f|j                  |j                        }	 |j                  |t              }|j                  |_        |j                  |_        |j                  |_        |j                  |_        |j                  |_        |j                  |_        | j                  D ]  }|j                  |        | j!                  |       | S # t        $ r t        d      w xY w)a  Transform INSERT entity by transformation matrix `m` inplace.

        Unlike the transformation matrix `m`, the INSERT entity can not
        represent a non-orthogonal target coordinate system and an
        :class:`InsertTransformationError` will be raised in that case.

        )rO   r   rT   rY   zJINSERT entity can not represent a non-orthogonal target coordinate system.)rn   r"   r   rO   rQ   rR   rS   rT   rY   	transformABS_TOLr!   scale_factor_xscale_factor_yscale_factor_zrb   post_transform)r`   mrn   source_systemtarget_systemr   s         ra   r   zInsert.transform  s    hh.

#::szz3::6\\mm	
	)33Aw?M
 #))
$--%//"11
"11
"11
ll 	 FQ	 A ) 	+\ 	s   %D D+c                   | j                         }|j                  t        |||      |j                  | j                  j
                        z         | j                  _        | j                  D ]  }|j                  |||        | S )zgOptimized INSERT translation about `dx` in x-axis, `dy` in y-axis
        and `dz` in z-axis.

        )ocsfrom_wcsr   to_wcsrn   rO   rb   	translate)r`   dxdydzr   r   s         ra   r   zInsert.translate  sl    
 hhj,,tBB'7#**TXX__:U'UVll 	)FRR(	)rc   c                   | j                   }|j                  }|j                  }|j                  }| j	                         }|j
                  }t        |j                  t                    }t        |j                  t                    }t        j                  ||z  ||z  ||z        }	t        j                  |j                        }
|
r|	t        j                  ||
      z  }	|j                  |j!                  dt"                    }| j%                         }|2||	j'                  |j$                  j                   j(                        z  }|	j+                  d|j,                         |	S )zReturns a transformation matrix to transform the block entities from the
        block reference coordinate system into the :ref:`WCS`.
        )uxuyuzrO   r   )rn   rQ   rR   rS   r   r   r   r   r   r   r   ucsmathradiansrT   axis_rotater   r    r   transform_direction
base_pointset_rowxyz)r`   rn   sxsyszr   rY   r   r   r   anglerO   block_layouts                ra   matrix44zInsert.matrix44  s    hhZZZZZZhhjFF	#**V$%#**V$%LLBGRINC S\\*%%i77ACGGHg67zz|#a++L,>,>,B,B,M,MNNF 	
		!VZZ rc   c                H    | j                         }t               }||_        |S )zaReturns the block reference coordinate system as :class:`ezdxf.math.UCS`
        object.
        )r   r   matrix)r`   r   r   s      ra   r   z
Insert.ucs  s"     MMOe

rc   c                    t         | j                  _        | j                  j                  d       | j                  j                  d       y)zReset block reference attributes location, rotation angle and
        the extrusion vector but preserves the scale factors.

        rT   rY   N)r    rn   rO   discardr_   s    ra   reset_transformationzInsert.reset_transformation#  s3    
 "$%rc   )redraw_orderc               \    || j                         }|t        d      t        | ||      S )a7  Explodes the block reference entities into the target layout, if target
        layout is ``None``, the layout of the block reference will be used.
        This method destroys the source block reference entity.

        Transforms the block entities into the required :ref:`WCS` location by
        applying the block reference attributes `insert`, `extrusion`,
        `rotation` and the scale factors `xscale`, `yscale` and `zscale`.

        Attached ATTRIB entities are converted to TEXT entities, this is the
        behavior of the BURST command of the AutoCAD Express Tools.

        .. warning::

            **Non-uniform scale factors** may lead to incorrect results some entities
            (TEXT, MTEXT, ATTRIB).

        Args:
            target_layout: target layout for exploded entities, ``None`` for
                same layout as source entity.
            redraw_order: create entities in ascending redraw order if ``True``

        Returns:
            :class:`~ezdxf.query.EntityQuery` container referencing all exploded
            DXF entities.

        z7INSERT without layout assignment, specify target layout)target_layoutr   )
get_layoutr   r#   )r`   r   r   s      ra   explodezInsert.explode,  sB    :   OO-M$'M  'L
 	
rc   c                "    | j                         S )zImplements the SupportsVirtualEntities protocol.

        This protocol is for consistent internal usage and does not replace
        the method :meth:`virtual_entities`! Ignores the redraw-order!
        )virtual_entitiesr_   s    ra   __virtual_entities__zInsert.__virtual_entities__S  s     $$&&rc   skipped_entity_callbackr   c             #  \   K   t        | ||      D ]  }|j                  |        |  yw)a  
        Yields the transformed referenced block content as virtual entities.

        This method is meant to examine the block reference entities at the target
        location without exploding the block reference.
        These entities are not stored in the entity database, have no handle and
        are not assigned to any layout. It is possible to convert these entities
        into regular drawing entities by adding the entities to the entities
        database and a layout of the same DXF document as the block reference::

            doc.entitydb.add(entity)
            msp = doc.modelspace()
            msp.add_entity(entity)

        .. warning::

            **Non-uniform scale factors** may return incorrect results for some entities
            (TEXT, MTEXT, ATTRIB).

        This method does not resolve the MINSERT attributes, only the
        sub-entities of the first INSERT will be returned. To resolve MINSERT
        entities check if multi insert processing is required, that's the case
        if the property :attr:`Insert.mcount` > 1, use the :meth:`Insert.multi_insert`
        method to resolve the MINSERT entity into multiple INSERT entities.

        This method does not apply the clipping path created by the XCLIP command.
        The method returns all entities and ignores the clipping path polygon and no
        entity is clipped.

        The `skipped_entity_callback()` will be called for all entities which are not
        processed, signature:
        :code:`skipped_entity_callback(entity: DXFEntity, reason: str)`,
        `entity` is the original (untransformed) DXF entity of the block definition, the
        `reason` string is an explanation why the entity was skipped.

        Args:
            skipped_entity_callback: called whenever the transformation of an
                entity is not supported and so was skipped
            redraw_order: yield entities in ascending redraw order if ``True``

        r   N)r$   set_source_block_reference)r`   r   r   r{   s       ra   r   zInsert.virtual_entities[  s;     ^ 2$;%
 	A
 ((.G	s   *,c                    | j                   j                  r| j                   j                  nd| j                   j                  r| j                   j                  z  S dz  S )zvReturns the multi-insert count, MINSERT (multi-insert) processing
        is required if :attr:`mcount` > 1.

        r(   )rn   rX   rV   rW   rU   r_   s    ra   mcountzInsert.mcount  sO     '+hh&:&:""%)XX%<%<DHH!!
 	
BC
 	
rc   c              #    K   d }d }t               }| j                  j                  }| j                  j                  }| j                  j                  }t        | j                  j                        D ]  }t        | j                  j                        D ]c  }t        ||z  ||z        }	|	|vs|j                  |	       |r|	j                  |      }	| j                         }
 ||
|	        ||
|	       |
 e  yw)ziYields a virtual INSERT entity for each grid element of a MINSERT
        entity (multi-insert).
        c                d    | j                   D ]!  }|j                  xj                  |z  c_        # y r]   )rb   rn   rO   )rO   offsetr   s      ra   "transform_attached_attrib_entitiesz?Insert.multi_insert.<locals>.transform_attached_attrib_entities  s*     .. ,

!!V+!,rc   c                    | j                   }|xj                  |z  c_        |j                  d       |j                  d       |j                  d       |j                  d       y )NrV   rU   rX   rW   )rn   rO   r   )rO   r   rn   s      ra   adjust_dxf_attribsz/Insert.multi_insert.<locals>.adjust_dxf_attribs  sJ    **CJJ& JKK$KK'KK&KK()rc   N)setrn   rX   rW   rT   rangerV   rU   r   add
rotate_degcopy)r`   r   r  donerX   r   rT   rowcolr   rO   s              ra   multi_insertzInsert.multi_insert  s     
	,	* uhh**hh--88$$++, 	!CTXX223 !cK/{1BC%HHV$!'!2!28!<!YY[F&vv66vvF L!	!s   B-C?0AC?c                     dfdd fd} j                          j                          |         S )a  
        Attach for each :class:`~ezdxf.entities.Attdef` entity, defined in the
        block definition, automatically an :class:`Attrib` entity to the block
        reference and set ``tag/value`` DXF attributes of the ATTRIB entities
        by the ``key/value`` pairs (both as strings) of the `values` dict.
        The ATTRIB entities are placed relative to the insert location of the
        block reference, which is identical to the block base point.

        This method avoids the wrapper block of the
        :meth:`~ezdxf.layouts.BaseLayout.add_auto_blockref` method, but the
        visual results may not match the results of CAD applications, especially
        for non-uniform scaling. If the visual result is very important to you,
        use the :meth:`add_auto_blockref` method.

        Args:
            values: :class:`~ezdxf.entities.Attrib` tag values as ``tag/value``
                pairs

        c                    | j                  d      }j                  |d       }|| j                  dd      }| j                  d      }|||fS )Nr   r    rO   )popr   )r   r   r   locationvaluess       ra   unpackz'Insert.add_auto_attribs.<locals>.unpack  sQ    ..'C::c4(D|!~~fb1!~~h/Hh&&rc   c                    j                         D ]  } | j                  ddh      }d|vr#t        j                  dt	        |        d       >d|vr#t        j                  dt	        |        d       e 
|      \  }}}	j                  ||||      }| j                  r(| j                         }||_        |j                  |       |j                          y )	Nprompthandle)dropr   z	Skipping z#: missing mandatory 'tag' attributerO   z&: missing mandatory 'insert' attribute)attdefsr   loggerwarningstrr   has_embedded_mtext_entityvirtual_mtext_entityr   embed_mtextr   )r   r   r   r   r  r   mtextr   r   r`   r  s          ra   autofillz)Insert.add_auto_attribs.<locals>.autofill  s    &..0 $#..Xx4H.I
 
*NN#CK=0ST :-NN#CK=0VW &,Z&8#T8dHjI33"779E!%EJ&&u-  #1$rc   )returnztuple[str, str, UVec]r   None)r   r   )r`   r  r  r   r   r  s   `` @@@ra   add_auto_attribszInsert.add_auto_attribs  s:    (	'	$ 	$6 zz|#AJrc   c                   t         |   |       |j                  }|r|j                  r| j                  j
                  }|@|j                  t        j                  dt        |        d       |j                  |        y||j                  vr@|j                  t        j                  dt        |        d       |j                  |        yyyy)zValidity check.NzDeleted entity z without a BLOCK name)codemessagez# without required BLOCK definition.)rh   auditr   r   rn   rN   fixed_errorr'   UNDEFINED_BLOCK_NAMEr  trashUNDEFINED_BLOCK)r`   auditorr   rN   ro   s       ra   r'  zInsert.audit  s    gkk3::88==D|###88-c$i[8MN $  d#SZZ'###33-c$i[ 9# $ $ 
 d# ( 3rc   c                T    | j                         }||j                  fS t               S )z,Support for the "ReferencedBlocks" protocol.)r   block_record_handletupler   s     ra   __referenced_blocks__zInsert.__referenced_blocks__  s)    

--//wrc   )r   zlist[Attrib])r   re   r]   )rm   zOptional[SubclassProcessor]r   r2   )rw   r7   r   r"  )rw   r7   )r   zxref.Registryr   r"  )r   r   r   zxref.ResourceMapperr   r"  )r   float)r   zOptional[BlockLayout])NNN)rO   zOptional[UVec]r   z$Optional[tuple[float, float, float]]rT   zOptional[float]r   r9   )r(   r(   r2  )r   ztuple[int, int]r   ztuple[float, float]r   r9   )F)r   r  r   re   r   zOptional[Union[Attrib, AttDef]])r  F)r   r  r=   r  r   re   r   r  )r   r  r   re   r   re   ))r   r   N)r   r  r   r  rO   r   r   r0   )r   r  r   r"  r!  )r   r   r   r9   )r   r1  r   r1  r   r1  r   r9   )r   r   )r   zOptional[BaseLayout]r   r&   )r   Iterator[DXFGraphic])r   z+Optional[Callable[[DXFGraphic, str], None]]r   r3  )r   int)r   zIterator[Insert])r  zdict[str, str]r   r9   )r,  r1   r   r"  )r   zIterable[str])-__name__
__module____qualname____doc__DXFTYPEr   r)   r,   acdb_block_reference
DXFATTRIBSpropertyrb   rM   ri   rr   rz   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r#  r'  r0  __classcell__)ro   s   @ra   r9   r9      s     Gz;8LMJ" " ' ' 8<4	
6I/
?
   T T "&6:$(	 4 "	
 
< NT#7J	: .3&*	(0 AF!$9=	(> FJ!+/	>#, B	>& 59%
JO%
1%
	%
N' PT	5 "M5
 
5n 
 
"!H;z$(rc   )Y
__future__r   typingr   r   r   r   r   r	   r
   typing_extensionsr   r   loggingezdxf.lldxfr   ezdxf.lldxf.attributesr   r   r   r   r   r   r   ezdxf.lldxf.constr   r   r   r   r   
ezdxf.mathr   r   r   r   r   r   r   r    ezdxf.math.transformtoolsr!   r"   ezdxf.exploder#   r$   ezdxf.entitiesr%   ezdxf.queryr&   ezdxf.auditr'   	dxfentityr)   r*   dxfgfxr+   r,   r-   r.   	subentityr/   r   r0   r1   r2   r3   r4   ezdxf.layoutsr5   r6   ezdxf.lldxf.tagwriterr7   r:   r8   __all__	getLoggerr  r   is_valid_block_name	any_pointis_not_zerois_greater_zeropoint3dis_not_null_vectorr:   acdb_block_reference_group_codesrk   register_entityr9    rc   ra   <module>r[     s!   #   #   !   	 	 	 # # " 4  & #>>57*			7	#
 #!"a$?Y%B%BC"EOO4 RT:++ 
 ++ 
 ++ 
 BD9// 
 // 
 ""a$?r1t<--22 
]69 t $66J#K  5= $ 	r	^ r	 r	rc   