Notifications
Clear all

[Closed] Array of mesh elements, fast way ?

This is what i got to make an array of elements on a trimesh. It’s a tad slow

obj = $
 processedFaces = #{}
 clusters = #()
 _getElementsUsingFace = meshop.getElementsUsingFace
 
 for i=1 to obj.numfaces where (NOT processedFaces[i]) do
 (
 	elt = _getElementsUsingFace obj i
 	append clusters elt
 	processedFaces += elt
 )
 

Would you think of a faster algo ? Thanks