HusseinBakri / 3DMeshBulkSimplification

A Python tool to simplify a Mesh (With and Without Textures) to a specific Number of Faces using the MeshlabXML Library
MIT License
49 stars 14 forks source link

Mesh simplification failed, not enough memory (works in meshlab) #3

Closed dvirginz closed 5 years ago

dvirginz commented 5 years ago

I'm trying to run simplify.py, which does not work, running simplify from meshlab itself works. This is the full log

>python simplify.py cat0.stl cat0simp.stl 12000 False

 Detecting Meshlab server Hosting Operating System ...

 You appear to be on Windows machine ...
Number of Arguments Given to the script: 5 arguments.
TexturesFlag: False
meshlabserver cmd = meshlabserver -l TEMP3D_measure_topology_log.txt -i "cat0.stl" -s "TEMP3D_measure_topology.mlx"
***START OF MESHLAB STDOUT & STDERR***
Loading Plugins:
Current Plugins Dir is: C:/Program Files/VCG/MeshLab/plugins
Total 241 filtering actions
Total 12 io plugins
Log is saved in TEMP3D_measure_topology_log.txt
Opening a file with extention stl
FilterScript
Reading filter with name Merge Close Vertices
    Reading Param with name Threshold : RichAbsPerc
Reading filter with name Change the current layer
    Reading Param with name mesh : RichMesh
Reading filter with name Compute Topological Measures
no additional memory available!!! memory required: 4679808
LOG: 2 Successfully merged 0 vertices
no additional memory available!!! memory required: 1338000
no additional memory available!!! memory required: 1338000
LOG: 2 V:  27894 E:  83606 F: 55712
LOG: 2 Unreferenced Vertices 0
LOG: 2 Boundary Edges 76
LOG: 2 Mesh is composed by 1 connected component(s)

LOG: 2 Mesh is two-manifold
LOG: 2 Mesh has 2 holes
LOG: 2 Genus is 0
manifold         = True
non_manifold_E   = 0
non_manifold_V   = 0
vert_num         = 27894
edge_num         = 83606
face_num         = 55712
unref_vert_num   = 0
boundry_edge_num = 76
part_num         = 1
hole_num         = 2
genus            = 0

 Number of faces of original mesh is: 55712

 Creating a folder to store the decimated model ...........

 Beginning the process of Decimation ...........
meshlabserver cmd = meshlabserver -i "cat0.stl" -o "12000/cat0sim
p.stl" -s "tmp7l_dqvou.mlx"
***START OF MESHLAB STDOUT & STDERR***
Loading Plugins:
Current Plugins Dir is: C:/Program Files/VCG/MeshLab/plugins
Total 241 filtering actions
Total 12 io plugins
Opening a file with extention stl
Meshcat0.stl loaded has 167136 vn 55712 fn
output mesh  12000/cat0simp.stl
Apply FilterScript: tmp7l_dqvou.mlx'
FilterScript
Reading filter with name Merge Close Vertices
    Reading Param with name Threshold : RichAbsPerc
Reading filter with name Change the current layer
    Reading Param with name mesh : RichMesh
Reading filter with name Simplification: Quadric Edge Collapse Decimation
    Reading Param with name TargetFaceNum : RichInt
    Reading Param with name TargetPerc : RichFloat
    Reading Param with name QualityThr : RichFloat
    Reading Param with name PreserveBoundary : RichBool
    Reading Param with name BoundaryWeight : RichFloat
    Reading Param with name OptimalPlacement : RichBool
    Reading Param with name PreserveNormal : RichBool
    Reading Param with name PlanarQuadric : RichBool
    Reading Param with name Selected : RichBool
    Reading Param with name PreserveTopology : RichBool
    Reading Param with name QualityWeight : RichBool
    Reading Param with name AutoClean : RichBool
Starting Script of 3 actionsfilter: Merge Close Vertices
no additional memory available!!! memory required: 4679808
LOG: 2 Successfully merged 0 vertices
Successfully merged 0 vertices
filter: Change the current layer
no additional memory available!!! memory required: 1338000
Successfully merged 0 vertices
filter: Simplification: Quadric Edge Collapse Decimation
no additional memory available!!! memory required: 1338000
Initializing simplificationSimplifying...Simplifying...Simplifying...Simplifying...Simplifying...Simplifying...Simplifying...Simplifying...Simplifying...Simplifying...Simplifying...Simp
lifying...Simplifying...Simplifying...Simplifying...Simplifying...Simplifying...Simplifying...Simplifying...Successfully merged 0 vertices
Failed saving
Output mesh 12000/cat0simp.stl has NOT been saved

 Process of Decimation Finished ...

 Copying textures (PNG and JPEG) into the folder of decimated model....

 Found the LIST of images in PNG and JPEG (textures):
[]