OpenBuilds / OpenBuilds-CAM

Online CNC CAM System
https://cam.openbuilds.com
GNU Affero General Public License v3.0
253 stars 617 forks source link

Heuristically optimize path when planning order of operations. #56

Closed ghost closed 4 years ago

ghost commented 4 years ago

If I load an image into OpenBuilds-CAM and then ask to generate G-Code it will often generate a non-optimal path (the toolhead will travel more than necessary). It should instead attempt to order the operations in such a way that minimizes job time. Off top my head I know this is a valid optimization to attempt for laser operations but maybe not for drilling or other tool type. Might need some planning.

petervanderwalt commented 4 years ago

Duplicate: https://github.com/OpenBuilds/OpenBuilds-CAM/issues/9

petervanderwalt commented 4 years ago

(: pull requests welcome: https://github.com/OpenBuilds/OpenBuilds-CAM/blob/master/js/advanced-cam-gcode.js

But yeah, it needs some thinking so you dont change the order of concentrics inside pocket milling, or lines inside a raster etc. We generate each entitiy on its own, then concatenate inside advanced-cam-gcode.js so kinda best place to look at that