flood fill algorithm

More
3 years 5 months ago #270970 by clive
flood fill algorithm was created by clive
I have done a brief internet search looking for a flood-fill algorithm. That is an algorithm to clear/mill and arbitrarily shaped region on a woodblock.I know there has to be commercial tools that do this but, for the moment, I'd like to incorporate it into my own CAM/G-Code tool.Can anyone point me to some pseudo code please.https://www.royalacademy.org.uk/article/felix-vallotton-beginners-guide

Please Log in to join the conversation.

More
3 years 5 months ago #270975 by tommylight
Replied by tommylight on topic flood fill algorithm
Why the link?
Does it have to do with the question?

Please Log in to join the conversation.

More
3 years 5 months ago #271028 by clive
Replied by clive on topic flood fill algorithm
It is the kind of carving I want to do. Vallotton made quite remarkable woodblock prints. Very simple, black and white blocks. In his case hand carved.

A basic pixel image flood fill algorithm is easy but for a CNC cut with a finite tool size, it seems much harder.

Maybe I should just explore inkscape ?

Please Log in to join the conversation.

More
3 years 5 months ago #271036 by clive
Replied by clive on topic flood fill algorithm
Is image-to-gcode already installed alongside LinuxCNC ? Can it be found as a separate program ?

I found this  stand alone  version on GitHub from five years ago but it is not in Python3 and will take a fair amount of time to clean up.

Please Log in to join the conversation.

More
3 years 5 months ago #271043 by tommylight
Replied by tommylight on topic flood fill algorithm
Try this, i use it sometimes and i like it better than image2gcode.
It is derived from image2gcode, as it states at the top of the code, though.
www.scorchworks.com/Dmap2gcode/dmap2gcode.html

Please Log in to join the conversation.

More
3 years 5 months ago #271063 by clive
Replied by clive on topic flood fill algorithm
The dmapto2gcode looks to be what I should run.

The code uses a Python module called tkinter which isn't in my system. I installed it using pip but dmapto2gcode still can't find the module to import.

I'm not a regular Python user so figuring out where modules might reside is a puzzle.

Please Log in to join the conversation.

More
3 years 5 months ago #271066 by clive
Replied by clive on topic flood fill algorithm
I have it working ! The issue is Python3 and compatible modules

I had to install a bunch of stuff:

sudo apt-get install python3-tk
sudo apt-get install python3-numpy
sudo apt-get install python3-pil
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade Pillow

And then the program runs:
python3 ./dmap2gcode.py 

I hope this helps others...
 

Please Log in to join the conversation.

Time to create page: 0.088 seconds
Powered by Kunena Forum