Pencil tool : proposal to join and edit drawn segments interactively [demo]
Summary
Proposal and code demo for a new feature for interactive path creation as an option for Pencil Tool in Inkscape.
Description
This code constructs a final path based on series strokes, each created with the help of mouse/pen/stylus movement. A new stroke replaces part of the path created with earlier strokes. This feature will help the artists who prefer to draw a figure (path) with small successive pencil strokes.
To show how it works I have written a single Python file (python3) using only PyQt5 library. This code has its own simple interactive GUI that I have tested in MS Windows platform.
Demo
GIF:
Strokes.gif
(removed the live preview to save space. good news though: gifs open in new tab without needing to proper "download" :) also, it's ~6 MB, so, it can take some time to fully load)
Code:
- the set of instructions Strokes_Instructions.pdf and
- the python code Strokes_30Nov19.py.
-
29Feb20 updated code at: #1256 (comment 296681747) (features its own UI)
- 08Sep20 update: ux#49 (comment 411006999)
Editor used:
- Spyder or Anaconda on Win10.
- Python3 with PyQt5 library to run demo code.
Additional required for updated code: - a PyPi package/library called "simplification" and numpy.
- matplotlib and scipy are optional.
- In windows system the code depends on keyboard Alt key.
References
- In-house: Closest available function is the Tweak tools (e.g., Push/Attract Path or called Sculpt tool in 3D) and path averaging option of Pencil Tool.
- External: https://www.youtube.com/watch?v=gKVVtaNx-20&t=1m03s
What Next
My code needs to work in an interactive manner, as a part of Pencil Tool and I could not embed it in the source code of Inkscape. I would like to collaborate with one of the developers.
If the developers find this demo version useful then it will be possible to extract the required functions and integrate them with the main Inkscape code.
I'll remain grateful if someone can try this code and give feedback.
Updates
#1256 (comment 296681747)
#1256 (comment 402660808)
ux#49 (comment 411006999)
Original by author (with minor adjustments by reporter)
Dear members of Inkscape Team, I convey my greetings to all of you.
I propose a new feature for interactive path creation as an option for Pencil Tool in Inkscape.
This code constructs a final path based on series strokes, each created with the help of mouse/pen/stylus movement. A new stroke replaces part of the path created with earlier strokes. This feature will help the artists who prefer to draw a figure (path) with small successive pencil strokes.
Closest available function is the Tweak tools (e.g., Push/Attract Path) and path averaging option of Pencil Tool.
My code needs to work in an interactive manner, as a part of Pencil Tool and I could not embed it in the source code of Inkscape. I would like to collaborate with one of the developers.
To show how it works I have written a single Python file using only PyQt5 library. This code has its own simple interactive GUI that I have tested in MS Windows platform.
If the developers find this demo version useful then it will be possible to extract the required functions and integrate them with the main Inkscape code.
I'll remain grateful if someone can try this code and give feedback.
I have attached the python code Strokes_30Nov19.py and a set of instructions Strokes_Instructions.pdf.
With regards
Partha
Parthasarathi Ghosh
Professor
Geological Studies Unit
Indian Statistical Institute
203 B T Road, Kolkata 700108, India