Feature proposal: moving nodes without moving handles
Hi,
I'm a Inkscape user for 3 or 4 years and first of all I want to thank and congratulate U for this program. I'm also a C++ beginner developer and I want to implement a functionality. It's about the moving of nodes.
In Inkscape, at present, when U move a node toward a vector V1, his handles (bezier indicators) move with the same vector V1. What I want to do is to add the possibility to move a node with V1 while his handles move with f*V1 where 0.0 <= f <= 1.0 As if U put a spaghetti on a table, U took it near the middle and pull it up.
This could be very useful to draw a sun or a hair shape.
As I said earlier, I'm a C++ beginner. I just succeeded in compiling Inkscape using Eclipse under Ubuntu but I don't know where to modify, or search... even where to look at, to understand how the node's moving works presently.
So here are my questions :
1. Did I made myself clear ? English is not my mother tongue (so please pardon me for faults) and before going further I want U to understand my proposition.
2. Could someone lead me or just show me where to look at to understand the Inkscape architecture and more specifically the node's moving ?
Thanks.
..miguel..
Hi Miguel,
Your proposal makes sense to me. Have you already thought about how to implement the UI for this?
Have a look in src/nodepath.cpp, for example node_request(), sp_node_selected_move(), sp_nodepath_move_node_and_handles(), etc. You'll probably figure it out from there.
Regards,
Diederik
Miguel BYRAM wrote:
Hi,
I'm a Inkscape user for 3 or 4 years and first of all I want to thank and congratulate U for this program. I'm also a C++ beginner developer and I want to implement a functionality. It's about the moving of nodes.
In Inkscape, at present, when U move a node toward a vector V1, his handles (bezier indicators) move with the same vector V1. What I want to do is to add the possibility to move a node with V1 while his handles move with f*V1 where 0.0 <= f <= 1.0 As if U put a spaghetti on a table, U took it near the middle and pull it up.
This could be very useful to draw a sun or a hair shape.
As I said earlier, I'm a C++ beginner. I just succeeded in compiling Inkscape using Eclipse under Ubuntu but I don't know where to modify, or search... even where to look at, to understand how the node's moving works presently.
So here are my questions :
- Did I made myself clear ? English is not my mother tongue (so please
pardon me for faults) and before going further I want U to understand my proposition.
- Could someone lead me or just show me where to look at to understand
the Inkscape architecture and more specifically the node's moving ?
Thanks.
..miguel..
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Diederik,
Thanks for your answer
On Sun, Mar 23, 2008 at 4:20 AM, Diederik van Lierop <mail@...1689...> wrote:
Hi Miguel,
Your proposal makes sense to me. Have you already thought about how to implement the UI for this?
Yes I do. I think about a keycombination while someone drag the node and a up-down value item into the node toolbar to modify the amount of "solidarity" between the node and its handles.
Have a look in src/nodepath.cpp, for example node_request(), sp_node_selected_move(), sp_nodepath_move_node_and_handles(), etc. You'll probably figure it out from there.
I looked in all those function and it help me a lot in my understanding of the node's move. It seems that I got to make a node-sculpt similar function except that I got to set the dragged node's type to NODE_CUSP, the other nodes act the same way than in the node-sculpt.
Regards,
Diederik
Miguel BYRAM wrote:
Hi,
I'm a Inkscape user for 3 or 4 years and first of all I want to thank and congratulate U for this program. I'm also a C++ beginner developer and I want to implement a functionality. It's about the moving of nodes.
In Inkscape, at present, when U move a node toward a vector V1, his handles (bezier indicators) move with the same vector V1. What I want to do is to add the possibility to move a node with V1 while his handles move with f*V1 where 0.0 <= f <= 1.0 As if U put a spaghetti on a table, U took it near the middle and pull it up.
This could be very useful to draw a sun or a hair shape.
As I said earlier, I'm a C++ beginner. I just succeeded in compiling Inkscape using Eclipse under Ubuntu but I don't know where to modify, or search... even where to look at, to understand how the node's moving works presently.
So here are my questions :
- Did I made myself clear ? English is not my mother tongue (so please
pardon me for faults) and before going further I want U to understand my proposition.
- Could someone lead me or just show me where to look at to understand
the Inkscape architecture and more specifically the node's moving ?
Thanks.
..miguel..
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On Sun, Mar 23, 2008 at 11:54 AM, Miguel BYRAM <migounanounet@...400...> wrote:
Diederik,
Thanks for your answer
On Sun, Mar 23, 2008 at 4:20 AM, Diederik van Lierop <mail@...1689...> wrote:
Hi Miguel,
Your proposal makes sense to me. Have you already thought about how to implement the UI for this?
Yes I do. I think about a keycombination while someone drag the node and a up-down value item into the node toolbar to modify the amount of "solidarity" between the node and its handles.
Finally, perhaps the key combination is not possible. Alt, CTRL & Shift are allready used. Another solution could be the right button dragging. Will it be difficult to implement ? Is it possible with the GTK version used in Inkscape ?
Have a look in src/nodepath.cpp, for example node_request(), sp_node_selected_move(), sp_nodepath_move_node_and_handles(), etc. You'll probably figure it out from there.
I looked in all those function and it help me a lot in my understanding of the node's move. It seems that I got to make a node-sculpt similar function except that I got to set the dragged node's type to NODE_CUSP, the other nodes act the same way than in the node-sculpt.
I made what I said : a function similar to sp_node_selected_sculpt call sp_node_selected_needlelize. At present time it only move the dragged node without moving the other selected nodes or modifying their handles.
I want to make curve the segment before and after the draged point to get the spaghetti effect (see below) but, when I call sp_nodepath_set_line_type() it doesn't set the handle the same way than when I press the "set to curve the selected segment" button in the toolbar. So, to understand what it's done when I press the button, and then reproduce it before the drag, I want to know where can I find the code describing the toolbar ?
I join the 2 little functions created to needlelize a node.
Regards, Miguel
Regards,
Diederik
Miguel BYRAM wrote:
Hi,
I'm a Inkscape user for 3 or 4 years and first of all I want to thank and congratulate U for this program. I'm also a C++ beginner developer and I want to implement a functionality. It's about the moving of nodes.
In Inkscape, at present, when U move a node toward a vector V1, his handles (bezier indicators) move with the same vector V1. What I want to do is to add the possibility to move a node with V1
while
his handles move with f*V1 where 0.0 <= f <= 1.0 As if U put a spaghetti on a table, U took it near the middle and pull it up.
This could be very useful to draw a sun or a hair shape.
As I said earlier, I'm a C++ beginner. I just succeeded in compiling Inkscape using Eclipse under Ubuntu but I don't know where to modify,
or
search... even where to look at, to understand how the node's moving works presently.
So here are my questions :
- Did I made myself clear ? English is not my mother tongue (so
please
pardon me for faults) and before going further I want U to understand
my
proposition.
- Could someone lead me or just show me where to look at to
understand
the Inkscape architecture and more specifically the node's moving ?
Thanks.
..miguel..
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
... and make sure to have a good look at how the sculpt tool works! I think the related node-handling code for that tool is in sp_nodepath_selected_nodes_sculpt()
Diederik
Miguel BYRAM wrote:
Hi,
I'm a Inkscape user for 3 or 4 years and first of all I want to thank and congratulate U for this program. I'm also a C++ beginner developer and I want to implement a functionality. It's about the moving of nodes.
In Inkscape, at present, when U move a node toward a vector V1, his handles (bezier indicators) move with the same vector V1. What I want to do is to add the possibility to move a node with V1 while his handles move with f*V1 where 0.0 <= f <= 1.0 As if U put a spaghetti on a table, U took it near the middle and pull it up.
This could be very useful to draw a sun or a hair shape.
As I said earlier, I'm a C++ beginner. I just succeeded in compiling Inkscape using Eclipse under Ubuntu but I don't know where to modify, or search... even where to look at, to understand how the node's moving works presently.
So here are my questions :
- Did I made myself clear ? English is not my mother tongue (so please
pardon me for faults) and before going further I want U to understand my proposition.
- Could someone lead me or just show me where to look at to understand
the Inkscape architecture and more specifically the node's moving ?
Thanks.
..miguel..
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
participants (3)
-
Diederik en Rezi
-
Diederik van Lierop
-
Miguel BYRAM