lifelike / hexmapextension

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

Crash while generation a big map #25

Closed sennewood closed 5 years ago

sennewood commented 5 years ago

I want to create a map with 1265 * 765 hexfields. At first a pythonw.exe runs (which is this extension, I guess) and closes after some time. Then Inkscape itself is in charge again .... runs ... and quits. I assume it's to much information for Inkscape to handle.

Could it be a solution to render the hexmap in packages, like row after row?

lifelike commented 5 years ago

This is exactly why I thought allowing up to.1000x1000 was already overkill.

Does it work better to run the extension from the command-line to generate a svg and then open it on inkscape?

Otherwise turn off all layers you do not absolutely need.

Not sure more can be done?

sennewood commented 5 years ago

How do I run the extension via CLI?

I tried: inkscape file.svg --verb=pelles.effect.hexmap --cols=3 --rows=3 but I got: ** (inkscape.exe:5276): WARNING **: Invalid option --cols=3

lifelike commented 5 years ago

I never tried Inkscape's verb flag to run extensions like that. Probably something I have to look into at some point. But I frequently run my extensions from the command-line as just simple python scripts. The inkex.py file from inkscape is required for it to work, but other than that it should be fully stand-alone.

If you find inkex.py (it could be somewhere like /usr/local/share/inkscape/extensions... but just search, it is somewhere) you can copy it to wherever hexmap.py is and run something like:

./hexmap.py --help (prints out a lot of help)

To actually run it you must have some (empty) svg-file for it to operate on. I guess like file.svg in the previous comment. There is one included with the extension in the svgtest subdirectory as well, so something like this:

./hexmap.py -c 1265 -r 765 --layer-grid=true --layer-fill=true svgtests/input/test.svg > hugehexmap.svg

(Guess it will look slightly different in Windows.)

You can also set PYTHONPATH=/path/to/directory/where/inkex.py/is to run it without copying the file.

lifelike commented 5 years ago

Closing this as there is not much to do. Inkscape will die if you create too many objects to render compared to how much RAM your computer has.