
Hi to all. Here is a video showing my new LPE. The branch is here[1].The video here[2].
Thanks to Josh Andler for give me the idea Also thanks very much to suv for the feedback and time inverted on it. And a special thanks to Liam P. White, without his help the LPE need a lot of hours to be.. or not to be.
Bye, Jabiertxo. [1] https://code.launchpad.net/~inktxof/inkscape/fillet-chamfer [2] https://www.youtube.com/watch?v=HdsxhXPksgo

Cool! - Johan
On 12-5-2014 15:26, Jabiertxo Arraiza Cenoz wrote:
Hi to all. Here is a video showing my new LPE. The branch is here[1].The video here[2].
Thanks to Josh Andler for give me the idea Also thanks very much to suv for the feedback and time inverted on it. And a special thanks to Liam P. White, without his help the LPE need a lot of hours to be.. or not to be.
Bye, Jabiertxo. [1] https://code.launchpad.net/~inktxof/inkscape/fillet-chamfer [2] https://www.youtube.com/watch?v=HdsxhXPksgo
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs
Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel

Fantastic work, Jabiertxo!
Three comments:
1) to my old astigmatic eyes the tangents do not look like they are quite matched, are you sure you have the tangent code correct. This is especially noticable when you are filleting a curve rather than a line.
2) can you add fillets with smooth curvature variation (e.g. cornu spiral, spiro, and I recall there being a 2geom toy that demonstrated something like that).
3) I'm not exactly understanding the meaning of the green fillet handle - the natural interpretation to me would be to have the green diamond at the transition point from the original path to the fillet, but yours seems to be offset somehow. Why?
Something to think about: If you were writing the curve editing/handle code from scratch, how would it work?
njh
On Mon, May 12, 2014 at 03:26:02PM +0200, Jabiertxo Arraiza Cenoz wrote:
Hi to all. Here is a video showing my new LPE. The branch is here[1].The video here[2].
Thanks to Josh Andler for give me the idea Also thanks very much to suv for the feedback and time inverted on it. And a special thanks to Liam P. White, without his help the LPE need a lot of hours to be.. or not to be.
Bye, Jabiertxo. [1] https://code.launchpad.net/~inktxof/inkscape/fillet-chamfer [2] https://www.youtube.com/watch?v=HdsxhXPksgo
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs
Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel

Hi Nathan.
Fantastic work, Jabiertxo!
Thanks very much
Something to think about: If you were writing the curve editing/handle code from scratch, how would it work?
Firts to the end: Not realy a code from scrach. it have a lot of code from Power Stroke, without this i couldent make this.
Power Stroke store in a vector of Geom::Point the data of his knots, basicaly in the X coordente store the position in the line and in the Y coordinate store the distance from knot to original line in perpendicular. Also have acallback in node tool for handle updates on the original path.
Whith this base i work the effect. The work in progres add new features to the original concept whith the feedback of suv, LiamW and ScislaC. I put the ended result:
I need to store: Distance from Knot to path: Stored in the [Y] part. it determine how far is the knot to the path -configurable by LPE widgets- in poxels, from 0 in the same path, in away. this is because with some zoom knots hide nearly Nodes and need a way to move a bit. It reply your 3 question
Hide or show knot: Knots only show in cusp nodes so [Y] negative values in symm nodes... make the knot invisible.
Fillet or Chamfer: It also is handled by the [Y] part of the Geom::Point. The [Y] value can be an floor(double) or a floor(double)+0.0001. In case there is decimal part, the effect show as chamfer.
If a knot radius is in mode flexible (green knot): Store in the X value of the pathvector (int)index_of_pathvector +(decimal)0.-1 point at this curve. the next curve radius is calculated by the phisical distande in previous.
If a knot radius is fixed (red knot): It still store the value in X but is stored in pixels -whith unit conversions- and with a negative value for easy check. This knots are exactly the X value in pixels*-1 in both sides.
- to my old astigmatic eyes the tangents do not look like they are
quite matched, are you sure you have the tangent code correct. This is especially noticable when you are filleting a curve rather than a line.
I look for more deeply.
- can you add fillets with smooth curvature variation (e.g. cornu
spiral, spiro, and I recall there being a 2geom toy that demonstrated something like that).
The same.
- I'm not exactly understanding the meaning of the green fillet
handle - the natural interpretation to me would be to have the green diamond at the transition point from the original path to the fillet, but yours seems to be offset somehow. Why?
Replied.
Thanks Nathan for the feedback. I send news soon whith the active points. Sorry for my english.
Regards, Jabier.

