
    vj7                     ,    d dl mc mZ  G d de      Zy)    Nc                       e Zd Zd Zd Zy)	AmfWriterc                      d| _         || _        y )Nmm)unitstessellation)selfr   s     L/DATA/.local/lib/python3.12/site-packages/cadquery/occ_impl/exporters/amf.py__init__zAmfWriter.__init__   s    
(    c                 0   t        j                  d| j                        }t        j                  |dd      }t        j                  |d      }t        j                  |d      }t        j                  |d      }| j                  d	   D ]  }t        j                  |d
      }t        j                  |d      }	t        j                  |	d      }
t        |j                        |
_        t        j                  |	d      }t        |j                        |_        t        j                  |	d      }t        |j                        |_         | j                  d   D ]  }t        j                  |d      }t        j                  |d      }t        |d	         |_        t        j                  |d      }t        |d         |_        t        j                  |d      }t        |d         |_         t        j                  |      j                  |d      }y )Namf)r   object0)idmeshverticesvolumer   vertexcoordinatesxyz   trianglev1v2v3   T)xml_declaration)ETElementr   
SubElementr   strr   textr   r   ElementTreewrite)r	   outFiler   r   r   r   r   vvtxcoordr   r   r   tr   r   r   r   s                     r
   writeAmfzAmfWriter.writeAmf
   s   jjdjj1sH5}}VV,==z2tX. ""1%A--(3CMM#}5EeS)AXAFeS)AXAFeS)AXAF & ""1%A}}VZ8Hx.B!A$iBGx.B!A$iBGx.B!A$iBG & nnS!'''Fr   N)__name__
__module____qualname__r   r-    r   r
   r   r      s    )
Gr   r   )xml.etree.cElementTreeetreecElementTreer!   r   r   r1   r   r
   <module>r5      s    # ##G #Gr   