PyMeshLab icon indicating copy to clipboard operation
PyMeshLab copied to clipboard

MLS projection APSS - current and proxy mesh ID for loop

Open markokuralt opened this issue 3 years ago • 1 comments

When using the filter "mls_projection_apss" with default paramters in for loop everything works as it should, i.e., "currentmesh" and "proxymesh" uses the id of current mesh. However, when a parameter is changed, e.g., I'm changing the filterscale values -ms.mls_projection_apss(filterscale=6) , "controlmesh" and "proxymesh" are automatically set to id=0 for all meshes in the loop, resulting in only the first mesh used.

for filename in os.listdir(inputdir): 
   if filename.endswith(".stl"):
        ms.load_new_mesh (os.path.join(inputdir, filename))
        print(os.path.join(filename))
        print(ms.current_mesh_id())
        ms.remeshing_isotropic_explicit_remeshing(targetlen=0.1, checksurfdist=True, maxsurfdist=0.1)
        ms.mls_projection_apss(filterscale=6)
        ms.save_current_mesh(os.path.join(outputdir_2, filename))

markokuralt avatar Oct 08 '21 12:10 markokuralt

I think that the root cause is the fact that when applying the filter, it also changes the current mesh, which is something that should not happen. I'll try to solve this

alemuntoni avatar Oct 13 '21 14:10 alemuntoni