Difference between revisions of "Twist"
(Removed from main distribution) |
|||
Line 1: | Line 1: | ||
− | {{ | + | {{EggBotDocs}} |
Line 9: | Line 9: | ||
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. | 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 [https://github.com/evil-mad/EggBot/tree/master/inkscape_contributed 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 [http://wiki.inkscape.org/wiki/index.php/Inkscape main wiki page]. | 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 [http://wiki.inkscape.org/wiki/index.php/Inkscape main wiki page]. |
Revision as of 13:27, 21 June 2019
<<< Stretch || Twist
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.
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