Random pattern for CNC path

Hello!
I would like to ask you.
What is the major logic of this pattern with 90 degrees?
I need to have curve that falls on itself without overlap.
It’s a grid with points_____and move on to the closest points …and loop tools???
Thank you for your help!

That’s some sort of “variation” of a Maze (Google that) problem. Not that difficult to address via code … but I have no idea what’s possible with components.

Another take could be a modified Hilbert curve (the classic algo is a bit monotonous).

Another take could be a Hamiltonian path on an ortho quad Graph (but that’s kinda killing a mosquito with a bazooka).

Finally … some 2d version of this:

Thanks for the help, Peter.
I will try to find the way without C# Python.

Parakeet has a maze tool

You’ll waste your time.

For instance attempting ro do a Hamiltonian Path without some advanced heuristic backtracing (in order to deal with the “usual” N factorial Elapsed time) is kinda 3rd marriage: triumph of hope vs experience,

That said avoid any TSP (Traveling Salesman) algo: not the way to cut the mustard on that matter

Done with some Pythonic magic! :man_mage:

2022-05-25 08-11-08.2022-05-25 08_11_50

It use recursive backtracking to make a maze out of any mesh.
The A* algorithm can be implemented as a solver.

2 Likes

Hello
this question has already been asked. See this thread. For your problem I’ll use an offset of the labyrinth path of wall.
So see that

And if not 90° see this