
    h                        % S SK Jr  S SKJrJr  SSKJrJr  SSKJ	r	  \(       a  S SK
Jr  S/r\" 5       rS\S	'    " S
 S5      rg)    )annotations)TYPE_CHECKINGSequence   )Bodyload)EncodedData)	DXFEntity	AcisCacheSequence[Body]	NO_BODIESc                  T    \ rS rSrSrS
S jr\SS j5       rSS jrSS jr	SS jr
Srg	)r      zThis cache manages ACIS bodies created from SAT or SAB data stored in DXF 
entities.

Each entry is a list of ACIS bodies and is indexed by a hash calculated from the 
source content of the SAT or SAB data.

c                .    0 U l         SU l        SU l        g )Nr   _entrieshitsmissesselfs    B/var/www/html/env/lib/python3.13/site-packages/ezdxf/acis/cache.py__init__AcisCache.__init__   s    35	    c                    [        U [        5      (       a  [        [        U 5      5      $ [        U [        5      (       a  [        [        U 5      5      $ [        U 5      $ N)
isinstancelisthashtuple	bytearraybytes)datas    r   	hash_dataAcisCache.hash_data   sD    dD!!d$$i((d$$Dzr   c                ,    [        U R                  5      $ r   )lenr   r   s    r   __len__AcisCache.__len__$   s    4==!!r   c                8   U(       d  [         $ [        R                  U5      nU R                  R	                  U[         5      nU[         La  U =R
                  S-  sl        U$ U =R                  S-  sl        [        [        U5      5      nX0R                  U'   U$ )Nr   )	r   r   r$   r   getr   r   r    r   )r   r#   
hash_valuebodiess       r   
get_bodiesAcisCache.get_bodies'   sx    ((.
"":y9"IINIMqtDz"$*j!r   c                p    SSK Jn  [        X5      (       d  [        $ U R	                  UR
                  5      $ )Nr   )r   )ezdxf.entitiesr   r   r   r.   	acis_data)r   entityDxfBodys      r   from_dxf_entityAcisCache.from_dxf_entity6   s+    2&**v//00r   r   N)returnNone)r#   r	   r7   int)r7   r9   )r#   r	   r7   r   )r3   r
   r7   r   )__name__
__module____qualname____firstlineno____doc__r   staticmethodr$   r(   r.   r5   __static_attributes__ r   r   r   r      s/    
  "1r   N)
__future__r   typingr   r   entitiesr   r   
type_hintsr	   r1   r
   __all__r    r   __annotations__r   rA   r   r   <module>rH      s6    # *   #(-!G	> #,1 ,1r   