
    Ogfe                    N   d dl 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 d dlmZ d dlmZ d dlmZ d dlmZ ee   Z eed	      Zd
ddddddddddddZddddddZ G d d      Ze	 	 d(	 	 	 	 	 	 	 d)d       Z G d  d!      Z	 d*	 	 	 	 	 	 	 d+d#Zd,d-d$Zd.d%Z  e!d&      Z"d'Z#y")/    )annotations)TextIOBinaryIOUnionSequenceIterablecastIteratorOptional)contextmanager)partial)StringIO)Path)BinaryTagWriter   )ndigitsr   r   )   r   )   r   )r   r   )r   r   )r   r   )r   r   )r   r   )r   r   )r      )r   r   )r   r   )LEFTCENTERRIGHTBOTTOM_LEFTBOTTOM_CENTERBOTTOM_RIGHTMIDDLE_LEFTMIDDLE_CENTERMIDDLE_RIGHTTOP_LEFT
TOP_CENTER	TOP_RIGHT
      (   )   *   )xysebc                      e Zd ZddZddZy)BinaryDXFWriterc                    || _         t        | j                   ddd      | _        | j                  j                          y )NAC1009Fcp1252)
dxfversionwrite_handlesencoding)_streamr   
_tagwriterwrite_signature)selfstreams     [/var/www/html/public_html/myphp/venv/lib/python3.12/site-packages/ezdxf/addons/r12writer.py__init__zBinaryDXFWriter.__init__.   s7    )LL	
 	'')    c                :    | j                   j                  |       y N)r6   	write_str)r8   r*   s     r:   writezBinaryDXFWriter.write8   s    !!!$r<   N)r9   r   )r*   strreturnNone)__name__
__module____qualname__r;   r@    r<   r:   r.   r.   -   s    *%r<   r.   c           	   #  \  K   d}|j                  d      r't        | t        t        f      rt	        | dd      }|} n|j                  d      rdt        | t        t        f      r&t	        | d      }t        t        t        |            } n7t        t        t        t        t        |                   } nt        d| d	      t        t        t        |       |      }	 | |j                          |r|j                          yy# |j                          |r|j                          w w xY ww)
a=  Context manager for writing DXF entities to a stream/file. `stream` can
    be any file like object with a :func:`write` method or just a string for
    writing DXF entities to the file system. If `fixed_tables` is ``True``, a
    standard TABLES section is written in front of the ENTITIES
    section and some predefined text styles and line types can be used.

    Set argument `fmt` to "asc" to write ASCII DXF file (default) or "bin" to
    write Binary DXF files. ASCII DXF require a :class:`TextIO` stream and
    Binary DXF require a :class:`BinaryIO` stream.

    Nascwtr1   )r4   binwbzUnknown format 'z'.)
startswith
isinstancerA   r   openr	   r   r.   r   
ValueErrorR12FastStreamWriterclose)r9   fixed_tablesfmtr5   writers        r:   	r12writerrV   <   s     " .2G
~~efsDk*64(;GF		fsDk*64(G&/'":;F&/$x2H"IJF +C5344 ff!5|DFMMO  	MMO s   CD,D  $D,%D))D,c                  &   e Zd ZdZdddZddZ	 	 	 d	 	 	 	 	 	 	 	 	 	 	 ddZ	 	 	 d	 	 	 	 	 	 	 	 	 	 	 ddZ	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	 	 	 d	 	 	 	 	 	 	 	 	 ddZ		 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 dd	Z
	 	 	 d	 	 	 	 	 	 	 	 	 dd
Z	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 ddZ	 	 	 	 	 	 	 d 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d!dZ	 	 	 d	 	 	 	 	 	 	 	 	 	 	 d"dZ	 	 	 	 d#	 	 	 	 	 	 	 	 	 	 	 d$dZ	 	 	 	 	 	 	 	 	 d%	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d&dZy)'rQ   aU  Fast stream writer to create simple DXF R12 drawings.

    Args:
        stream: a file like object with a :func:`write` method.
        fixed_tables: if `fixed_tables` is ``True``, a standard TABLES section
            is written in front of the ENTITIES section and some predefined text
            styles and line types can be used.

    c                b    || _         |r|j                  t               |j                  d       y )Nz0
SECTION
2
ENTITIES
)r9   r@   PREFACE)r8   r9   rS   s      r:   r;   zR12FastStreamWriter.__init__p   s%    LL!01r<   c                :    | j                   j                  d       y)zmWrites the DXF tail. Call is not necessary when using the context
        manager :func:`r12writer`.
        z0
