I added two new commands to the Path menu: Dynamic offset and Linked offset. Now simple Inset/Outset commands work on paths, and the two new commands create an "offset object" that can be dynamically adjusted by the node tool. The difference between them is that Dynamic offset transforms the selected object into an offset, while Linked offset adds a new offset object that is linked to the original path, so you can edit the original path and its linked offset will be updated. This is a very powerful tool and I'm really excited about it.
Fred, there are some remaining problems where we need your help. It would be great to have them fixed for the upcoming release:
- It appears that all offsets now use the imprecise algorithm (you once mentioned that there were two algorithms, one precise but slow and the othe imprecise but fast). I think we should use the precise algorithm for all kinds of offsets, dynamic or not.
- The simple Inset/Outset commands must check if the object is already an SPOffset, and if so, adjust its radius instead of converting it to shapes.
- The dynamic offsets do not accept zero radius; they snap it to +/- 0.25, so you cannot do an exact copy of the original. Why this limitation? I tried removing
if (fabs (offset->rad) < 0.25) offset->rad = (offset->rad < 0) ? -0.25 : 0.25;
in sp-offset.cpp but then setting zero radius caused the program to freeze. Is this a limitation of the algorithm?
_________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2f...
- It appears that all offsets now use the imprecise
algorithm (you once mentioned that there were two algorithms, one precise but slow and the othe imprecise but fast). I think we should use the precise algorithm for all kinds of offsets, dynamic or not.
the "imprecise" algo is now the more precise one; the problem whith the old "precise" is that sometimes it doesn't produce the mathematically correct offset, but is faster. this can happen when offseting the 'D' letter with a big radius, for example: a hole appears in the offset. since speed is an issue, the fast one is back in place.
also the livarot stuff now uses NR::Point (and some NR::matrix); it may contain some bugs since the conversion touched a big portion of the code. you can report any strange behavior in boolean operations and offset to me.
_________________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
bulia byak wrote:
I added two new commands to the Path menu: Dynamic offset and Linked offset. Now simple Inset/Outset commands work on paths, and the two new commands create an "offset object" that can be dynamically adjusted by the node tool. The difference between them is that Dynamic offset transforms the selected object into an offset, while Linked offset adds a new offset object that is linked to the original path, so you can edit the original path and its linked offset will be updated. This is a very powerful tool and I'm really excited about it.
Further extensions to make this an uber tool:
There needs to be a 'convert to path' dynamic tool, which maintains a path converted from the original shape (spiral, oval etc) so that the user can edit the handles on the original shape.
presumably a similar 'stroke to path' dynamic tool could be useful, although I haven't found myself wanting it yet.
Rather than defaulting to 'cap', outset should allow the user to choose between the 3 corner choices, cap, mitre and bevel.
Why does the path always get closed? I can't see any justification for this in the algorithm?
Why does a crossed (self intersecting) path get 'unwound' when making outset? I would have thought that a reasonable definition would be 'the curve n pixels to the left of this curve as I walk in the standard direction'. This would remove some of the abiguity I think?
And there are still artifacts :) (I wouldn't worry about this though)
njh
participants (3)
-
bulia byak
-
fred
-
Nathan Hurst