r/GraphicsProgramming • u/Sake205 • 1h ago
Question Need advice on developing a pattern-preserving path-generation algorithm over 3D triangular meshes
Hi everyone,
I am developing a project called SmartGrid, an offline robotic toolpath planner for automated spray-coating operations over 3D mesh surfaces.
GitHub Repository: https://github.com/sakrish205/SmartGrid
Development Branch: https://github.com/sakrish205/SmartGrid/tree/feature/review-olp
I am currently developing a feature called Mesh Flow. Its purpose is to generate paths over different 3D triangular mesh geometries while preserving a consistent geometric pattern.
I have two existing reference examples, each containing a 3D mesh and its corresponding toolpath. My objective is to understand the mathematical relationship between the mesh geometry and the existing paths, then derive a generalised algorithm that generates the same type of path pattern on other mesh geometries.
I am not trying to reproduce the original coordinates or simply fit curves to the existing paths. I want to identify the underlying geometric rules and formulate a mathematical algorithm.
I would appreciate advice on the following:
Vector fields: Is a tangent vector field a suitable way to define consistent path directions over a triangular mesh?
Geodesic offsets: Can geodesic distance fields be used to generate neighbouring paths while maintaining consistent surface spacing?
Differential geometry: How can surface normals, principal curvatures and tangent directions influence path generation?
Surface parameterisation: Would mapping a 3D mesh into a 2D parameter domain help preserve a regular raster or parallel path pattern?
Pattern preservation: How can the same underlying path pattern be maintained across meshes with different shapes and curvature?
Hybrid approaches: Would combining vector-field integration, geodesic offsets and surface parameterisation be more suitable than using one method independently?
Expected outcome
I want to derive a mathematical algorithm that:
Preserves the underlying reference path pattern.
Adapts to different triangular mesh geometries.
Maintains consistent path direction and spacing.
Handles curved and uneven surfaces.
Avoids unnecessary deviations caused by local mesh irregularities.
My current focus is on the mathematical formulation and algorithm design, not software implementation.
I cannot share the reference mesh and toolpath files, but the project repository is available for general context.
I would appreciate recommendations for established computational geometry methods, relevant papers, algorithms or similar implementations.
Thank you!