MeshLabXML icon indicating copy to clipboard operation
MeshLabXML copied to clipboard

Ubuntu installation

Open ahmedmaalej opened this issue 6 years ago • 1 comments

I tried installation under ubuntu for python coding, using a virtual environment and followed the steps, I tried adding the meshlabserver using these lines:

MESHLABSERVER_PATH = '/usr/bin/'
os.environ['PATH'] += os.pathsep + MESHLABSERVER_PATH

with example#1 but I keep gettting this error MSG:

if script.ml_version == '1.3.4BETA':

AttributeError: 'str' object has no attribute 'ml_version'

Any idea

ahmedmaalej avatar Apr 01 '20 08:04 ahmedmaalej

That example code is quite old and predates the introduction of the FilterScript class. What version of MLX are you running? Try the example code on Github instead, i.e.:

import meshlabxml as mlx

orange_cube = mlx.FilterScript(file_out='orange_cube.ply', ml_version='2016.12')
mlx.create.cube(orange_cube, size=[3.0, 4.0, 5.0], center=True, color='orange')
mlx.transform.rotate(orange_cube, axis='x', angle=45)
mlx.transform.rotate(orange_cube, axis='y', angle=45)
mlx.transform.translate(orange_cube, value=[0, 5.0, 0])
orange_cube.run_script()

You should not need to explicitly set the meshlabserver path in your script if it is already in your system path.

3DLIRIOUS avatar Apr 02 '20 18:04 3DLIRIOUS