gotcha

Author Topic: Wish list - bound (linked) points  (Read 3528 times)

March 28, 2017, 03:25:20 PM
Read 3528 times

Andrew

  • Sr. Newbie

  • Offline
  • **

  • 5
  • Gender
    Male

    Male
  • Personal Text
    Too clever.
I'm a new member, so I post here instead of going direct to the bug list.  This is a wish for the wish list; tell me if it's already been discussed.

I would like to be able to bind two (or more) points together.  The idea is, for example, if I have a circle and a line going to its center, that I will move both the line and the circle with one action.

Specifically for me right now, I would like to draw 2 regions outlined by cubic bezier splines and have them share a border for a few points.  This is not a feature of SVG, so I figure that Inkscape devs never considered it, but it would be very handy in many situations.

March 29, 2017, 04:24:37 AM
Reply #1

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
It's not a rare request, and it is already there (partially) with the connectors functionality.
That one, however, is quite buggy, esp. when saving and reloading a saved file. You could try it out, to see if it does enough for your needs:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Connectors.html

When you don't need to move the objects around anymore, I'd suggest quickly converting Object to Path, to avoid losing your work.

Then there's also a new LPE, that can fulfill this requirement (if there is a node where the path can be attached):
http://wiki.inkscape.org/wiki/index.php/Release_notes/0.92#Attach_Path

March 30, 2017, 12:59:18 AM
Reply #2

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome to the forum!

Interesting, I didn't get the Connector functionality from Andrew's description.  But it could be.  I agree that tool is quite buggy, and I would use regular vector objects and/or paths, instead.

I was thinking he might just be looking for Group.  Select whatever objects you want to be together and act as one, the Object menu > Group.

You can have 2 objects with some of their nodes sharing the same nodes.  You can either use the X and Y fields on the Node tool control bar, to get the nodes on the same spot, or use snapping to do it more fluidly.  Snapping is a complex feature which needs some practice to use effectively.  But certainly is not out of reach for newbies, and we're here to help if you need it  :)

http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Snapping.html

If you want to move the whole objects together, you can Group them, as I mentioned already.  Or you can just select them both at the same time and move.  But something about the way you described the nodes sharing the same points and not being an SVG standard, made me think you might be looking for something that some other programs call "glue" the nodes together.  Inkscape doesn't have that as a function, but you could still achieve it, if you need to. 

Using the Node tool, select both objects, then select the nodes by dragging selection box around the overlapped nodes.  Once they are all selected together, they will move together (and all the other nodes will stay where they are).

If we haven't hit on what you're asking, if you could give us some more details, or maybe show us an example, we'll try again  :)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

March 30, 2017, 09:15:14 AM
Reply #3

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Yes, on a closer look, you may be right, Brynn :)

April 06, 2017, 01:50:22 PM
Reply #4

Andrew

  • Sr. Newbie

  • Offline
  • **

  • 5
  • Gender
    Male

    Male
  • Personal Text
    Too clever.
Yes, Brynn, your idea seems right.  Using snap to smooth and selection I seem to be able to move things as I like.  I haven't tried the tangent handles, but I don't expect trouble.  I'll play around and let you know if there are further problems.

The only change I would ask is to improve documentation.  I don't see how I could have found this out without you.

April 07, 2017, 09:15:53 AM
Reply #5

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Yes, as Inkscape has been heavily developed over the last couple of years, the current manual is sorely out of date.  (Help menu > Inkscape manual)  Unfortunately (and a little surprisingly for an open source project) the manual is licensed by a single author, who apparently hasn't had time to update it.  No one else can edit it. There has been some talk recently, about creating an "open" manual, such as a wiki or such as a FLOSS manual, which can be edited by anyone in the community. 

There already is a FLOSS manual for Inkscape http://en.flossmanuals.net/Inkscape, which I think a few people are chipping away at it.  But there is another one which is written more for newbies, that is more step-wise, and less theoretical than the current manual.  We hope to be able to use it as the starting place for such an official open manual.  But unfortunately it's written in French, and it needs to be translated to English, before that work can start.  I'm  not sure what's happening with that.  Someone did start translating it, and I'm not sure how much progress has been made.  https://fr.flossmanuals.net/start-with-inkscape/introduction/

So the need for better documentation is known, and we have some plans for improvement.  And meanwhile we have active forums, and there are tutorials all over the internet.  I've done some extensive searching, and compiled what I think are the best tutorials -- look on the Home tab.

That particular trick is probably in Inkscape's current official manual.  But it would probably be hard for a newbie to find.  Even if it had some name, it would be hard to find.  And it really doesn't even have a name.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

April 09, 2017, 04:36:11 PM
Reply #6

Andrew

  • Sr. Newbie

  • Offline
  • **

  • 5
  • Gender
    Male

    Male
  • Personal Text
    Too clever.
Brynn--    Well, now that I've tried it, there is a problem:  You can't snap to handles. This is something I wanted to do with handles, but they snap only to what nodes can snap to, viz. nodes and paths.

Should I post that to the official wish list (if there is one)?  Or start a new thread?  Or is there a way and I just don't know it?

