Difference between revisions of "PathEstimation"
Revision as of 18:08, 20 June 2006
This feature discusses two utility functions that would be central to any Inkscape user's workflow. The ability to outline a selected path or shape, along with offsetting those same shapes provides a simple way for illustrators to edit and create new art very rapidly.
- Outline Stroke
We begin with a simple path containing a single corner, and a single curve.
Then we select a stroke for this path: 32 pixels here.
Choosing a menu item "Outline Stroke" results in a new filled shape ( filled with the previous stroke color ) representing the path visually using a bezier shape.
Here we can see the new path with a stroke of black and a fill of white.
- Offset Path
Offsetting a path works much like a centrally anchored scale operation, except it will scale away from the control nodes that the base shape is made of. Here we show an offset of -5, making a smaller path within the existing shape. ( Using a simple scale would have caused overlap )
- Is there a well-known algorithm for offsetting arbitrary shapes? If not, I've played a bit with beziers in KSEG  and I think I found an algorithm that offsets an arbitrary convex bezier acceptably well. If anyone is interested I can post details. -- bb
Here we show the result of attempting a simple scale to achieve this effect:
And here we show an offset path of +5, making a larger shape.
- I'd be interested in any code or algorithms that show how to create a bezier path that is offset from another bezier path by an arbitrary amount. TIA. -- gwk