Planktonmesh.Compact() issue for remesher

Dear @DanielPiker ,

I am experimenting with your great tool Remesher/MeshMachine. I found on the C# script of remesher (MeshMachine/src/remesher.cs), and tried to rewrite the C# script to python so I can add some customization and UI to it (I know little about C#).

I then add my own function to control the variation of edge length. (The original method is workable, but less intuitive/predictable/controllable from design perspective). The problem I now have is that the remesher procedure gets quite unstable. I constantly run into “Index Out of Range” errors for some plankton functions, especially for the P.Compact(). It seems to be less prone to such errors when the edge length is uniform. And I found these errors to be in-deterministic. You don’t know how many iterations you can go until you hit the Exception.

I am not sure whether this is common behavior for the original Remesher tool. The C# script I am referring to might not be the latest either.

I can share the python code as well if you can help look into it. It is basically a translation of the original c# script. It has quite a few dependencies ( non-essential procedures, like UI, etc) , so tweaks will be needed when tested on another computer.

Best regards,

PS: Never mind. Seems that I messed with some of the original code. It is usable now, although not bug free.

I also find that the edge size of the original mesh should not be too much bigger than that of the targeted mesh. This will reduce errors.