I'm really pleased to have discovered inkscape recently and it's fantastic that it's free and open source. In the past I've used autodesk autosketch (a cut down version of autocad) for "non-cad" scientific/technical illustrations for publication in papers etc.
One feature which I find makes drawing easier is the ability to set snapping constraints, like "endpoint", "midpoint", "centre", "tangent" when both drawing an element and selecting to transform an existing element (the cursor jumps and changes shape to indicate which snap is currently in action). I wondered if any similar feature exists in inkscape, or whether it might be considered for the roadmap?
Thanks
Hi A.J.,
Snapping to the center is already available in the current SVN versions, and snapping to the midpoint of a straight line shouldn't be too difficult to implement.
Snapping tangentially however is another story, as it requires line-to-line snapping. Currently we only do point-to-point and point-to-line snapping. The calculations for snapping to a line are provided by some libraries, but as far as I can tell they do not provide line-to-line calculations. A simple case, such as snapping a rectangle tangentially to a circle, shouldn't be too difficult to build ourselves. Snapping any Beziér path tangentially to any another object however requires quite some sophisticated programming unfortunately. So although it's very useful, don't expect such a feature any time soon :-(.
Diederik
A.J. Carter wrote:
I'm really pleased to have discovered inkscape recently and it's fantastic that it's free and open source. In the past I've used autodesk autosketch (a cut down version of autocad) for "non-cad" scientific/technical illustrations for publication in papers etc.
One feature which I find makes drawing easier is the ability to set snapping constraints, like "endpoint", "midpoint", "centre", "tangent" when both drawing an element and selecting to transform an existing element (the cursor jumps and changes shape to indicate which snap is currently in action). I wondered if any similar feature exists in inkscape, or whether it might be considered for the roadmap?
Thanks
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
Diederik van Lierop wrote:
Snapping any Beziér path tangentially to any another object however requires quite some sophisticated programming unfortunately. So although it's very useful, don't expect such a feature any time soon :-(.
What sort of sophisticated programming is needed? Could we discuss what would be necessary for tangential bezier snapping?
Aaron Spike
Diederik en Rezi wrote:
Aaron Spike wrote:
Diederik van Lierop wrote:
Snapping any Beziér path tangentially to any another object however requires quite some sophisticated programming unfortunately. So although it's very useful, don't expect such a feature any time soon :-(.
What sort of sophisticated programming is needed? Could we discuss what would be necessary for tangential bezier snapping?
I think that the 2geom library should provide a function to find all parallel segments and subsequently return the shortest distance (vector) in any set of parallel segments, where the segments are a part of Bezier curves in different objects. I'm not familiar with these libraries (are we sure such a function isn't implemented yet) and I don't have a clue how to code such a function. So maybe sophisticated is only relative?
Diederik
The mathematics of a tangent snap will depend on the type of objects that are being snapped together. The simplest case would be snapping a straight line to a Bezier curve. The mathematics should not be too terribly complex; You would need to compute the location of the intersection of a line with the curve, which in general will a number of solutions ranging from none up to an upper limit determined by the degree of the curve. A tangent solution is found by imposing an additional requirement that the derivative of the Bezier curve at a point of intersection must be the same as the slope of the intersecting line. Again, there are multiple solutions possible, depending on the degree of the curve, some of which can be rejected because they might not be between the endpoints of the curve. A unique solution can be obtained by picking the tangent line that is closest to the line defined by the startpoint of the intended tangent line and the current position of the cursor. There is nothing hugely difficult about this. You can be quite certain that it has already been worked out somewhere in the published mathematical literature of Bezier curves.
Would this be helpful - a way to snap a line (or curve) to a curve, without making sure it's a tangent. Applies to objects being moved more than objects being created, I think.
- Find the point on the object being moved closest to where the user clicked.
- Snap that point to the target object, moving the whole object along with it.
Note that there's no actual node at the point on the moved object closest to the user's click, it's just a reference position.
This would allow a line to be placed against a curve... which would be a tangent if the curve was a circle, but otherwise is just a line touching a curve. But even so, I don't think there's an easy way to do that currently?
On a related note, how do you move a node along the path it's already on, or in the case of the end node extend it? I have trouble getting that feature to work consistently.
Cheers -Terry
On Sun, 16 Sep 2007 19:21:15 +0200 Diederik van Lierop <mail@...2312...> wrote:
Hi A.J.,
Snapping to the center is already available in the current SVN versions, and snapping to the midpoint of a straight line shouldn't be too difficult to implement.
Snapping tangentially however is another story, as it requires line-to-line snapping. Currently we only do point-to-point and point-to-line snapping. The calculations for snapping to a line are provided by some libraries, but as far as I can tell they do not provide line-to-line calculations. A simple case, such as snapping a rectangle tangentially to a circle, shouldn't be too difficult to build ourselves. Snapping any Beziér path tangentially to any another object however requires quite some sophisticated programming unfortunately. So although it's very useful, don't expect such a feature any time soon :-(.
Diederik
A.J. Carter wrote:
I'm really pleased to have discovered inkscape recently and it's fantastic that it's free and open source. In the past I've used autodesk autosketch (a cut down version of autocad) for "non-cad" scientific/technical illustrations for publication in papers etc.
One feature which I find makes drawing easier is the ability to set snapping constraints, like "endpoint", "midpoint", "centre", "tangent" when both drawing an element and selecting to transform an existing element (the cursor jumps and changes shape to indicate which snap is currently in action). I wondered if any similar feature exists in inkscape, or whether it might be considered for the roadmap?
Thanks
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
Terry,
Thanks so much for your message, and I do think that the kind of snapping you describe would be useful. This is what autosketch would call a "nearest" snap with the cursor changing to a triangle to distinguish from a grid point snap.
I guess an "intersection" snap (where two shapes cross) could be achieved by inkscape applying this scheme to two distinct curves also?
I do think it would be a great feature, as with moving nodes along a path!
Best Wishes, Alex
On Mon, 17 Sep 2007, Terry Brown wrote:
Content preview: Would this be helpful - a way to snap a line (or curve) to a curve, without making sure it's a tangent. Applies to objects being moved more than objects being created, I think. - Find the point on the object being moved closest to where the user clicked. [...]
A.J. Carter wrote:
Thanks so much for your message, and I do think that the kind of snapping you describe would be useful. This is what autosketch would call a "nearest" snap with the cursor changing to a triangle to distinguish from a grid point snap.
I've used AutoCAD before but never used "nearest" snap, so it's probably just me that I don't comprehend its full value. Please file a feature request so it won't get lost.
I guess an "intersection" snap (where two shapes cross) could be achieved by inkscape applying this scheme to two distinct curves also?
I don't see how a "nearest" snap scheme would help in doing an intersection snap. Maybe you could elaborate on this a bit?
..., as with moving nodes along a path!
Please file a feature request and explain clearly why this would be useful. I don't see it yet, but that's maybe because I've been spening more timing on coding Inkscape than on using it ;-)
Diederik
On Tue, 18 Sep 2007 21:27:16 +0200 Diederik van Lierop <mail@...2312...> wrote:
A.J. Carter wrote:
Thanks so much for your message, and I do think that the kind of snapping you describe would be useful. This is what autosketch would call a "nearest" snap with the cursor changing to a triangle to distinguish from a grid point snap.
I've used AutoCAD before but never used "nearest" snap, so it's probably just me that I don't comprehend its full value. Please file a feature request so it won't get lost.
Hi - I filed this already:
https://sourceforge.net/tracker/?unc=detail&atid=604309&aid=1797114&...
perhaps Alex and anyone else interested could check it captures the idea.
Cheers -Terry
I guess an "intersection" snap (where two shapes cross) could be achieved by inkscape applying this scheme to two distinct curves also?
I don't see how a "nearest" snap scheme would help in doing an intersection snap. Maybe you could elaborate on this a bit?
..., as with moving nodes along a path!
Please file a feature request and explain clearly why this would be useful. I don't see it yet, but that's maybe because I've been spening more timing on coding Inkscape than on using it ;-)
Diederik
Hello,
On Sun, 16 Sep 2007 19:21:15 +0200, Diederik van Lierop wrote:
Snapping to the center is already available in the current SVN versions, and snapping to the midpoint of a straight line shouldn't be too difficult to implement.
Could you tell what snap features of these are already implemented or planned?
Taken from RFE 928027: advanced snap features *Snap to Endpoint *Snap to Midpoint *Snap to Intersection *Snap to Apparant Intersection *Snap to Extension *Snap to Center (already in SVN) *Snap to Quadrant *Snap to Tangent *Snap to Perpendicular *Snap to Parallel *Snap to Insert *Snap to Node *Snap to Nearest *Snap to None (Cancel Snap)
TIA, Helge
Helge Hielscher wrote:
Taken from RFE 928027: advanced snap features *Snap to Endpoint *Snap to Midpoint *Snap to Intersection *Snap to Apparant Intersection *Snap to Extension *Snap to Center (already in SVN) *Snap to Quadrant *Snap to Tangent *Snap to Perpendicular *Snap to Parallel *Snap to Insert *Snap to Node *Snap to Nearest *Snap to None (Cancel Snap)
The descriptions given of each snap mode in this RFE are quite useful! Thanks for referring to it, I hadn't seen it yet. To answer your question: Inkscape only snaps to path nodes (i.e. endpoints) and to an object's transformation center (not exactly the same as AutoCAD's center). And of course it snaps to boundingboxes, paths, guides, and grids.
One day we might have some of the CAD snapping modes in Inkscape, but don't get too excited yet: it will take time and there are some other things that have a higher priority...
Diederik
Hi,
I've just noticed that the feature request submitted by Terry Brown has a name in the "assigned to" box of "dvlierop2". I was just wondering if this means that some part of the technical snapping is being worked on by the inkscape community now?
Best Wishes, Alex
On Thu, 20 Sep 2007, Diederik van Lierop wrote:
Helge Hielscher wrote:
Taken from RFE 928027: advanced snap features *Snap to Endpoint *Snap to Midpoint *Snap to Intersection *Snap to Apparant Intersection *Snap to Extension *Snap to Center (already in SVN) *Snap to Quadrant *Snap to Tangent *Snap to Perpendicular *Snap to Parallel *Snap to Insert *Snap to Node *Snap to Nearest *Snap to None (Cancel Snap)
The descriptions given of each snap mode in this RFE are quite useful! Thanks for referring to it, I hadn't seen it yet. To answer your question: Inkscape only snaps to path nodes (i.e. endpoints) and to an object's transformation center (not exactly the same as AutoCAD's center). And of course it snaps to boundingboxes, paths, guides, and grids.
One day we might have some of the CAD snapping modes in Inkscape, but don't get too excited yet: it will take time and there are some other things that have a higher priority...
Diederik
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
A.J. Carter wrote:
Hi,
I've just noticed that the feature request submitted by Terry Brown has a name in the "assigned to" box of "dvlierop2". I was just wondering if this means that some part of the technical snapping is being worked on by the inkscape community now?
It's on my to-do list, so at some point at least some of these snapping modes will be implemented. It will take a few months however before I get to this, because there are some other more general snapping issues to be solved first.
Diederik
Thanks so much for adding this to your to-do list; I'm sure people involved with technical drawing all over appreciate it :-)
Inkscape truely is a great product and community.
Alex
It's on my to-do list, so at some point at least some of these snapping modes will be implemented. It will take a few months however before I get to this, because there are some other more general snapping issues to be solved first.
Diederik
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Inkscape-user mailing list Inkscape-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-user
participants (7)
-
A.J. Carter
-
Aaron Spike
-
David Gressett
-
Diederik en Rezi
-
Diederik van Lierop
-
Helge Hielscher
-
Terry Brown