
    j                     .    d dl ZddlmZmZ dee   fdZy)    N   )DictListreturnc                 x   ddl m} t        j                  t        j                  t        | j                        t        j                        dz  | j                  f      j                         j                  t        j                        } || j                  |fi |D cg c]
  \  }}||d c}}S c c}}w )a  
    Compute an approximate convex decomposition of a mesh.

    VHACD Parameters which can be passed as kwargs:

    Name                              Default
    -----------------------------------------
    maxConvexHulls                    64
    resolution                        400000
    minimumVolumePercentErrorAllowed  1.0
    maxRecursionDepth                 10
    shrinkWrap                        True
    fillMode                          "flood"
    maxNumVerticesPerCH               64
    asyncACD                          True
    minEdgeLength                     2
    findBestPlane                     False

    Parameters
    ----------
    mesh : trimesh.Trimesh
      Mesh to be decomposed into convex parts
    **kwargs : VHACD keyword arguments

    Returns
    -------
    mesh_args : list
      List of **kwargs for Trimeshes that are nearly
      convex and approximate the original.
    r   )compute_vhacd)dtype   )verticesfaces)vhacdxr   npcolumn_stackoneslenr   int64ravelastypeuint32r   )meshkwargsr   r   vfs         B/DATA/.local/lib/python3.12/site-packages/trimesh/decomposition.pyconvex_decompositionr      s    > % 	TZZAAEtzzRS					 
 "$--A&AADAq #A  s   #B6)numpyr   typedr   r   r        r   <module>r       s     -DJ -r   