Twist

From Evil Mad Scientist Wiki
Revision as of 14:27, 21 June 2019 by Windell (talk | contribs) (Removed from main distribution)
Jump to: navigation, search
This wiki page is part of the documentation for The Original Egg-Bot.
Click here to return to the Egg-Bot overview.


<<< Stretch || Twist


extensions-twist-01.png

The Twist extension provides a coding example which illustrates some common tasks: evaluating graphical elements of a SVG document, reducing each graphical element into sequences of points, generating new graphical elements, and inserting the new elements into the SVG document. The source files for this extension are eggbot_twist.py and eggbot_twist.inx and can be found in your extensions directory. The former file is the Python source code for the extension while the latter is the menu description for the extension itself. The other Eggbot extensions are also good sources of example code. Also, don't neglect to look at or search through all the other extensions in the Inkscape extensions directory: they too provide many coding examples.


Important note: Twist is no longer included by default with the EggBot extensions for Inkscape. It is still available in our repository for manual installation.


The Inkscape project provides some limited documentation on writing extensions at their wiki site. See the "Extensions" topic under the "Developer tutorials" section at their main wiki page.

Usage

To use the Twist extension, select the figure or figures you wish to "twist". Then select the "Twist..." item from the "EggBot Contributed" section of the "Extensions" menu. You can specify how many iterations of the twist to perform as well as a "step ratio". The step ratio is the fractional distance along an existing edge to start the next, twisted edge. In the figure below, a step ratio of 0.1 was used for the triangle and a step ratio of 0.2 for the square.

extensions-twist-02.png

extensions-twist-03.png

Where to find the extensions on your system

The location of the Eggbot extensions on your system varies with your operating system. They may be found in the following, platform specific directories

  • Mac OS X: /Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/
  • Windows: C:\Program Files\Inkscape\share\extensions\
  • Linux: ~/.config/inkscape/extensions/

Note that on Linux systems, the extensions distributed with Inkscape are stored in a system-wide directory. The location of this directory varies with different Linux distributions.


<<< Stretch || Twist