ENDSEC
0
EOF
Nr9   r@   )r8   s    r:   rR   zR12FastStreamWriter.closev   s     	/0r<   Nc                   dg}|j                  t        |||             |j                  t        |d             |j                  t        |d             | j                  j	                  dj                  |             y)aV  Add a LINE entity from `start` to `end`.

        Args:
            start: start vertex as ``(x, y[, z])`` tuple
            end: end vertex as  as ``(x, y[, z])`` tuple
            layer: layer name as string, without a layer definition the assigned
                color = ``7`` (black/white) and line type is ``'Continuous'``.
            color: color as :ref:`ACI` in the range from ``0`` to ``256``,
                ``0`` is `ByBlock` and ``256`` is `ByLayer`, default is `ByLayer`
                which is always color = ``7`` (black/white) without a layer
                definition.
            linetype: line type as string, if FIXED-TABLES are written some
                predefined line types are available, else line type is always
                `ByLayer`, which is always ``'Continuous'`` without a LAYERS
                table.

        z0
LINE
r#   code    Nappenddxf_attribs
dxf_vertexr9   r@   join)r8   startendlayercolorlinetypedxfs          r:   add_linezR12FastStreamWriter.add_line|   s`    2 m

;ueX67

:e"-.

:c+,"''#,'r<   c           
     $   dg}|j                  t        |||             |j                  t        |             |j                  t        dt	        t        |                         | j                  j                  dj                  |             y)aL  Add a CIRCLE entity.

        Args:
            center: circle center point as ``(x, y)`` tuple
            radius: circle radius as float
            layer: layer name as string see :meth:`add_line`
            color: color as :ref:`ACI` see :meth:`add_line`
            linetype: line type as string see :meth:`add_line`

        z	0
CIRCLE
r%   r`   N	rb   rc   rd   dxf_tagrA   rndr9   r@   re   )r8   centerradiusrh   ri   rj   rk   s          r:   
add_circlezR12FastStreamWriter.add_circle   sg    $ o

;ueX67

:f%&

72s3v;/01"''#,'r<   c           
        dg}|j                  t        |||             |j                  t        |             |j                  t        dt	        t        |                         |j                  t        dt	        t        |                         |j                  t        dt	        t        |                         | j                  j                  dj                  |             y)a  Add an ARC entity. The arc goes counter-clockwise from `start` angle
        to `end` angle.

        Args:
            center: arc center point as ``(x, y)`` tuple
            radius: arc radius as float
            start: arc start angle in degrees as float
            end: arc end angle in degrees as float
            layer: layer name as string see :meth:`add_line`
            color: color as :ref:`ACI` see :meth:`add_line`
            linetype: line type as string see :meth:`add_line`

        z0
ARC
r%   2   3   r`   Nrn   )	r8   rq   rr   rf   rg   rh   ri   rj   rk   s	            r:   add_arczR12FastStreamWriter.add_arc   s    . l

;ueX67

:f%&

72s3v;/01

72s3u:/0

72s3s8}-."''#,'r<   c                    dg}|j                  t        |||             |j                  t        |             | j                  j	                  dj                  |             y)a+  
        Add a POINT entity.

        Args:
            location: point location as ``(x, y [,z])`` tuple
            layer: layer name as string see :meth:`add_line`
            color: color as :ref:`ACI` see :meth:`add_line`
            linetype: line type as string see :meth:`add_line`

        z0
POINT
r`   Nra   )r8   locationrh   ri   rj   rk   s         r:   	add_pointzR12FastStreamWriter.add_point   sK    " n

