The simplification done here mimic "exactly" what you can do in the GUI filter of the Meshlab application. Python3 simplify.py Hat.obj Hat_Simplified.obj 150000 True Meshlab GUI similarity VS My Python code Please check the other python scripts (simplifybulknothreading.py and simplifybulkthreaded.py) for the right way to use them. Meshlab unfortunately till now, does not support. Supported Meshes Types are the ones that are normally supported by Meshlab (.obj, ply etc.) If 3D mesh is tectured you have to use True. Number_Of_Faces: The final number of decimation you want to achieve Output_Mesh_NameOrPath: Name.Extension if Python script is in the path of 3D models, Use Path otherwise Original_Mesh_NameOrPath: Name.Extension if Python script is in the path of 3D models, Use Path otherwise Python3 simplify.py Original_Mesh_NameOrPath Output_Mesh_NameOrPath Number_Of_Faces TexturesPresentFlag From my experience, this gives no headache! Usage
It is advisable when it comes to installing Python and its modules, to create a Python virtual environment for your application and then install through pip any module required in that particular virtual environment. Installing Meshlab on the Operating System + installing a Python3 package called meshlabxml by per example 'sudo pip3 install meshlabxml' or from MeshlabXML repo. This tool and BlenderPythonDecimator allow you to decimate a 3D mesh into lower resolutions. With threading, the duration of decimation is considerably reduced, this might be an important consideration for you for the case when you need to generate a lot of lower resolutions' models in bulk and in tandem. Two versions for bulk decimations are included: one with a threading mechanism and another without threading. The tool creates a folder (named as the target resolution) for each resolution and copy all the textures of original model to it. The tool does not decimate above the original resolution. In case you are using another OS, please change accordingly.
The tool also detects the Operating System (OS) you are using and then sets the PATH accordingly (at least the default places where Meshlabserver normally resides on MS Windows, Mac OS and Linux (like Fedora 27) (Side Note: Meshlabserver is installed with Meshlab itself).
The Python tool takes CLI arguments such as the original mesh name, the decimated mesh name, the target resolution in number of faces and whether the 3D model is textured or not. A Meshlab ( ) Python 3 tool to simplify or decimate a 3D Model/Mesh (With and Without Textures) into a lower resolution mesh taking a specific Number of Faces using the MeshlabXML Library ( ).