Hi Nathan. I do a deeper look.
///////////////////////////////////////////////////////////////////// El mar, 13-05-2014 a las 03:40 +1000, Nathan Hurst escribió: 1) to my old astigmatic eyes the tangents do not look like they are
quite matched, are you sure you have the tangent code correct. This is especially noticable when you are filleting a curve rather than a line.
/////////////////////////////////////////////////////////////////////
When I convert to paths a filleting the result curvature is a path of one segment, start and end nodes of this are tangent to front-back curves, and thsi sttart and end nodes are also handled as tangent for the inkscape UI.
Maybe the problem is how far is the tangent handle from a node, but there isn`t a perfect way to determine, it depends from case. I use the nearest point to the tangent from a point placed at a half distance from the real knot filleting to the original cusp node.
Here are some pics about how it works: http://sta.sh/28yrjqkdiw1
////////////////////////////////////////////////////////////////////// 2) can you add fillets with smooth curvature variation (e.g. cornu
spiral, spiro, and I recall there being a 2geom toy that demonstrated something like that).
///////////////////////////////////////////////////////////////////////
I see about it in power stroke code, I realy do the code but finaly removed, think isnt interesting in one curve path, because it increase the nuber of nodes of the resulting path because you need to pass the cubic values of the handles as points, because the incoming and outgoing curve need to be unchanged.
This is my opinion but if anybody want to tell me about, i could change ;)
Thanks Nathan for the feedback.

On Tue, May 13, 2014 at 12:12 PM, Jabiertxo Arraiza Cenoz < jabier.arraiza@...2893...> wrote:
Hi Nathan. I do a deeper look.
///////////////////////////////////////////////////////////////////// El mar, 13-05-2014 a las 03:40 +1000, Nathan Hurst escribió:
- to my old astigmatic eyes the tangents do not look like they are
quite matched, are you sure you have the tangent code correct. This is especially noticable when you are filleting a curve rather than a line.
/////////////////////////////////////////////////////////////////////
When I convert to paths a filleting the result curvature is a path of one segment, start and end nodes of this are tangent to front-back curves, and thsi sttart and end nodes are also handled as tangent for the inkscape UI.
Maybe the problem is how far is the tangent handle from a node, but there isn`t a perfect way to determine, it depends from case. I use the nearest point to the tangent from a point placed at a half distance from the real knot filleting to the original cusp node.
Here are some pics about how it works: http://sta.sh/28yrjqkdiw1
Is there any real benefit to the knots being offset from their origin vs overlapping? Since by default, the fillet & chamfer knots are 10px (and 90degrees CCW) offset from their "origin", it is not very obvious what they're connected to.
See the linked image (1) to see how this is massively confusing. The top object has the knots offset to 0px and looks as expected, the bottom one is the default when the LPE is first applied. By default here, the green knots all correspond to nodes that they are fairly offset from. In this case the top-left node has a control knot that is overlapping the bottom-left node. The bottom-left node has a knot floating to the right of it. As a default this is really bad for usability imho.
One more suggestion (if possible) would be to add a field for "focused knot" which contains the numerical value of the last dragged or clicked knot. This would be nice to fine tune things for perfectionists without forcing them into the xml editor.
Cheers, Josh

El mar, 13-05-2014 a las 15:38 -0700, Josh Andler escribió:
Is there any real benefit to the knots being offset from their origin vs overlapping? Since by default, the fillet & chamfer knots are 10px (and 90degrees CCW) offset from their "origin", it is not very obvious what they're connected to.
See the linked image (1) to see how this is massively confusing. The top object has the knots offset to 0px and looks as expected, the bottom one is the default when the LPE is first applied. By default here, the green knots all correspond to nodes that they are fairly offset from. In this case the top-left node has a control knot that is overlapping the bottom-left node. The bottom-left node has a knot floating to the right of it. As a default this is really bad for usability imho.
Ok this ia a ugly problem. I solve putting the offset inside the same segment instead 90degrees CCW. I dont want to put a initial value of 0 offset because it make unselectable the node, because a default knot place over it.
One more suggestion (if possible) would be to add a field for "focused knot" which contains the numerical value of the last dragged or clicked knot. This would be nice to fine tune things for perfectionists without forcing them into the xml editor.
You can change it numericaly selecting the node, checking apply to selected nodes and change the radius, but you havent a visual value of actual distances, so is planned a knot dialog on a event to full configure it. You can: *Read actual values *Toogle fixed or relative *Also toogle fillet or chamfer *Numeric distance or porcentaje entry This is enought? Liam P. White use a similar dialog in his power stroke implementation [1], i get the base code from him.
@LiamW Whats your opinion to change the knot dialog to a double click? I want to use the same way than you but seems to me double click is better. I have a diff if you want to allow double click event on knots. Tell me about.
[1] https://code.launchpad.net/~inkscapebrony
Regards, Jabier.

Ok this ia a ugly problem. I solve putting the offset inside the same segment instead 90degrees CCW. I dont want to put a initial value of 0 offset because it make unselectable the node, because a default knot place over it.
Done in last revision, here are a screen shot: http://sta.sh/0sfnq2flsfj Nathan ordering my sta.sh broken the link to teh tangent pics, here are new ones: http://sta.sh/2cdmgppy65h
The branch is now in the inkscape.dev group so this is the new direction to the branch: https://code.launchpad.net/~inkscape.dev/inkscape/fillet-chamfer

