Complexity limits trying to process STL with large count, or PEBKAC?

Thanks for Kiri:moto! :slight_smile:

I’m using the current latest 2.5 grid space kiri:moto trying to toolpath an STL that has lots of polygons. It is a tapered projection of a rhodonea curve, and I’m trying to outline it with a tapered ball mill with a single axis angle that matches the draft angle of the part I’m cutting. As I’ve been trying a variety of things, I either see it stuck on “slicing” indefinitely, or get to “shadow” and make no apparent progress for an hour, but I haven’t had much luck generating a working toolpath, either with Chrome or with Firefox. (On Chrome, some of my tests crashed the tab, but that’s Chrome’s fault by definition.)

So I figure either I’m doing something wrong, which seems very likely since I’m completely new to Kiri:moto, or my model is too complex. It’s generated in OpenSCAD from 2000 thin six-sided polyhedra that each share two faces. Meshlab tells me 4413 vertices and 9546 faces.

The stl is uploaded as the sample STL file for this design:

I’m using the generic grbl target with

and tool definition:


Is this model within what I should reasonably expect Kiri:moto to handle?

I’m not worried about feeds and speeds right now, I just want to see the path make sense. And the Outline process should be exactly what I need. I should clear with a roughing pass first, but adding that with a ¼" flat mill doesn’t solve the problem. I’m still stuck on “shadow” with the red progress bar not working.

Hi @mcdanlj and welcome. Any object with < 500k vertices should be relatively easy on a modern machine. So perhaps there is a bug. If you right-click the workspace and “export workspace”, it will produce a “.km” file that I can use to reproduce your environment exactly. Then either drop that file into the Discord chat ( or email it to me [].

Screen Shot 2021-01-03 at 6.08.29 PM

Actually, I just looked at the STL and it is not a proper manifold object. In other words, it’s polygon soup. Lots of incomplete and overlapping faces. Can Meshlab “heal” the object to make it manifold / closed?

If an object is not properly formed, then there is no “correct” slice that can be reliably generated. It’ll try, but it will run into branching path problems and bog down.

Rendering such objects is not a problem for a graphics card. And if it’s fully opaque, the problems are hidden. But put KM into “wire” mode and zoom in and around to see what I’m talking about.

Thanks! PEBKAC did seem more likely.

I think that prusa-slicer has induced me to miss messages about not being a manifold, by auto-healing what OpenSCAD does. Prusa-slicer reads and correctly (that is, as I would intend…) slices this model. I guess I thought that OpenSCAD had gotten better at unioning objects with adjacent surfaces in recent versions, and didn’t realize that prusa-slicer was just making it work.

I have attempted and failed to resolve the problem in meshlab using many of the “cleaning and repairing” options, such as with “snap mismatched borders” and so far no success. This is easily attributable to lack of practice and lack of understanding of the many capabilities of meshlab!

I admit that I can’t see the problems when I look in wire mode. I expect it to be wire soup; it’s made up of lots of segments that are trapezoidal in two projections. I expect that you are able to see the difference between “wire soup that indicates hidden surfaces” and “wire soup that is integral to the complexity of the object” but I can’t. :frowning:

I’m trying to think of alternative ways to render this in OpenSCAD. I can’t just continue each of the segments to overlap because each segment will introduce a tiny vertical artifact, and I don’t think I can define it as a single complex polyhedron because I don’t think OpenSCAD handles self-intersecting polyhedra well. (Because I’m approximating a smoothly-varying curve with small segments, it seems obvious that this is an example that would be naturally represented by NURBS rather than a triangle mesh. But that would rather severely constrain the set of tools that I could use to create and process it. :slight_smile:)

Anyway, back to the mental drawing board on this model! I appreciate the analysis!

PrusaSlicer, as a desktop app, has the luxury of being able to just compile in a 3rd party library to heal meshes. Sadly, I can’t do that. Kiri is 100% from-scratch so it can run entirely in the browser.

1 Like

Thanks for your patience, as well as for kiri:moto! I learned a lot about healing a mesh this evening and managed to heal the mesh so that meshlab says it is a valid manifold. Now it slices and paths quickly.

I don’t know normal practice on this forum for when to split off into new topics; I’m happy to start a new topic if that’s preferable.

Now working with the repaired model and starting with just an outline op, I get something that looks promising:

But just one pocket is missed. I have attached the repaired STL as an additional file at [Edit: still waiting for it to show up, thingiverse is slow to update, sorry!]

I tried “export workspace” but I have not gotten a .km file saved. I’ve tried it on both firefox and chrome so far. No files show up, and no download dialog has shown up. Not sure what else to try.

This STL still has non-manifold geometry where the pocket is missed.

Sorry to have turned this into the “learn how to use meshlab” channel! :slight_smile: I definitely appreciate the patience. These outlines now look beautiful.

In case it’s ever useful to anyone else, I finally found the tab in meshlab that would show “No-Manif Verts” and “No-Manif Edges” and saw that I had two edges plunging into the surface, right where I ended up with the discontinuity that you highlighted in those images. There were no vertices, only edges, listed. Deleting them, I was left with a hole to fill. There are probably 100 recipes that might have worked for this; I believe what I did under the Filter menu was:

  • Selection → Select non-manifold edges
  • Selection → Delete selected faces
  • Remeshing, Simplification, and Reconstruction → Close Holes

1 Like