;ueX67

:h'("''#,'r<   c                0    | j                  d|||||       y)a  Add a 3DFACE entity. 3DFACE is a spatial area with 3 or 4 vertices,
        all vertices have to be in the same plane.

        Args:
            vertices: iterable of 3 or 4 ``(x, y, z)`` vertices.
            invisible: bit coded flag to define the invisible edges,

                1. edge = 1
                2. edge = 2
                3. edge = 4
                4. edge = 8

                Add edge values to set multiple edges invisible,
                1. edge + 3. edge = 1 + 4 = 5, all edges = 15

            layer: layer name as string see :meth:`add_line`
            color: color as :ref:`ACI` see :meth:`add_line`
            linetype: line type as string see :meth:`add_line`

        3DFACEN_add_quadrilateral)r8   vertices	invisiblerh   ri   rj   s         r:   
add_3dfacezR12FastStreamWriter.add_3dface   s    8 	h	5%	
r<   c                0    | j                  d|d|||       y)a  Add a SOLID entity. SOLID is a solid filled area with 3 or 4 edges
        and SOLID is a 2D entity.

        Args:
            vertices: iterable of 3 or 4 ``(x, y[, z])`` tuples, z-axis will be
                ignored.
            layer: layer name as string see :meth:`add_line`
            color: color as :ref:`ACI` see :meth:`add_line`
            linetype: line type as string see :meth:`add_line`

        SOLIDr   Nr}   )r8   r   rh   ri   rj   s        r:   	add_solidzR12FastStreamWriter.add_solid  s    $ 	1eUHMr<   c                   d|z  g}|j                  t        |||             t        |      }t        |      dk  rt	        d|z        t        |      dk(  r|j                  |d          |j                  d t        |d      D               |r$|j                  t        dt        |                   | j                  j                  d	j                  |             y )
Nz0
%s
r   z%s needs 3 or 4 vertices.c              3  :   K   | ]  \  }}t        ||        y wr>   )rd   ).0r^   vertexs      r:   	<genexpr>z9R12FastStreamWriter._add_quadrilateral.<locals>.<genexpr>,  s#      
f vt$
s   r#   )rf   F   r`   )rb   rc   listlenrP   extend	enumeratero   rA   r9   r@   re   )r8   dxftyper   flagsrh   ri   rj   rk   s           r:   r~   z&R12FastStreamWriter._add_quadrilateral  s     7"#

;ueX67>x=187BCC]aOOHRL)

 
 )(" =
 	
 JJwr3u:./"''#,'r<   c           	        dg}|j                  t        |||             |j                  t        dd             |j                  t        ddt        |      z                | j                  j                  dj                  |             dt        |      z   t        dd      z   }|D ]z  }| j                  j                  |       t        |      }t        |      }	|	d	k  rt        d
      |	d	k(  r|d   |d   df}| j                  j                  t        |dd              | | j                  j                  d       y)a  Add a 3D POLYLINE entity.

        Args:
            vertices: iterable of ``(x, y[, z])`` tuples, z-axis is ``0`` by
                default
            closed: ``True`` creates a closed polyline
            layer: layer name as string see :meth:`add_line`
            color: color as :ref:`ACI` see :meth:`add_line`
            linetype: line type as string see :meth:`add_line`

        0
