- attached curvehandles.png
Add Snapping on spline curve handles
Hey, I would really like to be able to snap the (end points of the) handles of spline curves to adjacent lines/points.
Example cases:
- A Curve joining a straight line, ensure continuity (see picure 2 and 3)
- A Curve starting with start continuity aligned perpendicular to a line, i.e. joined to the normal. (Picture 1)
How should snapping look like? Two opportunities:
- Kind of a magnetic snapping
- With mouse drag and key-combination (which one?).
Comments (31)
-
reporter -
repo owner How do you plan get angle of adjacent line?
May be better snap value of angle for selected handle if Shift pressed (Ctrl we already use for scale)?
-
reporter I don't know yet how it actually can be done, I have to get into the drawing code. But this was a thing I almost immediately looked after when playing around with valentina (as a user). Rotating with discrete steps is another feature that woud be nice.
-
Ask the Inkscape developers about snapping. They know about Valentina and are supportive. Inkscape mail lists are here: https://inkscape.org/en/community/mailing-lists/
-
reporter - attached Clipboard02a.png
- attached Clipboard03.png
- edited description
-
reporter - edited description
-
repo owner I don't think we can implement whole snapping feature. Just snapping we maybe can implement, but a curve will not follow a line angle after changing. For this better use formulas, like we do in other cases. See issue
#216where Susan proposed this. With formula it will more look like manual snapping. -
reporter Sounds good. Actually I missed the point that really following the line is better and more in sense of the whole construction process. This request is indeed related to the fact, that you cannot influence the curve handles by value/formula at the moment.
An interactive procedure would be nice nevertheless, but this is a general/conceptual thing and applies to other tools as well.
-
repo owner An interactive procedure would be nice nevertheless, but this is a general/conceptual thing and applies to other tools as well.
Ok, agree. I will look if we can get data about angles when move curve's handle.
-
repo owner - A Curve joining a straight line, ensure continuity (see picture 2 and 3)
- A Curve starting with start continuity aligned perpendicular to a line, i.e. joined to the normal. (Picture 1)
Can you again explain your pictures? I little bit understood about curvehandles.png. Here we have handle on line A_A1.
But what about others two? I don't see snapping here.
-
We need to update the Curve Options dialog box to enable these changes, regardless of how we implement them visually
A. Replace the 'angle of the control point' field with four radio buttons:
- Parallel to two points
- Perpendicular to two points
- Angle
- Formula
When a radio button is selected the appropriate input fields are enabled (Select 2 points, Enter Angle, or Enter Formula)
B. Add Yes/No check box to make curve Clockwise.
C. The Curve options dialog box will appear when:
- User highlights curve then right clicks on curve and selects 'Options' (current)
- User highlights curve then right clicks on a control point and selects 'Options' (new)
D. Add 'Show Curve Details' icon on top menu bar to show/hide control points and curve direction
-
To enable visual 'snapping', a red 'square' or 'line' could flash when the control point creates a handle that is perpendicular to or inline with an adjacent line.
The handle would appear as a thick red line at the moment when it becomes inline with an adjacent line, and returns to a thin line when it is not inline.
A red square would appear at the endpoint at the moment when the handle becomes perpendicular to an adjacent line, and disappears when angle isn't perpendicular.
-
repo owner B. Add Yes/No check box to make curve Clockwise.
Why?
User highlights curve then right clicks on a control point and selects 'Options' (new)
Should be easy to do.
D. Add 'Show Curve Details' icon on top menu bar to show/hide control points and curve direction
In which section? Pattern piece? Maybe also add toolbutton?
-
repo owner A. Replace the 'angle of the control point' field with four radio buttons:
- Parallel to two points
- Perpendicular to two points
- Angle
- Formula
Angle and formula can be one single field. Angle it is just single value. I have plan make it possible. :) Already begin working on it. Need make changes for support unit testing.
Maybe instead of selection two points use LineAngle_X_X variables? Parallel line will has save angle value. Perpendicular line will has angle+90.
Also do you know that you can't select point if this point was created after curve?
-
repo owner To enable visual 'snapping', a red 'square' or 'line' could flash when the control point creates a handle that is perpendicular to or inline with an adjacent line. The handle would appear as a thick red line at the moment when it becomes inline with an adjacent line, and returns to a thin line when it is not inline. A red square would appear at the endpoint at the moment when the handle becomes perpendicular to an adjacent line, and disappears when angle isn't perpendicular.
How about text? Changes mouse cursor and text? Visual 'snapping' will work only if user has single value in formula.
Also i see we need controls for enable/disable snapping.
-
repo owner I propose new snapping "Grid". Not visible grid will help more accurate set value.
And show angle and length when user create segment.
-
reporter Oh dear, I did not came to answer the question yesterday, and now discussion grew further. Now it is me that has problems to follow you ;) And we have to be careful, because now two different (even if related to each other) things are discussed here: Alignment of Curve handles (thats what my intention was about when starting this issue) and interactivity. Also things get kinda abstract, for some parts I think we need visualized examples.
Roman, are your questions about the pictures probably somehow answered now? This are basically variants of the same thing: aligning the curve handle to a line - directly or with 90/180 degrees offset.
At this point from my side interactive snapping, thought it is something I am used to from other graphics applications, becomes less important when I have all possibilities to use lines and stuff in a formula. This is also more matching the construction process with other tools.
Visual 'snapping' will work only if user has single value in formula.
yes, I see the point, but as I said this is really more a general design question that is really not limited to this tool and thus should be probably discussed separately.
Also i see we need controls for enable/disable snapping.
I still prefer shorcuts for this purpose, but some graphics applications also have e.g. snapping modes.
I propose new snapping "Grid". Not visible grid will help more accurate set value.And show angle and length when user create segment.
Sorry, I really do not understand what you mean here. As I said, probably better separate the issues.
-
Making the curve clockwise during Draw phase. Easier than making the curve clockwise during Layout phase. I think this phrase 'clockwise' is easier for the average user to understand that direction is important, rather than 'Reverse curve'.
The 'Show Curve Details' would show details similar to the 'Show path effects' and 'Show Bezier handles' icons at the end of the top menu bar in Inkscape. Inkscapes' icons affect the currently selected nodes. Valentina's icon could be selected, and then the user selects the pattern piece. Sometimes it helps understand the pattern by visualizing how the whole thing works.
-
repo owner The 'Show Curve Details' would show details similar to the 'Show path effects' and 'Show Bezier handles' icons at the end of the top menu bar in Inkscape. Inkscapes' icons affect the currently selected nodes. >Valentina's icon could be selected, and then the user selects the pattern piece. Sometimes it helps understand the pattern by visualizing how the whole thing works.
Already working on it.
-
What text would you suggest? Mouse cursor and text could work too.
Susan Spencer Valentina Community Manager valentina-project.org http://www.valentina-project.org/ bitbucket.org/dismine/valentina/overview http://bitbucket.org/dismine/valentina/overview groups.google.com/forum/#!forum/valentina-project-list http://groups.google.com/forum/#!forum/valentina-project-list facebook.com/Valentina.Project http://facebook.com/Valentina.Project @ValentinaPSW http://groups.google.com/forum/#!forum/valentina-project-list valentina-project.blogspot.com http://valentina-project.blogspot.com/
-
repo owner Making the curve clockwise during Draw phase. Easier than making the curve clockwise during Layout phase. I think this phrase 'clockwise' is easier for the average user to understand that direction is important, >rather than 'Reverse curve'.
I understand this, but it will not help. I can show you example where same curve for two different work pieces must have opposite direction at the same time.
Instead i propose make creation workpiece more interactive. Just highlight path. This tool is not finished yet.
-
repo owner What text would you suggest? Mouse cursor and text could work too.
How about left 'Show Curve Details'?
-
Maybe instead of selection two points use LineAngle_X_X variables? Parallel line will has save angle value. Perpendicular line will has angle+90. The two points don't always have a line between them.
Also do you know that you can't select point if this point was created after curve? Yes, the order that the points are created is important.
-
Okay I understand now.
-
repo owner The two points don't always have a line between them.
Who said you can't make this line yourself? I think create new interface it is more difficult then just make line where you need. Now user can change color for a line. In future even hide such lines.
-
Okay, agreed, make the line and use it's Line_X_X angle. Can we have dashed or dotted lines?
[image: dismi_] Roman Telezhinskyi commented on issue #233: Snapping
-
repo owner Can we have dashed or dotted >lines?
Yes.
-
- changed title to Add Snapping on spline curve handles
-
repo owner -
repo owner - changed status to on hold
Don't see how to implement.
-
repo owner - removed milestone
Removing milestone: v0.5.0 (automated comment)
- Log in to comment