MCPcopy Create free account
hub / github.com/WesleyAC/plotter-tools / order_shapes

Function order_shapes

optimize/src/main.rs:129–143  ·  view source on GitHub ↗

Takes all shapes to draw with one pen color and figures out a better order to draw them in Starts with first shape After finishing drawing a shape finds nearest undrawn shape to draw next Possible improvements: use Vec > instead of .remove use some kind of tree datastructure change order in which an individual shape is drawn (start at a different point) write unit tests

(mut shapes: Vec<Shape>)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

optimize_all_colorsFunction · 0.85

Calls 1

find_closestFunction · 0.85

Tested by

no test coverage detected