POLYLINE
B   r   r      r`   	0
VERTEX
    r   z,Vertices require at least a x- and a y-axis.r   Nr   	0
SEQEND
)rb   rc   ro   intr9   r@   re   tupler   rP   rd   )
r8   r   closedrh   ri   rj   rk   vertex_templater   
len_vertexs
             r:   add_polylinez R12FastStreamWriter.add_polyline4  s   & 

;ueX67

72q>"

72q3v;/0"''#,''+e*<<wr2N 	6FKKo.6]FVJA~ !OPPq )VAY2KKj45	6 	-(r<   c	                   dfd}	dg}
|
j                  t        |||             |
j                  t        dd             |
j                  t        dt        |                   |r|
j                  t        d|             |r|
j                  t        d|             | j                  j                  dj                  |
             d	t        |      z   t        dd
      z   }|D ]t  }| j                  j                  |        |	|      }D ]J  }|j                  |d
      }|d
k(  r|dv r| j                  j                  t        t        |   |             L v | j                  j                  d       y)a  Add a 2D POLYLINE entity with start width, end width and bulge value
        support.

        Format codes:

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

        Args:
            points: iterable of (x, y, [start_width, [end_width, [bulge]]])
                tuple, value order according to the `format` string, unset
                values default to ``0``
            format: format: format string, default is ``'xy'``
            closed: ``True`` creates a closed polyline
            start_width: default start width, default is ``0``
            end_width: default end width, default is ``0``
            layer: layer name as string see :meth:`add_line`
            color: color as :ref:`ACI` see :meth:`add_line`
            linetype: line type as string see :meth:`add_line`

        c                    t               }t        |       D ]+  \  }}|dk(  rt        |      }|d   |d<   |d   |d<   '|||<   - |S )Nvr   r(   r   r)   )dictzipr   )dataattribsr^   valuery   formats        r:   vertex_attribsz;R12FastStreamWriter.add_polyline_2d.<locals>.vertex_attribs  s^    fG"640 *e3;$U|H#+A;GCL#+A;GCL$)GDM* Nr<   r   r   r   r   r%   r&   r`   r   r   sebr   N)r   r   rB   r   )	rb   rc   ro   r   r9   r@   re   getVERTEX_GROUP_CODES)r8   pointsr   r   start_width	end_widthrh   ri   rj   r   rk   r   pointr   format_coder   s     `             r:   add_polyline_2dz#R12FastStreamWriter.add_polyline_2dY  sB   N		 

;ueX67

72q>"

72s6{+,JJwr;/0JJwr9-."''#,''+e*<<wr1~M 		EKKo.$U+G% K3A:+"6!!.{;UC			 	-(r<   c                &    dd fd}dd	fd}d
d	fd} |       \  }	 |       \  }
 |         j                   j                  |	        j                   j                  |
        j                   j                  d       y)a  Add a POLYFACE entity. The POLYFACE entity supports only faces of
        maximum 4 vertices, more indices will be ignored. A simple square would
        be::

            v0 = (0, 0, 0)
            v1 = (1, 0, 0)
            v2 = (1, 1, 0)
            v3 = (0, 1, 0)
            dxf.add_polyface(vertices=[v0, v1, v2, v3], faces=[(0, 1, 2, 3)])

        All 3D form functions of the :mod:`ezdxf.render.forms` module return
        :class:`~ezdxf.render.MeshBuilder` objects, which provide the required
        vertex and face lists.

        See sphere example: https://github.com/mozman/ezdxf/blob/master/examples/r12writer.py

        Args:
            vertices: iterable of ``(x, y, z)`` tuples
            faces: iterable of 3 or 4 vertex indices, indices have to be 0-based
            layer: layer name as string see :meth:`add_line`
            color: color as :ref:`ACI` see :meth:`add_line`
            linetype: line type as string see :meth:`add_line`

        c                p   dg}|j                  t                     |j                  t        dd             |j                  t        d|              |j                  t        d             |j                  t        d             j                  j	                  dj                  |             y )Nr   r   r   r   G   H   r`   rb   rc   ro   r9   r@   re   )r   rk   ri   
face_countrh   rj   r8   vertex_counts     r:   write_polylinez8R12FastStreamWriter.add_polyface.<locals>.write_polyline  s    "#CJJ{5%:;JJwr1~&JJwr5)*JJwr<01JJwr:./KKbggcl+r<   c                   t               }d}dt              z   t        d|       z   }D ]2  }|dz  }|j                  |       |j                  t	        |             4 |j                         }|j                          ||fS Nr   r   r   r   )r   rc   ro   r@   rd   getvaluerR   )r   bufcountr*   r   rh   r   s        r:   write_verticesz8R12FastStreamWriter.add_polyface.<locals>.write_vertices  s}    *CEE 22WR5GGA" .
		!		*V,-. AIIK!8Or<   c           	     R   t               }d}dt        	      z   t        d|       z   t        d      z   }D ]J  }|dz  }|j	                  |       t        d|      D ]#  \  }}|j	                  t        ||dz                % L |j                         }|j                          ||fS )Nr   r   r   )r   r   r   r   )r   r   I   J   )r   rc   ro   rd   r@   r   r   rR   )
