
    ha                       % S SK Jr  S SKJrJrJrJrJrJrJ	r	J
r
  S SKJr  S SKJr  S SKrS SKrS SKrS SKrS SKJrJrJrJrJrJr  S SKJr  S SKJrJrJrJ r J!r!  \(       a  S S	K"J#r#  S
r$\" \RJ                  \RJ                  5      r&Sr'Sr( " S S\RR                  5      r* " S S\+5      r, " S S\,5      r- " S S\,5      r.\R^                  " SS9 " S S5      5       r0\R^                  " SS9 " S S5      5       r1S2S3S jjr2\R^                  " SS9 " S S5      5       r3 " S S5      r4 " S  S!5      r5      S4S" jr6      S5S# jr7 S6       S7S$ jjr8      S8S% jr9S9S& jr: S6       S:S' jjr;\\5\/\\
\1\<4      4   r=S(\>S)'    S6         S;S* jjr?S<S+ jr@  S=     S>S, jjrAS?S@S- jjrBS. rC\$4S/S0.       SAS1 jjjrDg)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                  (    \ rS rSrSrSrSrSrSrSr	g)	IntersectionType(   r            r    N)
__name__
__module____qualname____firstlineno__NONEREGULARSTARTEND	COLLINEAR__static_attributes__r#       G/var/www/html/env/lib/python3.13/site-packages/ezdxf/render/hatching.pyr   r   (   s    DGE
CIr.   r   c                      \ rS rSrSrSrg)HatchingError0   z3Base exception class of the :mod:`hatching` module.r#   Nr$   r%   r&   r'   __doc__r-   r#   r.   r/   r1   r1   0       =r.   r1   c                      \ rS rSrSrSrg)HatchLineDirectionError6   z3Hatching direction is undefined or a (0, 0) vector.r#   Nr3   r#   r.   r/   r7   r7   6   r5   r.   r7   c                      \ rS rSrSrSrg)DenseHatchingLinesError<   zCVery small hatching distance which creates too many hatching lines.r#   Nr3   r#   r.   r/   r:   r:   <   s    Mr.   r:   T)frozenc                  4    \ rS rSr% S\S'   S\S'   S\S'   Srg)	LineB   r   startendfloatdistancer#   N)r$   r%   r&   r'   __annotations__r-   r#   r.   r/   r>   r>   B   s    K	IOr.   r>   c                  X    \ rS rSr% Sr\R                  rS\S'   \	r
S\S'   \	rS\S'   Srg	)
IntersectionI   zRepresents an intersection.r   typer   p0p1r#   N)r$   r%   r&   r'   r4   r   r(   rH   rD   	NONE_VEC2rI   rJ   r-   r#   r.   r/   rF   rF   I   s*    %-22D
2BBr.   rF   c                2    [        U 5      U:  a  gU S:  a  gg)Nr           r    )abs)rC   abs_tols     r/   side_of_linerQ   R   s    
8}w#~r.   c                  `    \ rS rSr% SrS\S'   S\S'   S\S'             SS jrSS	 jrS
rg)	HatchLineZ   a  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	directionrB   rC   c                   U R                   n[        X5-
  5      n[        XE-
  5      nUS:X  a:  US:X  a  [        [        R                  X5      $ [        [        R
                  U5      $ US:X  a  [        [        R                  U5      $ Xg:w  a;  [        X5-
  X4-
  -  5      n[        [        R                  UR                  X(5      5      $ [        5       $ )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   )
rC   rQ   rF   r   r,   r*   r+   rO   r)   lerp)	selfabdist_adist_bline_distanceside_aside_bfactors	            r/   intersect_lineHatchLine.intersect_linei   s    . f45f45Q;{#$4$>$>EE#$4$:$:A>>q[ 0 4 4a88&0V_EFF 0 8 8!&&:KLL~r.   c                    [        U R                  U R                  U R                  -   U5       Vs/ s H"  n[        [        R
                  U[        5      PM$     sn$ s  snf )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   rU   rV   rF   r   r)   rK   )rY   curveps      r/   intersect_cubic_bezier_curve&HatchLine.intersect_cubic_bezier_curve   sZ     6T[[4>>95
 )111i@
 	
 
s   )Ar#   N)
rZ   r   r[   r   r\   rB   r]   rB   returnrF   )re   r   ri   zSequence[Intersection])	r$   r%   r&   r'   r4   rD   rb   rg   r-   r#   r.   r/   rS   rS   Z   sS     LOO$$ $ 	$
 $ 
$L
r.   rS   c                  Z    \ rS rSrSrS
S jrSS jrSS jrSS jr        SS jr	Sr
g	)PatternRenderer   a  
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                    UR                   U l         UR                  U l        X l        [        R                  " U Vs/ s H  n[        U5      PM     sn5      U l        g s  snf N)rU   rV   patternmathfsumrO   pattern_length)rY   
hatch_linero   es       r/   __init__PatternRenderer.__init__   sH     ''#--"ii(AAQ(AB(As   Ac                T    U R                   U R                  U R                  U-  -  -   $ rn   )rU   rV   rr   )rY   indexs     r/   sequence_originPatternRenderer.sequence_origin   s%    {{T^^t/B/BU/JKKKr.   c              #    #    UR                  U5      (       a  gU R                  nUS:  a  X4v   gU R                  nUR                  X!-
  5      S:  a  X!p!U R                  nUR                  X-
  5      nUR                  X%-
  5      n[        Xc5      u  p[        Xs5      u  pX:X  a  U R                  XU5       Sh  vN   gU	S:  a   U R                  UU	U5       Sh  vN   US-  nX:  a%  U R                  U5       Sh  vN   US-  nX:  a  M%  US:  a  U R                  USU5       Sh  vN   gg Nx NX N7 N7f)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&.>rM   r    )iscloserr   rV   dotrU   divmodrender_offset_to_offsetrender_full_pattern)rY   r@   rA   lengthrV   rU   s_diste_dists_indexs_offsete_indexe_offsets               r/   renderPatternRenderer.render   s[     ==$$D=*NN	==%+3u~.s|,"62"6233GxPPPc>33  
 qLG//888qLG  c>33    Q 9sN   B;D>=D6>!D>D8 "D>D:D>D>/D<0D>8D>:D><D>c              #     #    U R                   nU R                  U5      nU R                   H-  nUS:X  a  X34v   M  X2[        U5      -  -   nUS:  a  X54v   UnM/     g 7fNrM   )rV   ry   ro   rO   )rY   rx   rV   start_pointdash	end_points         r/   r   #PatternRenderer.render_full_pattern   sb     NN	**51LLDs{!..'c$i*??	#:%00' !s   AAc              #  
  #    U R                   nU R                  U5      nXTU-  -   nSnU R                   HI  nU[        U5      -  nXr:  a  M  US:X  a  Xf4v   M%  XT[	        Xs5      -  -   n	US:  a  Xi4v   Xs:  a    g U	nMK     g 7fr   )rV   ry   ro   rO   min)
rY   rx   r   r   rV   rU   r   rC   r   r   s
             r/   r   'PatternRenderer.render_offset_to_offset   s      NN	%%e,833LLDD	!H"s{!.."X1H%HH	#:%00'' !s   BB)rV   rU   ro   rr   N)rs   rS   ro   Sequence[float])rx   rB   ri   r   )r@   r   rA   r   ri   Iterator[tuple[Vec2, Vec2]])rx   rB   ri   r   )rx   rB   r   rB   r   rB   ri   r   )r$   r%   r&   r'   r4   ru   ry   r   r   r   r-   r#   r.   r/   rk   rk      sC    ,CL0d(((&+(7<(	$(r.   rk   c                  \    \ rS rSrSrS\4       S
S jjrS rSS jrSS jr	SS jr
S	rg)HatchBaseLinei  aW  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                p   Xl          UR                  5       U l        X0l        U* R                  U R                  U-
  5      U l        [        U R                  5      U:  a  [        S5      eU R                   U R                  -   U l
        U(       a  X@l        g / U l        g ! [         a    [	        S5      ef = f)Nzhatch baseline has no directionzhatching lines are too narrow)rU   	normalizerV   ZeroDivisionErrorr7   offsetdetnormal_distancerO   r:   _endline_pattern)rY   rU   rV   r   r   min_hatch_line_distances         r/   ru   HatchBaseLine.__init__(  s     	M&002DN (.wmmDNNV4K&Lt##$'>>)*IJJKK$..0	9E2 ! 	M)*KLL	Ms   B B5c                    U R                   R                   SU R                  < SU R                  < SU R                  < S3$ )Nz(origin=z, direction=z	, offset=))	__class__r$   rU   rV   r   )rY   s    r/   __repr__HatchBaseLine.__repr__<  sB    ~~&&'x ?*)DKK?!E	
r.   c                    XR                   -  n[        U R                  U R                  U-  -   U R                  U5      $ )z>Returns the :class:`HatchLine` at the given signed `distance`.)r   rS   rU   r   rV   )rY   rC   ra   s      r/   rs   HatchBaseLine.hatch_lineB  s5    000t{{V';;T^^XVVr.   c                X    U R                   U-
  R                  U R                  U-
  5      $ )zRReturns the signed normal distance of the given `point` from this
hatch baseline.
)rU   r   r   )rY   points     r/   signed_distanceHatchBaseLine.signed_distanceG  s'    
 e#((U):;;r.   c                L    [        U R                  U5      U R                  5      $ )zEReturns the :class:`PatternRenderer` for the given signed `distance`.)rk   rs   r   )rY   rC   s     r/   pattern_rendererHatchBaseLine.pattern_rendererN  s    tx8$:K:KLLr.   )r   rV   r   r   r   rU   )rU   r   rV   r   r   r   r   zOptional[list[float]])rC   rB   ri   rS   )r   r   ri   rB   )rC   rB   ri   rk   )r$   r%   r&   r'   r4   MIN_HATCH_LINE_DISTANCEru   r   rs   r   r   r-   r#   r.   r/   r   r     sU    0 /3 7NN N 	N
 ,N(
W
<Mr.   r   c                *   US:w  d   eU  Vs/ s H  o"U-  PM	     nn[        [        R                  " [        U5      5      5      n[        [        R                  " [	        U5      5      5      n[        XT5       Vs/ s H  oaU-  PM	     sn$ s  snf s  snf )zLReturns all hatch line distances in the range of the given point
distances.
rM   )intrp   ceilmaxr   range)point_distancesr   dnormal_factorsmax_line_numbermin_line_numbernums          r/   hatch_line_distancesr   S  s     c!!!3BC?a/)?NC$))C$789O$))C$789O-2?-TU-Tcc!-TUU D Vs   B:Bc              #    #    [        U5      nUS:  a  gUS   R                  US   5      (       a  US-  nUS:  a  gXS-
     nU R                  U5      n[        U5       H  nX   nU R                  U5      n[	        XG4U R
                  5       Hm  nU R                  U5      n	U	R                  UUUU5      n
U
R                  [        R                  :w  d  MH  U
R                  [        R                  :w  d  Mh  X4v   Mo     UnUnM     g7f)zYields 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   rN   r    )lenr|   r   r   r   r   rs   rb   rH   r   r(   r,   )baselinepolygoncount
prev_point	dist_prevrx   r   
dist_pointhatch_line_distancers   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D	D	7D	c              #  B   #    [        X[        U5       Sh  vN   g N7f)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 x3DiPPP   c              #    #    [        U5       GHO  n[        U[        5      (       av  UR                   Vs/ s H  o0R	                  U5      PM     nn[        X@R                  5       H1  nU R                  U5      nUR                  U5       H  nXu4v   M
     M3     M  [        R                  " U5      u  pU R	                  U5      n
U R	                  U	5      n[        X4U R                  5       Hk  nU R                  U5      nUR                  XX5      nUR                  [        R                  :w  d  MF  UR                  [        R                  :w  d  Mf  Xu4v   Mm     GMR     gs  snf 7f)zYields 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   rs   rg   r   generaterb   rH   r   r(   r,   )r   pathpath_elementrf   	distancesr   rs   r   rZ   r[   r\   r]   s               r/   intersect_pathr     sE     't,lH--5A5P5P5P((+5P   (<33(# &001DE
$AA,OB11 P	( ==.DA--a0F--a0F'; (":":(# &001DE
..qVDGG/444#3#=#==11( -s   3E(E#C!E(4E(E(c              #  x  #    [        U 5      S:X  a  g U R                  nUnU R                  5        H  nUR                  n[	        U[
        5      (       a  UR                  U5      (       d  X4v   UnO[	        U[        5      (       a  UR                  U5      (       d  X4v   Os[	        U[        5      (       a%  [        XR                  UR                  U45      v   O9[	        U[        5      (       a$  [        XR                  U45      n[        U5      v   UnM     UR                  U5      (       d  X4v   g g 7f)Nr   )r   r@   commandsrA   r   r   r|   r   r   r   ctrl1ctrl2r   r   ctrlr   )r   r@   
path_startcommandrA   curve3s         r/   r   r     s    
4yA~JJEJ==?kkgv&&%%e,,''J((s1C1C***E=='--EFF**ullC89F+F33 # e$$ %s   D8D:c              #  B   #    [        X[        U5       Sh  vN   g N7f)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              #    #    [        [        5      nU Hk  nU(       a  U" 5       (       a    gU" X5       HG  u  pgUR                  [        R                  :w  d   eU[        U[        5         R                  U5        MI     Mm     UR                  5        H  u  pxU(       a  U" 5       (       a    g[        n	[        n
[        X5       Hz  nU	[        L a  UR                  n	UR                  n
M&  UR                  R                  U
5      (       a  UR                  n
MT  [        XU5      v   UR                  n	UR                  n
M|     U	[        Ld  M  [        XU5      v   M     g7f)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   listrH   r   r(   roundKEY_NDIGITSappenditemsrK   _line_segmentsr@   rA   r|   r>   )r   
geometriesintersection_funcr   pointsgeometryr   rC   verticesr@   rA   lines               r/   r   r     s     /:$.?F-hALB77.333335;/077; B  %lln"86D	!

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

hh 7 	!u8,,% -s   EE E c              #  \  #    [        U 5      S:  a  g U R                  S S9  Sn[        nU  Hz  nUR                  [        R
                  :X  d  UR                  [        R                  :X  a  MA  UR                  nU[        L a  SnUnM\  U(       a  [        X5U5      v   U(       + nUnM|     g 7f)Nr!   c                @    U R                   R                  [        5      $ rn   )rI   r   SORT_NDIGITS)rf   s    r/   <lambda> _line_segments.<locals>.<lambda>@  s    

< 8r.   )keyFT)	r   sortrK   rH   r   r(   r,   rI   r>   )r   rC   insider   r   r   s         r/   r   r   =  s     
8}qMM8M9FJ77&+++rww:J:T:T/T"FJz(33
 s   B*B,c           	   #    #    U R                   b  U R                  R                  (       a  g[        U R                   R                  5      S:X  a  gU R                  5       nU R                  R                  R                  n[        X5      n[        XS9 H  n[        Xe5       H  nUR                  UR                  5      nUR                  UR                  UR                  5       H  u  pUR                   (       aR  UR#                  U	R$                  U	R&                  U45      UR#                  U
R$                  U
R&                  U45      4v   [)        U	5      [)        U
5      4v   M     M     M     g7f)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)ro   dxf
solid_fillr   linesocs	elevationzhatch_boundary_pathspattern_baselinesr   r   rC   r   r@   rA   	transformto_wcsxyr   )r   filter_text_boxesr   r   r   r   r   r   r   srt   s              r/   hatch_entityr  S  s    * '++"8"8
7??  !Q&
++-C%%''I <E &gK0D#44T]]CL$++DJJA==**acc133	%:;SZZacc9->   1gtAw&& B 1 Ls   E1E3c                |   SSK Jn  / nU R                  R                  U R                  R
                  5       H  nU(       a$  UR                  [        R                  -  (       a  M.  U" U5      nUR                  5        H6  n[        U5      (       d  M  UR                  5         UR                  U5        M8     M     U$ )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& )	 K Lr.   c                 8    [         R                   " 5       S-  S-   $ )NgǺF?ga2U0*3?)randomr#   r.   r/   _jiggle_factorr    s    ==?V#f,,r.   Fr   c          	   #    #    U R                   nU(       d  g[        5       nU(       a{  UR                   Vs/ s H  oUR                  R                  PM     nn[        U5      (       a<  [        U5      [        U5      -  n[        5       U-  n[        5       U-  n	[        X5      nUR                   HS  n[        R                  " UR                  5      n
[        UR                  U-   U
UR                  UR                  US9v   MU     gs  snf 7f)zYields 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)rU   rV   r   r   r   )ro   r   r   r   	magnituder   sumr  from_deg_angleangler   
base_pointdash_length_items)r   r   r   ro   jiggle_offsetr   offsetsmeanr  r  rV   s              r/   r  r    s      ooG FM CJ--P-$ 5 5-Pw<<w<#g,.D 4'A 4'A JM''

3	??]2;;//$;
 	
   Qs   4DDB7D)g-q=)rC   rB   ri   r   )r   r   r   rB   ri   zlist[float])r   r   r   zSequence[Vec2]ri   $Iterator[tuple[Intersection, float]]rn   )r   r   r   zSequence[Sequence[Vec2]]r   Optional[Callable[[], bool]]ri   Iterator[Line])r   r   r   r   ri   r"  )r   r   ri   z"Union[Bezier4P, tuple[Vec2, Vec2]])r   r   r   zSequence[Path]r   r#  ri   r$  )
r   r   r   zSequence[Any]r   r   r   r#  ri   r$  )r   zlist[Intersection]rC   rB   ri   r$  )TT)r   r   r   boolri   zIterator[tuple[Vec3, Vec3]])T)r   r   ri   z
list[Path])r   r   r   rB   r   r%  ri   zIterator[HatchBaseLine])E
__future__r   typingr   r   r   r   r   r	   r
   r   typing_extensionsr   collectionsr   enumrp   dataclassesr  
ezdxf.mathr   r   r   r   r   r   ezdxfr   r  r   r   r   r   r   ezdxf.entities.polygonr   r   nanrK   r   r   IntEnumr   	Exceptionr1   r7   r:   	dataclassr>   rF   rQ   rS   rk   r   r   r   r   r   r   r   rB   r   rD   r   r   r  r   r  r  r#   r.   r/   <module>r3     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.   