Something even more annoying: node doesn't snap to path intersection. Draw horizontal and vertical lines to make a cross-like simplified shape. Drag node from some other shape along that lines. It will snap to either line but not both at the same time. (I think I've opened a bug report a long time ago for this one)
There's no visualization of snapping (pervert request -- I know it wouldn't be easy to implement) :)
And don't know about that how hard would be to implement this one... There was some mentioning of current svn version slowness when dragging shapes over the canvas (with complex drawing) because it wants to snap to everything. Would it be even possible to determine how fast user wants to move something? Like the incorruptible redrawing bulia implemented. It would work like this: User drags object. If he/she stops/slows down, try if it's some of possible snapping condition is satisfied and snap!
Vlada
On Wednesday 22 August 2007 14:33:22 Johan Engelen wrote:
Hoi Diederik,
Very nice idea! In notepath.cpp from line 4051 onwards, the node type is determined. This is saved in sodipodi:nodetypes attribute, but I don't know whether you can rely on that if it is present. I think 2geom will replace all path representations in the end, but I don't know. (I think 2geom paths also contain no information about the nodes, only about segments, correct me if I'm wrong!). Maybe if you only calculate the nodetypes when a path is loaded or changed, the speed penalty will not be that large?
Perhaps I can interest you in some other snapping business? ;-) Right now, guide-grid intersections do not snap. Another thing is angled snap lines. Angled guides are often requested, and the axonometric grid can also use those snaplines. Let me know if you want to hear what I've thought up. I won't have the time to implement it soon.
Grtz, Johan
On Tue, 2007-08-21 at 20:10 +0200, Diederik van Lierop wrote:
Hi,
I hope you don't mind if I increase the traffic on inkscape-devel even more ;-)
At some point an idea popped up to only snap to nodes at discontinuities in paths, and not to nodes at smooth transitions from one Bézier segment to another. This is more intuitive (less "Hey, what it is Inkscape snapping to now?") and might increase performance.
Problem is that in the object-snapper I only have access to SPCurve, which is a wrapper for "old-style" NArtBpath. It's easy to find out whether a point is inbetween two Bézier segments, but how do I find out if a transition is smooth? I guess that should be done by comparing the control points, or is there an easier way? With the transition to lib2geom, will the NArtBpath be deprecated in favor of the Path class? (that would make this rather exercise useless in the long run).
Any pointers would be appreciated here,
Diederik