r   r   r   r*   facer^   indexri   facesrh   s
          r:   write_facesz5R12FastStreamWriter.add_polyface.<locals>.write_faces  s    *CEeU+,"e$% Y'(   8
		!#&'7#> 8KD%IIgdEAI6788
 AIIK!8Or<   r   N@   r   r   rB   rC   )   )r   r   )   r[   )r8   r   r   rh   ri   rj   r   r   r   
vertex_strface_strr   r   s   ``````     @@r:   add_polyfacez R12FastStreamWriter.add_polyface  st    B	, 	,
		 	$ $2#3 j*}
H*%(#-(r<   c           
         
 |\  
|\  dd
 fd}dd	 fd} |         |       }	
z  |	k7  rt        d       j                  j                  d       y)
ao  Add a POLYMESH entity. A POLYMESH is a mesh of m rows and n columns,
        each mesh vertex has its own x-, y- and z coordinates. The mesh can be
        closed in m- and/or n-direction. The vertices have to be in column
        order:  (m0, n0), (m0, n1), (m0, n2), (m1, n0), (m1, n1), (m1, n2), ...

        See example: https://github.com/mozman/ezdxf/blob/master/examples/r12writer.py

        Args:
            vertices: iterable of ``(x, y, z)`` tuples, in column order
            size: mesh dimension as (m, n)-tuple, requirement:
                ``len(vertices) == m*n``
            closed: (m_closed, n_closed) tuple, for closed mesh in m and/or n
                direction
            layer: layer name as string see :meth:`add_line`
            color: color as :ref:`ACI` see :meth:`add_line`
            linetype: line type as string see :meth:`add_line`

        c                   r| dz  } r| dz  } dg}|j                  t                     |j                  t        dd             |j                  t        d|              |j                  t        d             |j                  t        d             	j                  j	                  dj                  |             y )	Nr   r   r   r   r   r   r   r`   r   )
r   rk   ri   rh   rj   mm_closednn_closedr8   s
     r:   r   z8R12FastStreamWriter.add_polymesh.<locals>.write_polyline  s    
"#CJJ{5%:;JJwr1~&JJwr5)*JJwr1~&JJwr1~&KKbggcl+r<   c                    d}dt              z   t        d|       z   }D ]F  }|dz  }j                  j                  |       j                  j                  t	        |             H |S r   )rc   ro   r9   r@   rd   )r   r   r*   r   rh   r8   r   s       r:   r   z8R12FastStreamWriter.add_polymesh.<locals>.write_vertices  sk    EE 22WR5GGA" 6
!!!$!!*V"456 Lr<   zInvalid mesh dimensions.r   N)   r   r   )r   r   rB   r   )rP   r9   r@   )r8   r   sizer   rh   ri   rj   r   r   r   r   r   r   r   s   ``  ```   @@@@r:   add_polymeshz R12FastStreamWriter.add_polymesh  sf    6 1#(	, 	,	 	 	 q5E>788-(r<   c           
        dg}|j                  t        |	|
             |j                  t        |d             |j                  t        dt	        |                   |j                  t        dt	        t        |                         |dk7  r-|j                  t        dt	        t        |                         |dk7  r-|j                  t        d	t	        t        |                         |dk7  r-|j                  t        d