On Wed, May 14, 2014 at 09:44:33AM +0200, Jabiertxo Arraiza Cenoz wrote:
Ok this ia a ugly problem. I solve putting the offset inside the same segment instead 90degrees CCW. I dont want to put a initial value of 0 offset because it make unselectable the node, because a default knot place over it.
Done in last revision, here are a screen shot: http://sta.sh/0sfnq2flsfj Nathan ordering my sta.sh broken the link to teh tangent pics, here are new ones: http://sta.sh/2cdmgppy65h
Ok, the tangents do look correct. I think the problem is that you need to find the osculating points on the curved path fillets. There is a toy for this (called fillet-minion). See if that makes for nicer fillets.
njh

Hi Nathan, sorry for the late reply, Im waiting to have it to reply.
Ok, the tangents do look correct. I think the problem is that you need to find the osculating points on the curved path fillets. There is a toy for this (called fillet-minion). See if that makes for nicer fillets.
You are ok, oscilating point is wrong. I surf into the 2GEOM toy filet-mignon, i do about but it give me the strange results pointed by Cale Gibbard in the #3 of this launchpad bug https://bugs.launchpad.net/inkscape/+bug/202751 Finaly i adopted the Cale solution in the same bug https://launchpadlibrarian.net/12692602/rcp.svg
Soon I comit the new code. I have a extra problem related to time values on curves, I find that not straight lines have his time values based by his handles instead the distance along it. My cuestion is: Any way to know a point at a distance based time value?
Sorry if not explain so well. Regards, Jabier.

Hello again. Thanks to LiamW i undertand the time in bezier curves is influenced by his curvature. Now i have a problem i want to select a time value at specific distance. Is posibol actualy?
Thanks, Jabier.

Hi Jabiertxo,
There are various functions for this, the technical term is 'arc length', you can either compute a specific curves' total arc length (length), get an sbasis which maps time to arc length(arcLengthSb), or you can reparameterise a curve by arc length (arc_length_parameterization). There was an inverse arc length to time function somewhere too, but I can't remember what it's called.
I think the easiest way to get what you want is roots(arcLengthSb(B) - desiredLength) which will return all the positions on B that are desiredLength from the start.
njh
On Mon, May 19, 2014 at 08:59:19PM +0200, Jabiertxo Arraiza Cenoz wrote:
Hello again. Thanks to LiamW i undertand the time in bezier curves is influenced by his curvature. Now i have a problem i want to select a time value at specific distance. Is posibol actualy?
Thanks, Jabier.

On Mon, May 12, 2014 at 5:26 PM, Jabiertxo Arraiza Cenoz wrote:
Hi to all. Here is a video showing my new LPE. The branch is here[1].
Doesn't work for me. The LPE is built, I get it in the UI, but I see no knots to control the effect on the canvas. Other LPEs work as expected.
Alexandre

Are they cusp nodes on your path?
On Mon, May 12, 2014 at 7:25 PM, Alexandre Prokoudine < alexandre.prokoudine@...400...> wrote:
On Mon, May 12, 2014 at 5:26 PM, Jabiertxo Arraiza Cenoz wrote:
Hi to all. Here is a video showing my new LPE. The branch is here[1].
Doesn't work for me. The LPE is built, I get it in the UI, but I see no knots to control the effect on the canvas. Other LPEs work as expected.
Alexandre
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel

Hi Alexandre.
Oh, good point. I totally missed that. I'm curious if there could be a way to numerically define rounding to make CAD-inclined users happy.
Yes there is, you can select one or more nodes, after in the LPE widget you can select the percentual radius -green knot- or fixed radius usig units combo, this has red knots. You need to press update knots button tocolor change the knots.
Regards, Jabier.

El mar, 13-05-2014 a las 07:13 +0400, Alexandre Prokoudine escribió:
Oh, good point. I totally missed that. I'm curious if there could be a way to numerically define rounding to make CAD-inclined users happy.
Alexandre
Now is posibol whith the new features. https://www.youtube.com/watch?v=wJKzGhJULfc
Thanks for the feedback, regards, Jabier.

Hi Alexandre.
Maybe you are using a group, it only work in paths or shapes, with cusp nodes. Also need the node tool to show knots.
Tell me if not working what operating sistem are you using.
Regards, Jabier.
El mar, 13-05-2014 a las 06:25 +0400, Alexandre Prokoudine escribió:
On Mon, May 12, 2014 at 5:26 PM, Jabiertxo Arraiza Cenoz wrote:
Hi to all. Here is a video showing my new LPE. The branch is here[1].
Doesn't work for me. The LPE is built, I get it in the UI, but I see no knots to control the effect on the canvas. Other LPEs work as expected.
Alexandre
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
participants (5)
-
Alexandre Prokoudine
-
Jabiertxo Arraiza Cenoz
-
Johan Engelen
-
Josh Andler
-
Nathan Hurst