3DLIRIOUS / MeshLabXML

Create and run MeshLab XML scripts with Python
GNU Lesser General Public License v2.1
202 stars 43 forks source link

Simple not working example for measuring an .off file #9

Closed RoyJames closed 6 years ago

RoyJames commented 6 years ago

Hi, thanks for developing this tool. I'm using it for my research projects.

I use meshlab on Ubuntu 16.04 as below, and python3.5.2 meshlabver I tried to load an .off file (40361.off.zip), and then performed some measurements on it. You mentioned that some filters are not implemented yet, so I used _mlx.files.measureall that you used in your main page example (I assume it is implemented) but it failed. Then I ran _mlx.files.measureaabb and _mlx.files.measuretopology, and the aabb was measured correctly whereas topology gives the same error as _mlx.files.measureall.

Can you let me know what could be the cause and how to make it right? Thanks!

Test code below:

import meshlabxml as mlx
testfile = '40361.off'

aabb = mlx.files.measure_aabb(testfile)
print(aabb)

topo = mlx.files.measure_topology(testfile)
print(topo)

Output message below:

meshlabserver cmd = meshlabserver -i "../40361.off" -o "TEMP3D_aabb.xyz" START OF MESHLAB STDOUT & STDERR Current Plugins Dir is: /usr/lib/meshlab/plugins Error While parsing the XML filter plugin descriptors: We are trying to load a xml file that does not correspond to any dll or javascript code; please delete all the spurious xml files Opening a file with extention off Loading Plugins: Total 238 filtering actions Total 12 io plugins Mesh 40361.off loaded has 27402 vn 9134 fn output mesh TEMP3D_aabb.xyz Mesh 40361.off saved as TEMP3D_aabb.xyz (27402 vn 9134 fn) diagonal = 99.54005949318537 max = [50.79443, 32.067501, 79.375] center = [25.4000005, 16.0337505, 39.6875] size = [50.788858999999995, 32.067501, 79.375] min = [0.005571, 0.0, 0.0] {'diagonal': 99.54005949318537, 'max': [50.79443, 32.067501, 79.375], 'center': [25.4000005, 16.0337505, 39.6875], 'size': [50.788858999999995, 32.067501, 79.375], 'min': [0.005571, 0.0, 0.0]} meshlabserver cmd = meshlabserver -l /tmp/tmpagsgun0l.txt -i "../40361.off" -s "TEMP3D_measure_topology.mlx" START OF MESHLAB STDOUT & STDERR Current Plugins Dir is: /usr/lib/meshlab/plugins Error While parsing the XML filter plugin descriptors: We are trying to load a xml file that does not correspond to any dll or javascript code; please delete all the spurious xml files Opening a file with extention off FilterScript Reading filter with name Compute Topological Measures LOG: 1 WARNING! The MeshLab Script System is able to manage just the C++ XML filters. Loading Plugins: Total 238 filtering actions Total 12 io plugins Log is saved in /tmp/tmpagsgun0l.txt

Houston, we have a problem. MeshLab did not finish successfully. Review the log file and the input file(s) to see what went wrong. MeshLab command: "meshlabserver -l /tmp/tmpagsgun0l.txt -i "../40361.off" -s "TEMP3D_measure_topology.mlx"" Where do we go from here? r - retry running MeshLab (probably after you've fixed any problems with the input files) c - continue on with the script (probably after you've manually re-run and generated the desired output file(s) x - exit, keeping the TEMP3D files and log xd - exit, deleting the TEMP3D files and log Select r, c, x (default), or xd: c Continuing on ... non_manifold_E = 0 manifold = True non_manifold_V = 0 {'non_manifold_E': 0, 'manifold': True, 'non_manifold_V': 0}

Process finished with exit code 0

3DLIRIOUS commented 6 years ago

I don't currently have a Ubuntu installation and cannot test directly, however it appears that your installation of MeshLab is missing the "Compute Topological Measures" filter. I read elsewhere that this and other filters (e.g. "Compute Geometric Measures") are not available if you install Meshlab from the Ubuntu app manager, but are if you install using snap. Can you please confirm how you installed MeshLab, and whether or not these filters are available and working in the MeshLab GUI?

RoyJames commented 6 years ago

You are totally right. I replaced my current installation with the snap version and it's functioning well. Thanks again for making this awesome repository!

3DLIRIOUS commented 6 years ago

Awesome, glad it's working for you now, and that you find it useful!