lifelike / hexmapextension

Inkscape extension for creating hex grids suitable for boardgame maps.
129 stars 16 forks source link

Huge number of hexagons won't be generated #6

Closed sennewood closed 6 years ago

sennewood commented 6 years ago

I have a DIN A1 document and want to fill it with 600x400 hexagons, but the process got set to inactive after a while.

Here is the logfile: hex.log

sennewood commented 6 years ago

I tried this on a newer machine (16GB RAM) and instead of 4.6GB (on my old PC (6GB RAM)), Inkscape and your extension used up to 13.6GB and crashed after 30 minutes.

lifelike commented 6 years ago

Yes, inkscape is no good at huge number of objects. What I did once to make a huge grid was to manually comment out a few lines of code in the extension to not generate as many layers of extra stuff. Can add that as options in the dialogue. It was my plan to do anyway. If you want all the layers unfortunately the best thing to hope for is improvements in inkscape or run the extension from the command-line and open the svg in some other viewer/editor.

sennewood commented 6 years ago

I know how to run inkscape from command line, but how do I use this extension?

lifelike commented 6 years ago

I added options to toggle what layers to create. I tested 200x200 hexagons on my poor computer (8 GB RAM) and it works, but inkscape becomes too slow to use in practice.

It works to generate the grid from command-line as well of course in emergencies (open the SVG in a web browser or some other svg viewer/editor instead of inkscape):

PYTHONPATH=/usr/share/inkscape/extensions/ ./hexmap.py -c 200 -r 200 --layer-grid=true svgtests/input/test.svg > 200x200_hexes.svg

This is unfortunately all that can be done without improving inkscape's memory usage.