This plugin for the great Inkscape vector graphics program permits rendering 3D polyhedra and meshes in Wavefront OBJ format. It is based on a similar plugin but offers the possibility to use vertex colours that are included in the mesh. This makes the plugin suitable when additional information such as vertex quality or curvature have to be visualized.
The plugin was originally developed to obtain publication-quality vector graphics for my dissertation. Please refer to this blog post for more details.
- Clone this repository
- Create the path
$HOME/.config/inkscape/extensions
if it does not already exist - Close Inkscape
- Copy the files
polyhedron_3d_vertex_colours.py
andpolyhedron_3d_vertex_colours.inx
into this directory - Reopen Inkscape
- Enjoy your new plugin, which you can find under Extensions–Render
For more information about installing extensions, please refer to the official Inkscape wiki.
Call the plugin from the Extensions menu in Inkscape. A dialog should pop up that permits you to enter information about the mesh:
You can set different viewing options, such as the camera position, including some transformations, and other styles as well—these are taken as-is from the original plugin. It may be useful to experiment with different settings for the stroke width of the input mesh, in particular when mesh scales are small.
This is how the example data files should look like:
The plugin is written in Python. Please install the following packages
using your package manager or pip
, for example.
numpy
python-lxml
Following the license conditions of the original plugin, this plugin is also licensed under the GPL Version 2. Please see the file LICENSE.md for more information.