t	        t        |                         |dk7  r$|j                  t        dt	        |                   t        |j                            \  }}|j                  t        dt	        |                   |j                  t        dt	        |                   |j                  t        |d             | j                  j                  dj                  |             y)aA  Add a one line TEXT entity.

        Args:
            text: the text as string
            insert: insert location as ``(x, y)`` tuple
            height: text height in drawing units
            width: text width as factor
            align: text alignment, see table below
            rotation: text rotation in degrees as float
            oblique: oblique in degrees as float, vertical = ``0`` (default)
            style: text style name as string, if FIXED-TABLES are written some
                predefined text styles are available, else text style is
                always ``'STANDARD'``.
            layer: layer name as string see :meth:`add_line`
            color: color as :ref:`ACI` see :meth:`add_line`

        ============   =============== ================= =====
        Vert/Horiz     Left            Center            Right
        ============   =============== ================= =====
        Top            ``TOP_LEFT``    ``TOP_CENTER``    ``TOP_RIGHT``
        Middle         ``MIDDLE_LEFT`` ``MIDDLE_CENTER`` ``MIDDLE_RIGHT``
        Bottom         ``BOTTOM_LEFT`` ``BOTTOM_CENTER`` ``BOTTOM_RIGHT``
        Baseline       ``LEFT``        ``CENTER``         ``RIGHT``
        ============   =============== ================= =====

        The special alignments ``ALIGNED`` and ``FIT`` are not available.

        z0
TEXT
r#   r]   r   r%         ?r&           ru   rv   STANDARD   r   r   r_   r`   N)rb   rc   rd   ro   rA   rp   TEXT_ALIGN_FLAGSupperr9   r@   re   )r8   textinsertheightwidthalignrotationobliquestylerh   ri   rk   halignvaligns                 r:   add_textzR12FastStreamWriter.add_text-  s[   T m

;ue,-

:f2./

71c$i()

72s3v;/01C<JJwr3s5z?34s?JJwr3s8}#567c>JJwr3s7|#456JJJwq#e*-.)%++-8