I will tell you what I'm doing, if I may, and ask whether you would do it differently, given all your experience.

I draw 2 Beziers with a space between them.  I want to fill that area with a different color.  I count the
nodes of the Bezers and draw a nonsense Bezier between them with that number of nodes.  Then I turn on snapping and drag each node to a node on the existing Beziers.  Now all I have to do to get an identical curve is adjust the handles.  This is slow, however.  That's when I'd like to snap handles as well.

See?

April 09, 2017, 05:24:33 PM
Reply #7

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
You can try visualise path/draw handles extension, or, for a live effect the draw handles path effect -from 0.92, probably that can be a workaround for the snapping target.

(By the way +1 for procedural drawings, configurable constraints, dynamic blocks etc.)

April 10, 2017, 12:12:07 PM
Reply #8

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
There probably is a better way to do what you're trying to do.  But I don't clearly understand from your description.

It's true that node handles only snap to other things.  You can't snap something else to them.  (Actually there was a time when node handles would snap to each other, and I'm not sure what happened during development, to change it.)  But I do understand that you want to have a new path match exactly the curve of an exisiting random curve, and you need the node handles to snap, so you can make the curve match precisely.

There is a way to know if you have 2 handles on the same point.  But it's getting them on the same point which is tricky.  You just have to be very careful with dragging it.  Anyway, when you have the handle that you're dragging precisely on top of another handle, the tiny circle at the end of the handle disappears, and instead, you see a tiny filled red dot.  And after you release the mouse, the tiny circle of both handles look like they are missing.  (I'm not sure if any of that is a bug or not.  But I still use it sometimes.)

But getting back to the better way.  It's hard to give you specific steps, because I don't see your project.  But there are a couple of ways to approach it, in general.  One is to duplicate the original path, and then using node editing, remove the parts of that you don't need, which leaves only the part you need.  Or there might be a way to use a path operation to create a matching curve.

Regarding Lazur's suggestion -- very clever!  I had no idea that those things could be snap targets.  When I test, I find the extension works best for snapping to the handle.  With the Draw Handles path effect, the handle of the other path wants to snap to the nodes of the handles (which the path effect created).  You can't see the nodes (unless you do Path menu > Object to Path), but still, the other handle wants to snap to them.  (The same thing happens if you want to snap something to the node which the path effect created.)  However, the handle does not seem to snap to the center of the path effect handle.

So for precision, the extension seems like the better choice.

Yes, that could be much faster than making a duplicate path!

(I don't know if snapping to the hidden nodes of the path effect handle might be a bug.  I was thinking not, at first.  But since you can't snap to the center of the handle, it makes me wonder if it's a bug that you can snap something to the hidden nodes.  Or maybe the bug is not being able to snap to the center of the path effect handle?  I might consult the mailing list about this.)

Edit
But you still would be welcome to make a feature request or bug report (I'm not sure which one would be correct here) (but you make both kind of reports in the same place, in any case).  I think I'll investigate, and try to learn more.  So if you don't make a report, I might end up making one myself.  I really liked it when node handles would snap together!  https://launchpad.net/inkscape

I'm not sure what Lazur means about "procedural drawing".  Do you mean more things like guides, which aren't part of the drawing, but just used for alignment and etc.?
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

April 15, 2017, 04:16:22 PM
Reply #9

Andrew

  • Sr. Newbie

  • Offline
  • **

  • 5
  • Gender
    Male

    Male
  • Personal Text
    Too clever.
Dear Brynn,

Taking up your points in order:  What I'm trying to do:  Think map.  I have Oregon, Nevada, Arizona drawn. Now I want to create California with the minimum effort, while exactly duplicating the existing borders.

Two handles  on the same point:  I suspect this is an old programmer's trick of showing a dynamic item by xor-ing it with the background pixels.  Of course, if you do this twice, the item disappears.

Path effect:  Yes, I noticed the same:  That the handle doesn't snap to the center.

Procedural drawing:  I think he might have been referring to my description of my work-around, how I got the desired path.  When I first read his +1, I figured that he was choosing words from an existing list.  They sound like something people are already supposed to understand.

Last, but not least: If I had it to do over again, I think it would be easier and faster to use path intersection and union to get the effects I want.  For the open paths involved I'd have to do some editing to get rid of artifacts, but that would be a lot quicker than node-by-node construction.

April 15, 2017, 07:11:27 PM
Reply #10

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Yes, now that I understand your circumstances better (map borders), I would suggest using some path operation.  I was thinking you had just one place where you needed to do this, and explaining a path operation might have been confusing.  But for a map, a path operation would be better.  Which one you would use would be your preference, since I can think of some way to use most if not all of them for this kind of project, in one way or another.

Surprisingly, I understand what you mean about 2 handles disappearing, while 3 on the same spot would show up.  I've actually asked developers about a similar behavior for nodes.  If 2 nodes are on the same spot, the node appears much smaller.  But if a 3rd node is snapped, it looks normal again.  And that's exactly the answer they gave me.

Well anyway, I'm glad you solved the problem  :)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann