
    Oga                       U 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Zd dlZd dlZd dlZd dlmZmZmZmZmZmZ d dlmZ d dlmZmZmZm Z m!Z! erd d	l"m#Z# d
Z$ eejJ                  ejJ                        Z&dZ'dZ( G d dejR                        Z* G d de+      Z, G d de,      Z- G d de,      Z. ej^                  d       G d d             Z0 ej^                  d       G d d             Z1d2d3dZ2 ej^                  d       G d d             Z3 G d d      Z4 G d  d!      Z5	 	 	 	 	 	 d4d"Z6	 	 	 	 	 	 d5d#Z7	 d6	 	 	 	 	 	 	 d7d$Z8	 	 	 	 	 	 d8d%Z9d9d&Z:	 d6	 	 	 	 	 	 	 d:d'Z;ee5egee
e1e<f      f   Z=d(e>d)<   	 d6	 	 	 	 	 	 	 	 	 d;d*Z?d<d+Z@	 	 d=	 	 	 	 	 d>d,ZAd?d@d-ZBd. ZCe$fd/d0	 	 	 	 	 	 	 dAd1ZDy)B    )annotations)IteratorSequenceTYPE_CHECKINGCallableAnyUnionOptionalTuple)	TypeAlias)defaultdictN)Vec2Vec3Bezier3PBezier4P intersection_ray_cubic_bezier_2dquadratic_to_cubic_bezier)const)PathLineToMoveToCurve3ToCurve4To)
DXFPolygong-C6?   
   c                       e Zd ZdZdZdZdZdZy)IntersectionTyper            r   N)__name__
__module____qualname__NONEREGULARSTARTEND	COLLINEAR     Z/var/www/html/public_html/myphp/venv/lib/python3.12/site-packages/ezdxf/render/hatching.pyr   r   (   s    DGE
CIr+   r   c                      e Zd ZdZy)HatchingErrorz3Base exception class of the :mod:`hatching` module.Nr"   r#   r$   __doc__r*   r+   r,   r.   r.   0       =r+   r.   c                      e Zd ZdZy)HatchLineDirectionErrorz3Hatching direction is undefined or a (0, 0) vector.Nr/   r*   r+   r,   r3   r3   6   r1   r+   r3   c                      e Zd ZdZy)DenseHatchingLinesErrorzCVery small hatching distance which creates too many hatching lines.Nr/   r*   r+   r,   r5   r5   <   s    Mr+   r5   T)frozenc                  ,    e Zd ZU ded<   ded<   ded<   y)Liner   startendfloatdistanceN)r"   r#   r$   __annotations__r*   r+   r,   r8   r8   B   s    K	IOr+   r8   c                  P    e Zd ZU dZej
                  Zded<   eZ	ded<   eZ
ded<   y)IntersectionzRepresents an intersection.r   typer   p0p1N)r"   r#   r$   r0   r   r%   r@   r=   	NONE_VEC2rA   rB   r*   r+   r,   r?   r?   I   s*    %-22D
2BBr+   r?   c                .    t        |       |k  ry| dkD  ryy)Nr           r   )abs)r<   abs_tols     r,   side_of_linerI   R   s    
8}w#~r+   c                  T    e Zd ZU dZded<   ded<   ded<   	 	 	 	 	 	 	 	 	 	 d
dZddZy	)	HatchLinea,  Represents a single hatch line.

    Args:
        origin: the origin of the hatch line as :class:`~ezdxf.math.Vec2` instance
        direction: the hatch line direction as :class:`~ezdxf.math.Vec2` instance, must not (0, 0)
        distance: the normal distance to the base hatch line as float

    r   origin	directionr;   r<   c                   | j                   }t        ||z
        }t        ||z
        }|dk(  r:|dk(  rt        t        j                  ||      S t        t        j
                  |      S |dk(  rt        t        j                  |      S ||k7  r>t        ||z
  ||z
  z        }t        t        j                  |j                  ||            S t               S )a  Returns the :class:`Intersection` of this hatch line and the line
        defined by the points `a` and `b`.
        The arguments `dist_a` and `dist_b` are the signed normal distances of
        the points `a` and `b` from the hatch baseline.
        The normal distances from the baseline are easy to calculate by the
        :meth:`HatchBaseLine.signed_distance` method and allow a fast
        intersection calculation by a simple point interpolation.

        Args:
            a: start point of the line as :class:`~ezdxf.math.Vec2` instance
            b: end point of the line as :class:`~ezdxf.math.Vec2` instance
            dist_a: normal distance of point `a` to the hatch baseline as float
            dist_b: normal distance of point `b` to the hatch baseline as float

        r   )
r<   rI   r?   r   r)   r'   r(   rG   r&   lerp)	selfabdist_adist_bline_distanceside_aside_bfactors	            r,   intersect_linezHatchLine.intersect_linei   s    . f}45f}45Q;{#$4$>$>1EE#$4$:$:A>>q[ 0 4 4a88v&=0Vf_EFF 0 8 8!&&F:KLL~r+   c                    t        | j                  | j                  | j                  z   |      D cg c]!  }t        t        j
                  |t              # c}S c c}w )u   Returns 0 to 3 :class:`Intersection` points of this hatch line with
        a cubic Bèzier curve.

        Args:
            curve: the cubic Bèzier curve as :class:`ezdxf.math.Bezier4P` instance

        )r   rL   rM   r?   r   r&   rC   )rP   curveps      r,   intersect_cubic_bezier_curvez&HatchLine.intersect_cubic_bezier_curve   sQ     6T[[4>>95
 )111i@
 	
 
s   &AN)
rQ   r   rR   r   rS   r;   rT   r;   returnr?   )r[   r   r^   zSequence[Intersection])r"   r#   r$   r0   r=   rY   r]   r*   r+   r,   rK   rK   Z   sS     LOO$$ $ 	$
 $ 
$L
r+   rK   c                  H    e Zd ZdZddZd	dZd
dZddZ	 	 	 	 	 	 	 	 ddZy)PatternRenderera*  
    The hatch pattern of a DXF entity has one or more :class:`HatchBaseLine`
    instances with an origin, direction, offset and line pattern.
    The :class:`PatternRenderer` for a certain distance from the
    baseline has to be acquired from the :class:`HatchBaseLine` by the
    :meth:`~HatchBaseLine.pattern_renderer` method.

    The origin of the hatch line is the starting point of the line
    pattern. The offset defines the origin of the adjacent
    hatch line and doesn't have to be orthogonal to the hatch line direction.

    **Line Pattern**

    The line pattern is a sequence of floats, where a value > 0.0 is a dash, a
    value < 0.0 is a gap and value of 0.0 is a point.

    Args:
        hatch_line: :class:`HatchLine`
        pattern: the line pattern as sequence of float values

    c                    |j                   | _         |j                  | _        || _        t        j                  |D cg c]  }t        |       c}      | _        y c c}w N)rL   rM   patternmathfsumrG   pattern_length)rP   
hatch_linerc   es       r,   __init__zPatternRenderer.__init__   sF     ''#--"ii(AAQ(AB(As   Ac                T    | j                   | j                  | j                  |z  z  z   S rb   )rL   rM   rf   )rP   indexs     r,   sequence_originzPatternRenderer.sequence_origin   s%    {{T^^t/B/BU/JKKKr+   c              #    K   |j                  |      ry| j                  }|dk  r||f y| j                  }|j                  ||z
        dk  r||}}| j                  }|j                  ||z
        }|j                  ||z
        }t        ||      \  }}	t        ||      \  }
}||
k(  r| j                  ||	|      E d{    y|	dkD  r | j                  ||	|      E d{    |dz  }||
k  r$| j                  |      E d{    |dz  }||
k  r$|dkD  r| j                  |d|      E d{    yy7 u7 V7 57 w)a  Yields the pattern lines as pairs of :class:`~ezdxf.math.Vec2`
        instances from the start- to the end point on the hatch line.
        For points the start- and end point are the same :class:`~ezdxf.math.Vec2`
        instance and can be tested by the ``is`` operator.

        The start- and end points should be located collinear at the hatch line
        of this instance, otherwise the points a projected onto this hatch line.

        Ng&.>rE   r   )iscloserf   rM   dotrL   divmodrender_offset_to_offsetrender_full_pattern)rP   r9   r:   lengthrM   rL   s_diste_dists_indexs_offsete_indexe_offsets               r,   renderzPatternRenderer.render   sx     ==$$D=*NN	==u%+e3Euv~.sV|,"662"662g33GXxPPPc>33  
 qLG//888qLG  c>33    Q 9sN   B?D?D7 D?"D9#"D?D;D?D?0D=1D?9D?;D?=D?c              #     K   | j                   }| j                  |      }| j                  D ],  }|dk(  r||f ||t        |      z  z   }|dkD  r||f |}. y wNrE   )rM   rl   rc   rG   )rP   rk   rM   start_pointdash	end_points         r,   rr   z#PatternRenderer.render_full_pattern   sn     NN	**51LL 	(Ds{!;..')c$i*??	#:%y00'	(s   AAc              #    K   | j                   }| j                  |      }|||z  z   }d}| j                  D ]H  }|t        |      z  }||k  r|dk(  r||f #||t	        ||      z  z   }	|dkD  r||	f ||k\  r y |	}J y wr|   )rM   rl   rc   rG   min)
rP   rk   rw   ry   rM   rL   r}   r<   r~   r   s
             r,   rq   z'PatternRenderer.render_offset_to_offset   s      NN	%%e,y833LL 	(DD	!H("s{!;.."YXx1H%HH	#:%y00x''	(s   B BN)rg   rK   rc   Sequence[float])rk   r;   r^   r   )r9   r   r:   r   r^   Iterator[tuple[Vec2, Vec2]])rk   r;   r^   r   )rk   r;   rw   r;   ry   r;   r^   r   )	r"   r#   r$   r0   ri   rl   rz   rr   rq   r*   r+   r,   r`   r`      sC    ,CL0d(((&+(7<(	$(r+   r`   c                  J    e Zd ZdZdef	 	 	 	 	 	 	 ddZd Zd	dZd
dZddZ	y)HatchBaseLinea  A hatch baseline defines the source line for hatching a geometry.
    A complete hatch pattern of a DXF entity can consist of one or more hatch
    baselines.

    Args:
        origin: the origin of the hatch line as :class:`~ezdxf.math.Vec2` instance
        direction: the hatch line direction as :class:`~ezdxf.math.Vec2` instance, must not (0, 0)
        offset: the offset of the hatch line origin to the next or to the previous hatch line
        line_pattern: line pattern as sequence of floats, see also :class:`PatternRenderer`
        min_hatch_line_distance: minimum hatch line distance to render, raises an
            :class:`DenseHatchingLinesError` exception if the distance between hatch
            lines is smaller than this value

    Raises:
        HatchLineDirectionError: hatch baseline has no direction, (0, 0) vector
        DenseHatchingLinesError: hatching lines are too narrow

    Nc                h   || _         	 |j                         | _        || _        | j                  | j                  |z
        | _        t        | j                        |k  rt        d      | j                   | j                  z   | _
        |r|| _        y g | _        y # t        $ r t	        d      w xY w)Nzhatch baseline has no directionzhatching lines are too narrow)rL   	normalizerM   ZeroDivisionErrorr3   offsetdetnormal_distancerG   r5   _endline_pattern)rP   rL   rM   r   r   min_hatch_line_distances         r,   ri   zHatchBaseLine.__init__(  s     	M&002DN (.wmmDNNV4K&Lt##$'>>)*IJJKK$..0	9E2 ! 	M)*KLL	Ms   B B1c                    | j                   j                   d| j                  d| j                  d| j                  dS )Nz(origin=z, direction=z	, offset=))	__class__r"   rL   rM   r   )rP   s    r,   __repr__zHatchBaseLine.__repr__<  sB    ~~&&'x ?*)DKK?!E	
r+   c                    || j                   z  }t        | j                  | j                  |z  z   | j                  |      S )z>Returns the :class:`HatchLine` at the given signed `distance`.)r   rK   rL   r   rM   )rP   r<   rX   s      r,   rg   zHatchBaseLine.hatch_lineB  s7    D000t{{V';;T^^XVVr+   c                X    | j                   |z
  j                  | j                  |z
        S )zbReturns the signed normal distance of the given `point` from this
        hatch baseline.
        )rL   r   r   )rP   points     r,   signed_distancezHatchBaseLine.signed_distanceG  s'    
 e#((U):;;r+   c                L    t        | j                  |      | j                        S )zEReturns the :class:`PatternRenderer` for the given signed `distance`.)r`   rg   r   )rP   r<   s     r,   pattern_rendererzHatchBaseLine.pattern_rendererN  s    tx8$:K:KLLr+   )rL   r   rM   r   r   r   r   zOptional[list[float]])r<   r;   r^   rK   )r   r   r^   r;   )r<   r;   r^   r`   )
r"   r#   r$   r0   MIN_HATCH_LINE_DISTANCEri   r   rg   r   r   r*   r+   r,   r   r     sU    0 /3 7NN N 	N
 ,N(
W
<Mr+   r   c                   |dk7  sJ | D cg c]  }||z  	 }}t        t        j                  t        |                  }t        t        j                  t	        |                  }t        ||      D cg c]  }||z  	 c}S c c}w c c}w )zTReturns all hatch line distances in the range of the given point
    distances.
    rE   )intrd   ceilmaxr   range)point_distancesr   dnormal_factorsmax_line_numbermin_line_numbernums          r,   hatch_line_distancesr   S  s     c!!!3BCaa/)CNC$))C$789O$))C$789O-2?O-TUcOc!UU D Vs   B6B
c              #     K   t        |      }|dk  ry|d   j                  |d         r|dz  }|dk  ry||dz
     }| j                  |      }t        |      D ]  }||   }| j                  |      }t	        ||f| j
                        D ]i  }| j                  |      }	|	j                  ||||      }
|
j                  t        j                  k7  sF|
j                  t        j                  k7  sd|
|f k |}|} yw)a  Yields all intersection points of the hatch defined by the `baseline` and
    the given `polygon`.

    Returns the intersection point and the normal-distance from the baseline,
    intersection points with the same normal-distance lay on the same hatch
    line.

    r!   Nr   rF   r   )lenrn   r   r   r   r   rg   rY   r@   r   r%   r)   )baselinepolygoncount
prev_point	dist_prevrk   r   
dist_pointhatch_line_distancerg   ips              r,   intersect_polygonr   `  s"     LEqyqz'"+&
19#J((4Iu --e4
#7
#X%=%=$
 	. ",,-@AJ**	B +000GG/999---	.  
	)s   CC>C>/C>c              #  D   K   t        | |t        |      E d{    y7 w)a  Yields all pattern lines for all hatch lines generated by the given
    :class:`HatchBaseLine`, intersecting the given 2D polygons as :class:`Line`
    instances.
    The `polygons` should represent a single entity with or without holes, the
    order of the polygons and their winding orientation (cw or ccw) is not
    important. Entities which do not intersect or overlap should be handled
    separately!

    Each polygon is a sequence of :class:`~ezdxf.math.Vec2` instances, they are
    treated as closed polygons even if the last vertex is not equal to the
    first vertex.

    The hole detection is done by a simple inside/outside counting algorithm and
    far from perfect, but is able to handle ordinary polygons well.

    The terminate function WILL BE CALLED PERIODICALLY AND should return
    ``True`` to terminate execution. This can be used to implement a timeout,
    which can be required if using a very small hatching distance, especially
    if you get the data from untrusted sources.

    Args:
        baseline: :class:`HatchBaseLine`
        polygons: multiple sequences of :class:`~ezdxf.path.Vec2` instances of
            a single entity, the order of exterior- and hole paths and the
            winding orientation (cw or ccw) of paths is not important
        terminate: callback function which is called periodically and should
            return ``True`` to terminate the hatching function

    N)_hatch_geometryr   )r   polygons	terminates      r,   hatch_polygonsr     s     D x3DiPPP     c              #    K   t        |      D ]B  }t        |t              rq|j                  D cg c]  }| j	                  |       }}t        || j                        D ]/  }| j                  |      }|j                  |      D ]  }||f 
 1 t        j                  |      \  }}	| j	                  |      }
| j	                  |	      }t        |
|f| j                        D ]i  }| j                  |      }|j                  ||	|
|      }|j                  t        j                  k7  sF|j                  t        j                  k7  sd||f k E yc c}w w)a  Yields all intersection points of the hatch defined by the `baseline` and
    the given single `path`.

    Returns the intersection point and the normal-distance from the baseline,
    intersection points with the same normal-distance lay on the same hatch
    line.

    N)_path_elements
isinstancer   control_pointsr   r   r   rg   r]   r   generaterY   r@   r   r%   r)   )r   pathpath_elementr\   	distancesr   rg   r   rQ   rR   rS   rT   s               r,   intersect_pathr     se     't, 2lH-5A5P5P01((+I  (<833( 2# &001DE
$AA,O 2B1112	2 ==.DAq--a0F--a0F'; (":":( 	2# &001DE
..q!VVDGG/444#3#=#==111	22s   .EEC"E+E	Ec              #  6  K   t        |       dk(  ry | j                  }|}| j                         D ]  }|j                  }t	        |t
              r|j                  |      s||f |}nt	        |t              r|j                  |      s||f nkt	        |t              r&t        ||j                  |j                  |f       n5t	        |t              r%t        ||j                  |f      }t        |       |} |j                  |      s||f y y w)Nr   )r   r9   commandsr:   r   r   rn   r   r   r   ctrl1ctrl2r   r   ctrlr   )r   r9   
path_startcommandr:   curve3s         r,   r   r     s     
4yA~JJEJ==? kkgv&%%e,Z''J(s1C**E7=='--EFF*ugllC89F+F33 e$Z %s   DDc              #  D   K   t        | |t        |      E d{    y7 w)u@  Yields all pattern lines for all hatch lines generated by the given
    :class:`HatchBaseLine`, intersecting the given 2D :class:`~ezdxf.path.Path`
    instances as :class:`Line` instances. The paths are handled as projected
    into the xy-plane the z-axis of path vertices will be ignored if present.

    Same as the :func:`hatch_polygons` function, but for :class:`~ezdxf.path.Path`
    instances instead of polygons build of vertices. This function **does not
    flatten** the paths into vertices, instead the real intersections of the
    Bézier curves and the hatch lines are calculated.

    For more information see the docs of the :func:`hatch_polygons` function.

    Args:
        baseline: :class:`HatchBaseLine`
        paths: sequence of :class:`~ezdxf.path.Path` instances of a single
            entity, the order of exterior- and hole paths and the winding
            orientation (cw or ccw) of the paths is not important
        terminate: callback function which is called periodically and should
            return ``True`` to terminate the hatching function

    N)r   r   )r   pathsr   s      r,   hatch_pathsr     s     4 x	JJJr   r   	IFuncTypec              #    K   t        t              }|D ]_  }|r	 |       r y || |      D ]F  \  }}|j                  t        j                  k7  sJ |t        |t                 j                  |       H a |j                         D ]  \  }}|r	 |       r yt        }	t        }
t        ||      D ]r  }|	t        u r|j                  }	|j                  }
$|j                  j                  |
      r|j                  }
Lt        |	|
|       |j                  }	|j                  }
t |	t        ust        |	|
|        yw)a@  Returns all pattern lines intersecting the given geometries.

    The intersection_func() should yield all intersection points between a
    HatchBaseLine() and as given geometry.

    The terminate function should return ``True`` to terminate execution
    otherwise ``False``. Can be used to implement a timeout.

    N)r   listr@   r   r%   roundKEY_NDIGITSappenditemsrC   _line_segmentsr9   r:   rn   r8   )r   
geometriesintersection_funcr   pointsgeometryr   r<   verticesr9   r:   lines               r,   r   r     s0     /:$.?F <-hA 	<LB77.333335;/077;	<< %lln -("8X6 
	D	!

hhzz!!#&hh5#x00

hh
	 	!uc8,,%-s   D*D?-D?c              #  B  K   t        |       dk  ry | j                  d        d}t        }| D ]l  }|j                  t        j
                  k(  s|j                  t        j                  k(  r>|j                  }|t        u rd}|}W|rt        |||       | }|}n y w)Nr    c                @    | j                   j                  t              S rb   )rA   r   SORT_NDIGITS)r\   s    r,   <lambda>z _line_segments.<locals>.<lambda>@  s    

< 8 r+   )keyFT)	r   sortrC   r@   r   r%   r)   rA   r8   )r   r<   insider   r   r   s         r,   r   r   =  s     
8}qMM8M9FJ 77&+++rww:J:T:T/T"FJz5(33
s   BBc           	   #    K   | j                   | j                  j                  ryt        | j                   j                        dk(  ry| j                         }| j                  j                  j                  }t        | |      }t        | |      D ]  }t        ||      D ]  }|j                  |j                        }|j                  |j                  |j                        D ]{  \  }	}
|j                   rR|j#                  |	j$                  |	j&                  |f      |j#                  |
j$                  |
j&                  |f      f t)        |	      t)        |
      f }   yw)a  Yields the hatch pattern of the given HATCH or MPOLYGON entity as 3D lines.
    Each line is a pair of :class:`~ezdxf.math.Vec3` instances as start- and end
    vertex, points are represented as lines of zero length, which means the
    start vertex is equal to the end vertex.

    The function yields nothing if `polygon` has a solid- or gradient filling
    or does not have a usable pattern assigned.

    Args:
        polygon: :class:`~ezdxf.entities.Hatch` or :class:`~ezdxf.entities.MPolygon`
            entity
        filter_text_boxes: ignore text boxes if ``True``
        jiggle_origin: move pattern line origins a small amount to avoid intersections
            in corner points which causes errors in patterns

    Nr   jiggle_origin)rc   dxf
solid_fillr   linesocs	elevationzhatch_boundary_pathspattern_baselinesr   r   r<   rz   r9   r:   	transformto_wcsxyr   )r   filter_text_boxesr   r   r   r   r   r   r   srh   s              r,   hatch_entityr   S  s0    * '++"8"8
7??  !Q&
++-C%%''I *;<E &g]K '%0 	'D#44T]]CL$++DJJA '1==**acc133	%:;SZZacc9->   1gtAw&&'	''s   E&E(c                R   ddl m} g }| j                  j                  | j                  j
                        D ]l  }|r|j                  t        j                  z  r# ||      }|j                         D ]/  }t        |      s|j                          |j                  |       1 n |S )zReturns the hatch boundary paths as :class:`ezdxf.path.Path` instances
    of HATCH and MPOLYGON entities. Ignores text boxes if argument
    `filter_text_boxes` is ``True``.
    r   )from_hatch_boundary_path)
ezdxf.pathr   r   rendering_pathsr   hatch_stylepath_type_flagsr   BOUNDARY_PATH_TEXTBOX	sub_pathsr   closer   )r   r   r   loopsboundaryr   sub_paths          r,   r   r   |  s    
 4EMM11'++2I2IJ '!9!9E<W<W!W'1( 	'H8} X&	'	' Lr+   c                 6    t        j                          dz  dz   S )NgǺF?ga2U0*3?)randomr*   r+   r,   _jiggle_factorr     s    ==?V#f,,r+   Fr   c             #    K   | j                   }|syt               }|ru|j                  D cg c]  }|j                  j                   }}t        |      r=t        |      t        |      z  }t               |z  }t               |z  }	t        ||	      }|j                  D ]T  }t        j                  |j                        }
t        |j                  |z   |
|j                  |j                  |       V yc c}w w)a  Yields the hatch pattern baselines of HATCH and MPOLYGON entities as
    :class:`HatchBaseLine` instances.  Set `jiggle_origin` to ``True`` to move pattern
    line origins a small amount to avoid intersections in corner points which causes
    errors in patterns.

    N)rL   rM   r   r   r   )rc   r   r   r   	magnituder   sumr   from_deg_angleangler   
base_pointdash_length_items)r   r   r   rc   jiggle_offsetr   offsetsmeanr   r   rM   s              r,   r   r     s      ooG FM CJ--P$ 5 5PPw<w<#g,.D 4'A 4'A AJM 
''

3	??]2;;//$;
 	

  Qs   *C<C7	B3C<)g-q=)r<   r;   r^   r   )r   r   r   r;   r^   zlist[float])r   r   r   zSequence[Vec2]r^   $Iterator[tuple[Intersection, float]]rb   )r   r   r   zSequence[Sequence[Vec2]]r   Optional[Callable[[], bool]]r^   Iterator[Line])r   r   r   r   r^   r  )r   r   r^   z"Union[Bezier4P, tuple[Vec2, Vec2]])r   r   r   zSequence[Path]r   r  r^   r  )
r   r   r   zSequence[Any]r   r   r   r  r^   r  )r   zlist[Intersection]r<   r;   r^   r  )TT)r   r   r   boolr^   zIterator[tuple[Vec3, Vec3]])T)r   r   r^   z
list[Path])r   r   r   r;   r   r  r^   zIterator[HatchBaseLine])E
__future__r   typingr   r   r   r   r   r	   r
   r   typing_extensionsr   collectionsr   enumrd   dataclassesr   
ezdxf.mathr   r   r   r   r   r   ezdxfr   r   r   r   r   r   r   ezdxf.entities.polygonr   r   nanrC   r   r   IntEnumr   	Exceptionr.   r3   r5   	dataclassr8   r?   rI   rK   r`   r   r   r   r   r   r   r   r;   r   r=   r   r   r   r   r   r   r*   r+   r,   <module>r     s   #	 	 	 ( #       ? ?1 488$	t|| 	I 		m 		m 	 d#  $ d#  $ d#A
 A
 $A
Hr( r(j<M <M~
V$
V7<
V
V))&4)))^ /3"Q"Q&"Q ,"Q 	"QJ#2#2#'#2)#2L 6 /3KKK ,K 	K:  C(5u)<#=>>	9  /3	)-)-)- !)- ,	)-
 )-X0 &'&' &' !	&'R&- &=(
  	(
(
"(
 	(

 (
r+   