On a request by the segmentation team to provide .obj files chunked into 3d cubes to see if khartes could help specify the faces faster. It also partially addresses this bullet point in the requested open source ideas:
Mesh chunker: tool to translate a set of input meshes into a set of annotated cubes of configurable size. Each cube should represent/store each intersecting papyrus segment as its own mesh (continuous, manifold, non-intersecting)
The script can be used on any collection of .obj files with configurable cube sizes, but has already been run on the gp region in scroll 1 with 256 cubed sizes and the results uploaded to https://dl.ash2txt.org/community-uploads/james/chunked_objs/ . The origianl code was very slow, cumbersome, and complicated but this refactored &updated version runs in a reasonable amount of time and is parralelized.
conda create --name 3D_mesh_chunking
conda activate 3D_mesh_chunking
conda install -c conda-forge numpy trimesh scipy
Note that pip wasnt working for trimesh so I installed the dependencies with conda
Also change the path to the folder with the .obj files you would like to chunk in the main function, and set the chunk size, and pad size you would like to use. The chunk size sets teh size of the cubes to chunk to, and the pad sets teh additional overlap between cubes to maintain more coherence around the edges of the cubes due to the nature of the .obj meshes.