Difference between revisions of "Twist"
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[Stretch|<<< Stretch]] | Twist | + | {{EggBotDocs210}} |
+ | |||
+ | |||
+ | [[Stretch|<<< Stretch]] || Twist | ||
---- | ---- | ||
− | http:// | + | http://evilmadscience.s3.amazonaws.com/wiki/eggbot/extensiontut/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 | + | 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 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]. | ||
Line 11: | Line 14: | ||
== Usage == | == 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. | |
− | http:// | + | http://evilmadscience.s3.amazonaws.com/wiki/eggbot/extensiontut/extensions-twist-02.png |
− | http:// | + | http://evilmadscience.s3.amazonaws.com/wiki/eggbot/extensiontut/extensions-twist-03.png |
== Where to find the extensions on your system == | == Where to find the extensions on your system == | ||
− | The location of extensions on your system varies with your operating 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/ | * 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. | 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. | ||
Line 29: | Line 32: | ||
---- | ---- | ||
− | [[Stretch|<<< Stretch]] | Twist | + | [[Stretch|<<< Stretch]] || Twist |
Revision as of 17:30, 29 August 2017
<<< 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.
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