Ë
    :vžj‘  ã                   óD   — d dl ZddlmZ ddlmZ dd„Zd	d„ZdeiZdeiZ	y)
é    Né   )Úutil)Ú
PointCloudc                 óf  — t        j                  | j                  «       «      j                  «       }|d|j	                  d«       j                  «       }t        |j                  «       «      }|dk  rt        d«      ‚|€d|v rd}|�|j                  |d«      }t        j                  |j                  «       t        j                  ¬«      }|j                  d|f«      }d}|dd…dd…f   }	|d	k(  ryt        j                  |dd…dd…f   t        j                  ¬«      }t        j                  |t        j                  t        |«      d
ft        j                  ¬«      dz  fd
¬«      }n3|dk\  r.t        j                  |dd…dd…f   t        j                  ¬«      }|j!                  |	|dœ«       |S )a…  
    Load an XYZ file into a PointCloud.

    Parameters
    ------------
    file_obj : an open file-like object
      Source data, ASCII XYZ
    delimiter : None or string
      Characters used to separate the columns of the file
      If not passed will use whitespace or commas

    Returns
    ----------
    kwargs : dict
      Data which can be passed to PointCloud constructor
    NÚ
é   znot enough columns in xyz file!Ú,Ú )Údtypeéÿÿÿÿé   é   éÿ   )Úaxisé   é   )ÚverticesÚcolors)r   Údecode_textÚreadÚstripÚfindÚlenÚsplitÚ
ValueErrorÚreplaceÚnpÚarrayÚfloat64ÚreshapeÚuint8ÚconcatenateÚonesÚupdate)
Úfile_objÚ	delimiterÚkwargsÚrawÚfirstÚcolumnsr   Údatar   r   s
             úe/workspace/moltex-experiments/.pixi/envs/default/lib/python3.12/site-packages/trimesh/exchange/xyz.pyÚload_xyzr-      sk  € ô$ ×
Ñ
˜8Ÿ=™=›?Ó
+×
1Ñ
1Ó
3€CàÐ �#—(‘(˜4“.Ð!×'Ñ'Ó)€Eä�%—+‘+“-Ó €GØ�‚{ÜÐ:Ó;Ð;àÐ˜S E™\àˆ	ØÐà�k‰k˜) SÓ)ˆô �H‰H�S—Y‘Y“[¬¯
©
Ô3€Eð �=‰=˜"˜g˜Ó'€Dð €Fà’A�r˜�r�E‰{€HØ�!‚|ä—‘˜$šq !¡"˜u™+¬R¯X©XÔ6ˆÜ—‘Ø”R—W‘Wœc $›i¨˜^´2·8±8Ô<¸sÑBÐCÈ!ô
‰ð 
�AŠä—‘˜$šq ! A #˜v™,¬b¯h©hÔ7ˆà
‡M�M˜x°6Ñ:Ô;à€Mó    c                 ó   — t        | t        «      st        d«      ‚| j                  }|r9t	        | d«      r-| j
                  �!t        j                  || j
                  f«      }|€d}t        j                  ||¬«      }|S )aX  
    Export a PointCloud object to an XYZ format string.

    Parameters
    -------------
    cloud : trimesh.PointCloud
      Geometry in space
    write_colors : bool
      Write colors or not
    delimiter : None or str
      What to separate columns with

    Returns
    --------------
    export : str
      Pointcloud in XYZ format
    zobject must be PointCloudr   r
   )Ú	col_delim)
Ú
isinstancer   r   r   Úhasattrr   r   Úhstackr   Úarray_to_string)ÚcloudÚwrite_colorsr&   r+   Úexports        r,   Ú
export_xyzr8   B   su   € ô$ �eœZÔ(ÜÐ4Ó5Ð5ð �>‰>€DÙœ  xÔ0°U·\±\Ð5Mä�y‰y˜$ §¡Ð-Ó.ˆð ÐØˆ	ä×!Ñ! $°)Ô<€Fà€Mr.   Úxyz)N)TN)
Únumpyr   Ú r   Úpointsr   r-   r8   Ú_xyz_loadersÚ_xyz_exporters© r.   r,   Ú<module>r@      s0   ðÛ å Ý ó8óv!ðH �xÐ €Ø˜Ð$�r.   