12-19-2020, 04:57 PM
A couple of new tools to manipulate paths.
Inkscape can do snapping to paths both tangentially and perpendically. (In Inkscape, see Document Properties > Snap, and tick the two points at the bottom.) Nothing similar exists in Gimp(?). I made a sort of "poor man's snap" to imitate that feature. It is no real snapping as in Inkscape.
The package consists so far of four plugins:
http://kmarkku.arkku.net/Path_tangents_f...aster.html
and click the Download button at the bottom. That gives you a ZIP file. Unzip it and place the one file it contains (path_tangents.py) in your user's plugins folder. Start Gimp. In the Paths tab, right click some path and follow the link Tools > Tangents and normals > ...
Bounding box does what its name says. Actually the code has been finished for a long time but it was buried in another plugin, and I felt that it deserves to be a plugin on its own right. I placed it in this package since it is, loosely speaking, about tangents.
Of the other plugins I explain here number 3: "Tangents or normals from a point". The rest will follow in another post.
Tangents or normals from a point: Suppose you have a path and you need to draw a tangent to it from some point. In the picture below the Path is in blue. I marked the point with a black dot but that is only for this explanation. It is just some point in the plane. The red line is the tangent you want to draw.
You use the plugin as follows. Make a tentative tangent: a line segment (a path with 2 anchors), one end precisely at the point you want, and the other end somewhere close to where the tangential point should be:
Then call the plugin by right-clicking at Path (in the Paths tab), follow the link
Tools > Tangents and normals > Tangents or normals from a point
click it, and choose your tentative tangent in the GUI. Otherwise keep the default values. The plugin creates the tangent as a new path:
You can think that your tentative tangent is "snapped" to the tangential point.
The plugin offers three other inputs:
I explain now the Action: There are three options:
The first option (default) draws one tangent, closest to the tentative tangent. The second draws all possible tangents for one stroke, the closest one (here it is the largest circle). And if you choose "Draw all" you get all possible tangents for the whole path. See the picture:
If you find any strange behaviours, please report. Or if you have any suggestions, please tell me.
Sorry for the long posting. To be continued...
Inkscape can do snapping to paths both tangentially and perpendically. (In Inkscape, see Document Properties > Snap, and tick the two points at the bottom.) Nothing similar exists in Gimp(?). I made a sort of "poor man's snap" to imitate that feature. It is no real snapping as in Inkscape.
The package consists so far of four plugins:
- Bounding box
- Parallel tangents or normals
- Tangents or normals from a point
- Tangents or normals from a stroke end of another path
http://kmarkku.arkku.net/Path_tangents_f...aster.html
and click the Download button at the bottom. That gives you a ZIP file. Unzip it and place the one file it contains (path_tangents.py) in your user's plugins folder. Start Gimp. In the Paths tab, right click some path and follow the link Tools > Tangents and normals > ...
Bounding box does what its name says. Actually the code has been finished for a long time but it was buried in another plugin, and I felt that it deserves to be a plugin on its own right. I placed it in this package since it is, loosely speaking, about tangents.
Of the other plugins I explain here number 3: "Tangents or normals from a point". The rest will follow in another post.
Tangents or normals from a point: Suppose you have a path and you need to draw a tangent to it from some point. In the picture below the Path is in blue. I marked the point with a black dot but that is only for this explanation. It is just some point in the plane. The red line is the tangent you want to draw.
You use the plugin as follows. Make a tentative tangent: a line segment (a path with 2 anchors), one end precisely at the point you want, and the other end somewhere close to where the tangential point should be:
Then call the plugin by right-clicking at Path (in the Paths tab), follow the link
Tools > Tangents and normals > Tangents or normals from a point
click it, and choose your tentative tangent in the GUI. Otherwise keep the default values. The plugin creates the tangent as a new path:
You can think that your tentative tangent is "snapped" to the tangential point.
The plugin offers three other inputs:
- Tangents or normals?
- Action
- Extend
I explain now the Action: There are three options:
- Draw only the closest (default)
- Draw all for the closest stroke
- Draw all
The first option (default) draws one tangent, closest to the tentative tangent. The second draws all possible tangents for one stroke, the closest one (here it is the largest circle). And if you choose "Draw all" you get all possible tangents for the whole path. See the picture:
If you find any strange behaviours, please report. Or if you have any suggestions, please tell me.
Sorry for the long posting. To be continued...