Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to generate toolpaths on non-planar surface #285

Open
srsidd opened this issue Jan 23, 2025 · 3 comments
Open

Unable to generate toolpaths on non-planar surface #285

srsidd opened this issue Jan 23, 2025 · 3 comments

Comments

@srsidd
Copy link

srsidd commented Jan 23, 2025

Is there any requirement / assumption noether is making with regards to input meshes? For planar parts, I can generate toolpaths well however for non planar parts, I run into lots of issues.

Here is one example of a cylindrical part that noether says has no vertex normals.
Image
However, when I render the normals in meshlab, I can clearly see the normals.
Image

Here is another one, where the toolpaths are not uniform or consistent -
Image

Is there something noether is expecting that I'm missing?

@marip8
Copy link
Member

marip8 commented Jan 23, 2025

Here is one example of a cylindrical part that noether says has no vertex normals.

Previously, the plane slicer raster planner estimated vertex normals within the planner itself. It turns out that it was useful to break that step out into its own MeshModifier for use by other planners. Also it seemed restrictive to re-estimate normals when a mesh could come in with normals that were generated in a better or more application specific way. So in #268, we removed the normal estimation from the tool path planner, and replaced it with a check to make sure the mesh has vertex normals. We also added two mesh modifiers that can perform the normal estimation task. To fix this issue, I would suggest running one of these as the last mesh modifier in the list (preferably VertexNormalsFromMeshFaces).

The error message you saw was not particularly useful, so I recently updated the messaging in #283 to make this more informative.

However, when I render the normals in meshlab, I can clearly see the normals.

I think Meshlab can render normals, but it doesn't necessarily save them into your mesh file unless you specifically ask it too.

Is there any requirement / assumption noether is making with regards to input meshes? For planar parts, I can generate toolpaths well however for non planar parts, I run into lots of issues.

Yes and no. The plane slicer raster planner was mostly designed for flat-ish shapes, but I have seen cases where the it generates decent raster paths for closed non-planar meshes. @InigoMoreno has been working on some of these use cases. I've been slowly incorporating his changes/suggestions from #216 #217 #218 #219 to help with this.

I doubt the plane slicer raster planner will work really well on your toroid shape, but it should work okay on your second shape, assuming that you cut it perpendicular to the axis of symmetry

@srsidd
Copy link
Author

srsidd commented Jan 24, 2025

Thanks @marip8 , the context definitely helps. I added the VertexNormalsFromMeshFaces and received a different error - Vertex 18808 appears to participate in more faces than exist in the mesh; this mesh likely contains degenerate half-edges.

As for the second shape, it doesn't seem to matter, which way I plan the toolpaths, they all show up non-uniform and wonky,

Image

Is there a different planner that might work better for non planar shapes? What is the recommendation for planning on shapes that are curved / non-symmetric etc.?

@marip8
Copy link
Member

marip8 commented Jan 24, 2025

I wonder if this has something to do with the plane slice raster planner fitting splines to the generated waypoints. I started a branch to remove this (#271), but I haven't had a chance to finish it. You might test with a rebased version of that branch to see if it performs better. Note, the waypoint ordering may not be correct: that's the thing I need to fix before merging that PR.

Is there a different planner that might work better for non planar shapes? What is the recommendation for planning on shapes that are curved / non-symmetric etc.?

We don't have any alternative options for that at the moment. I've been working on integrating the heat method tool path planner here, which would probably be a good alternative. It's a real WIP at the moment though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants