inkscape

NOTE: The plug-in on this page is not the latest one. See the latest Inkscape plugin page here.

This is supposed to be a supplement (or replacement) to the tutorial Converting SVG cave maps to Therion th2 format (by Jürgen Bohnert). A sophisticated Inkscape export plugin introduces more features and a yet simple usage. The old tutorial is still recommended for reading, but some of the workflow is obsolete (map flipping, python stuff and the like).

  • Inkscape (vector drawing application, at least version 0.46 is required)
  • th2_output.zip (export plugin for th2 format)
  • Install Inkscape
  • Unzip the plugin zip-file and copy all contained files to one of these locations that match your installation:
    • Windows:
      • %APPDATA%\Inkscape\extensions (user only)
      • %ProgramFiles%\Inkscape\share\extensions (global)
    • Linux:
      • ~/.inkscape/extensions (user only)
      • ~/.config/inkscape/extensions (user only, since 0.47)
      • /usr/share/inkscape/extensions (global)
    • MacOSX (you should have X11 installed):
      • Right button mouse click (Control click) on Inscape application
      • → Show Package Content → Content → Resources → extensions
      • from Inkscape wiki: Starting with XQuartz 2.3.2, X11 has some functionality to exchange the content of the clipboard with OS X. But it currently does not know how to deal with vector images so it just captures the screen, i.e. creates a bitmap copy, and then pastes that. You need to deactivate this functionality in X11 preferences > Pasteboard: uncheck “Update Pasteboard when CLIPBOARD changes”. However, this will also prevent copying text from any X11 application to Mac OS X ones. It will not prevent copying text from OS X to X11.
        • Users with non-english locale settings in System Preferences > International > Language have to install the X11 Localization updates for XQuartz 2.3.3.2 and 2.1.6 to access the new Pasteboard preferences.
        • When you just want to make a copy of an object within Inkscape, you should use duplicate (Ctrl-D) rather than copy/paste (Ctrl-C/Ctrl-V). Duplicate does not interact with the X11/OSX clipboards.

Open your SVG file with inkscape. Go to “File > Save a Copy…” and choose “Therion 2D (*.th2)” as file type. A settings dialog will pop up with the following options:

  • Scale: Specify the enlargement scale of the SVG drawing
  • Layers: Which layers should acutally be exported
  • Layers as Scraps: Each (exported) layer will become a separate scrap
  • Line Type: This line type is applied to all exported paths
  • Disable Path Effects: Inkscape has so-called “Live Path Effects” that can modify some original path. It might be desirable to export the original path to therion rather than the processed effect path
  • Stroke Width Filter: It is possible to export only paths with a particular stroke width. The width must be given in pixels (px), consult the “Fill and Stroke” dialog if you don't know the acutall stroke width of your path. With a value of 0.000 the filter is ignored and all paths are exported.

Only path data is exported (no text, bitmaps, etc.). But texts are exported as labels.

You may use Set Properties dialog or Object Properties or XML editor to check or add parameters or (user)object which are not in menu.

If you open the .th2 file in upper left corner of document page you'll find the palette of point and line symbols.

To calibrate a map which has no surveying point in it (sections etc.) use this workflow:

In “Document Properties” set “Default units” to some metric unit like “cm”. Eventually also define a metric grid. Draw stuff with a defined scale of 1:100 or 1:200 for example. Then, on export to th2 format, choose the appropriate scale in the dialog which will be set as scrap scale. But: this will only apply to scraps which have no scale annotation yet. Existing scale definitions will not be overwritten.

Since inkscape uses 90dpi internally, you will see in xtherion for a 1:200 scale something like:

picture scale points (pixels): 0 0 90 0; real scale points: 0 0 200 0

  • inkscape.txt
  • Last modified: 8 years ago
  • by footleg