
    j                         d dl ZddlmZ d Zy)    N   )is_ccwc                    t        |       dk(  r| d   j                         S | D ch c]  }|j                  j                  d    }}t        |      dkD  r+| D cg c]   }t	        |d      r|j                         n|" } }t        j                  | D cg c]  }t        |j                         c}      }t        j                  dt        j                  |            dd j                  t        j                        }g }g }i }t        | |      D ]  \  }	}
|j                  |	j                         |j                  |	j                  j                                |	j                  D ]8  }|j                         }|xj                   |
z  c_        |j                  |       :   t#        	      d||t        j$                  |      d|}|S c c}w c c}w c c}w )	a(  
    Concatenate multiple paths into a single path.

    Parameters
    -------------
    paths : (n,) Path
      Path objects to concatenate
    kwargs
      Passed through to the path constructor

    Returns
    -------------
    concat : Path, Path2D, or Path3D
      Concatenated result
       r   to_3Dg        N)metadataentitiesvertices )lencopyr   shapehasattrr   nparrayappendcumsumastypeint64zipupdater	   r
   pointstypevstack)pathskwargsi
dimensionsvert_lenoffsetsr
   r   r	   pathoffsetentitycopiedconcats                 >/DATA/.local/lib/python3.12/site-packages/trimesh/path/util.pyconcatenater(      s   " 5zQQx}} 055u!!**""1%uJ5
:BGH%Qga1q8%H xx%8%QQZZ%89HiiRYYx01#26==bhhGG HHHE7+f&**,-mmF[[]FMMV#MOOF# $ , T$Z Hryy7JNTF MA 6H 9s    G%GG)numpyr   utilr   r(   r       r'   <module>r,      s     5r+   