72s6{+,

72s6{+,

:f2./"''#,'r<   )F)r9   r   )rB   rC   )0NN)rf   Vertexrg   r   rh   rA   ri   Optional[int]rj   Optional[str]rB   rC   )rq   r   rr   floatrh   rA   ri   r   rj   r   rB   rC   )r   ih  r   NN)rq   r   rr   r   rf   r   rg   r   rh   rA   ri   r   rj   r   rB   rC   )
ry   r   rh   rA   ri   r   rj   r   rB   rC   )r   r   NN)r   Iterable[Vertex]r   r   rh   rA   ri   r   rj   r   rB   rC   )
r   r   rh   rA   ri   r   rj   r   rB   rC   )r   rA   r   r   r   r   rh   rA   ri   r   rj   r   rB   rC   )Fr   NN)r   r   r   boolrh   rA   ri   r   rj   r   rB   rC   )xyFr   r   r   NN)r   zIterable[Sequence]r   rA   r   r   r   r   r   r   rh   rA   ri   r   rj   r   rB   rC   )r   r   r   zIterable[Sequence[int]]rh   rA   ri   r   rj   r   rB   rC   ))FFr   NN)r   r   r   ztuple[int, int]rh   rA   ri   r   rj   r   rB   rC   )	r   r   r   r   r   r   r   r   N)r   rA   r   r   r   r   r   r   r   rA   r   r   r   r   r   rA   rh   rA   ri   r   rB   rC   )rD   rE   rF   __doc__r;   rR   rl   rs   rw   rz   r   r   r~   r   r   r   r   r   rG   r<   r:   rQ   rQ   e   s#   21 #"&(( ( 	(
 (  ( 
(F #"&(( ( 	(
 (  ( 
(8 #"&(( ( 	(
 ( ( (  ( 
(D #"&(( ( 	(
  ( 
(2 #"&
"
 
 	

 
  
 

F #"&N"N N 	N
  N 
N((( #( 	(
 ( (  ( 
(6 #"&#)"#) #) 	#)
 #)  #) 
#)P #"&G)"G) G) 	G)
 G) G) G) G)  G) 
G)Z #"&M)"M) 'M) 	M)
 M)  M) 
M)f #"&:)":) :)
 :) :)  :) 
:)~  #;(;( ;( 	;(
 ;( ;( ;( ;( ;( ;( ;( 
;(r<   rQ   Nc                    d| z  g}||j                  d|z         |Adt        |      cxk  rdk  r"n t        d      |j                  d|z         nt        d      dj                  |      S )Nz8
%s
z6
%s
r   i  z62
%d
z6color has to be an integer in the range from 0 to 256.r`   )rb   r   rP   re   )rh   ri   rj   rk   s       r:   rc   rc   k  s     u
C

9x'(E
 S  H  JJzE)*H  773<r<   c           
         g }| D ]/  }|j                  d|t        t        |            fz         |dz  }1 dj                  |      S )N%d
%s
r#   r`   )rb   rA   rp   re   )r   r^   rk   cs       r:   rd   rd   {  sM    
C 

:s3q6{ 334
 773<r<   c                    d| |fz  S )Nr   rG   )r^   r   s     r:   ro   ro     s    u%%r<   xysebva9    0
SECTION
  2
HEADER
  9
$ACADVER
  1
AC1009
  9
$DWGCODEPAGE
  3
ANSI_1252
  0
ENDSEC
  0
SECTION
  2
TABLES
  0
TABLE
  2
LTYPE
  5
431
 70
20
  0
LTYPE
  5
40F
  2
CONTINUOUS
 70
0
  3
Solid line
 72
65
 73
0
 40
0.0
  0
LTYPE
  5
410
  2
CENTER
 70
0
  3
Center ____ _ ____ _ ____ _ ____ _ ____ _ ____
 72
65
 73
4
 40
2.0
 49
1.25
 49
-0.25
 49
0.25
 49
-0.25
  0
LTYPE
  5
411
  2
DASHED
 70
0
  3
Dashed __ __ __ __ __ __ __ __ __ __ __ __ __ _
 72
65
 73
2
 40
0.75
 49
0.5
 49
-0.25
  0
LTYPE
  5
412
  2
PHANTOM
 70
0
  3
Phantom ______  __  __  ______  __  __  ______
 72
65
 73
6
 40
2.5
 49
1.25
 49
-0.25
 49
0.25
 49
-0.25
 49
0.25
 49
-0.25
  0
LTYPE
  5
413
  2
HIDDEN
 70
0
  3
Hidden __ __ __ __ __ __ __ __ __ __ __ __ __ __
 72
65
 73
2
 40
9.525
 49
6.345
 49
-3.175
  0
LTYPE
  5
43B
  2
CENTERX2
 70
0
  3
Center (2x) ________  __  ________  __  ________
 72
65
 73
4
 40
3.5
 49
2.5
 49
-0.25
 49
0.5
 49
-0.25
  0
LTYPE
  5
43C
  2
CENTER2
 70
0
  3
Center (.5x) ____ _ ____ _ ____ _ ____ _ ____
 72
65
 73
4
 40
1.0
 49
0.625
 49
-0.125
 49
0.125
 49
-0.125
  0
LTYPE
  5
43D
  2
DASHEDX2
 70
0
  3
Dashed (2x) ____  ____  ____  ____  ____  ____
 72
65
 73
2
 40
1.2
 49
1.0
 49
-0.2
  0
LTYPE
  5
43E
  2
DASHED2
 70
0
  3
Dashed (.5x) _ _ _ _ _ _ _ _ _ _ _ _ _ _
 72
65
 73
2
 40
0.3
 49
0.25
 49
-0.05
  0
LTYPE
  5
43F
  2
PHANTOMX2
 70
0
  3
Phantom (2x)____________    ____    ____    ____________
 72
65
 73
6
 40
4.25
 49
2.5
 49
-0.25
 49
0.5
 49
-0.25
 49
0.5
 49
-0.25
  0
LTYPE
  5
440
  2
PHANTOM2
 70
0
  3
Phantom (.5x) ___ _ _ ___ _ _ ___ _ _ ___ _ _ ___
 72
65
 73
6
 40
1.25
 49
0.625
 49
-0.125
 49
0.125
 49
-0.125
 49
0.125
 49
-0.125
  0
LTYPE
  5
441
  2
DASHDOT
 70
0
  3
Dash dot __ . __ . __ . __ . __ . __ . __ . __
 72
65
 73
4
 40
1.4
 49
1.0
 49
-0.2
 49
0.0
 49
-0.2
  0
LTYPE
  5
442
  2
DASHDOTX2
 70
0
  3
Dash dot (2x) ____  .  ____  .  ____  .  ____
 72
65
 73
4
 40
2.4
 49
2.0
 49
-0.2
 49
0.0
 49
-0.2
  0
LTYPE
  5
443
  2
DASHDOT2
 70
0
  3
Dash dot (.5x) _ . _ . _ . _ . _ . _ . _ . _
 72
65
 73
4
 40
0.7
 49
0.5
 49
-0.1
 49
0.0
 49
-0.1
  0
LTYPE
  5
444
  2
DOT
 70
0
  3
Dot .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
 72
65
 73
2
 40
0.2
 49
0.0
 49
-0.2
  0
LTYPE
  5
445
  2
DOTX2
 70
0
  3
Dot (2x) .    .    .    .    .    .    .    .
 72
65
 73
2
 40
0.4
 49
0.0
 49
-0.4
  0
LTYPE
  5
446
  2
DOT2
 70
0
  3
Dot (.5) . . . . . . . . . . . . . . . . . . .
 72
65
 73
2
 40
0.1
 49
0.0
 49
-0.1
  0
LTYPE
  5
447
  2
DIVIDE
 70
0
  3
Divide __ . . __ . . __ . . __ . . __ . . __
 72
65
 73
6
 40
1.6
 49
1.0
 49
-0.2
 49
0.0
 49
-0.2
 49
0.0
 49
-0.2
  0
LTYPE
  5
448
  2
DIVIDEX2
 70
0
  3
Divide (2x) ____  . .  ____  . .  ____  . .  ____
 72
65
 73
6
 40
2.6
 49
2.0
 49
-0.2
 49
0.0
 49
-0.2
 49
0.0
 49
-0.2
  0
LTYPE
  5
449
  2
DIVIDE2
 70
0
  3
Divide(.5x) _ . _ . _ . _ . _ . _ . _ . _
 72
65
 73
6
 40
0.8
 49
0.5
 49
-0.1
 49
0.0
 49
-0.1
 49
0.0
 49
-0.1
  0
ENDTAB
  0
TABLE
  2
STYLE
  5
433
 70
18
  0
STYLE
  5
417
  2
STANDARD
 70
0
 40
0.0
 41
1.0
 50
0.0
 71
0
 42
0.2
  3
txt
  4

  0
STYLE
  5
44A
  2
OpenSans
 70
0
 40
0.0
 41
1.0
 50
0.0
 71
0
 42
1.0
  3
OpenSans-Regular.ttf
  4

  0
STYLE
  5
44F
  2
OpenSansCondensed-Light
 70
0
 40
0.0
 41
1.0
 50
0.0
 71
0
 42
1.0
  3
OpenSansCondensed-Light.ttf
  4

  0
ENDTAB
  0
TABLE
  2
VIEW
  5
434
 70
0
  0
ENDTAB
  0
ENDSEC
)FrI   )r9   z"Union[TextIO, BinaryIO, str, Path]rS   r   rT   rA   rB   zIterator[R12FastStreamWriter])NN)rh   rA   ri   r   rj   r   rB   rA   )r#   )r   r   rB   rA   )r^   r   rB   rA   )$
__future__r   typingr   r   r   r   r   r	   r
   r   
contextlibr   	functoolsr   ior   pathlibr   ezdxf.lldxf.tagwriterr   r   r   roundrp   r   r   r.   rV   rQ   rc   rd   ro   	frozensetFORMAT_CODESrY   rG   r<   r:   <module>r     s"   #	 	 	 &    1	%eQ   BRbrB % %  %.%% 
% #	% %PC( C(N HL$7D & "H	r<   