[Solved+Issue] Connector between centers of two circles

Discuss the drawing application
Post Reply
timehavenmedia
Posts: 4
Joined: Mon Aug 30, 2021 9:10 pm

[Solved+Issue] Connector between centers of two circles

Post by timehavenmedia »

According to Chapter 9 of the OODraw Guide:
You can also attach the beginning or the end of a connector to the middle of an object. This is useful when the final position of the object is not yet determined.
I don't see this happening. What I'd like is for there to be NO glue points on the circumference of a circle, and for the center to be the ONLY glue point for connectors. As it is, it's very difficult to draw simple standard graphs, as in Graph Theory. https://en.wikipedia.org/wiki/Graph_theory

Seeking advice on how to do this in OO. (I see that yworks is specifically for this)

Reference: Organization Charts, Flow Diagrams, and More (Page 12)
Last edited by Hagar Delest on Thu Sep 02, 2021 10:05 pm, edited 1 time in total.
Reason: Tagged [Solved].
Open Office 4.1.10 on Mac OS 10.13.16
User avatar
Lupp
Volunteer
Posts: 3553
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: How to make simple Connector between centers of two circ

Post by Lupp »

I didn't work recently with AOO, but it should still be the same as in LibreOffice:

(The middle (How defined? In case of a circle unambiguous.) of a shape can be a "logical" glue point, but not one in the sense ordinary people would assume. This only afflicts the behaviour under movement of the concerned shapes while the "visual glue points" are shown on the borderline. I wouldn't discuss this feature any more.)

To get what I would expect, and what you obviously want, requires to resort to a workaround. It's a bit ticklish, but basically you define a little helper shape (short line e.g.) which you can copy/paste when needed. You establish the connector for the middles of these lines, and place them subsequently in such a way that the connector ends are where you want them with respect to the original shapes. Then you group each single helper with the appropriate original shape. Visibility and colors may require additional work, but basically you can re-use a "fake connection" based on copy/paste.

Yes. It's not really handy.

An example you find attached to my answer here: https://ask.libreoffice.org/t/it-is-pos ... draw/55504.

A new example closely regarding this topic:
Attachments
aoo106017AditionalGluePoints.odg
(11.66 KiB) Downloaded 183 times
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
timehavenmedia
Posts: 4
Joined: Mon Aug 30, 2021 9:10 pm

Re: How to make simple Connector between centers of two circ

Post by timehavenmedia »

Danke Lupp for your response. As you say, not handy. I am looking for a (more) direct solution.

Does anyone know what the Draw Guide authors meant by the quote I included, which implies that an object has an implicit glue point in its center?

It would be great if you could toggle between using the default glue points, and a single center glue point, or have that as a per-drawing preference.

While I am replying here, allow me to add that connectors would naturally be hidden in (behind) the objects. That is, while the geometric line runs to the center, the connector is drawn only to the circumference of a circle, or perimeter of a shape.
Open Office 4.1.10 on Mac OS 10.13.16
User avatar
DiGro
Posts: 175
Joined: Mon Oct 08, 2007 1:31 am
Location: Hoorn NH, The Netherlands

Re: How to make simple Connector between centers of two circ

Post by DiGro »

timehavenmedia wrote:Does anyone know what the Draw Guide authors meant by the quote I included, which implies that an object has an implicit glue point in its center?
They probably meant that, apart from the gluepoints at the corners, there is a gluepoint at the center of the upper, lower, left and right line of the object. As explained by figure 11
Figure 11
Figure 11
DG9-11b.png (999 Bytes) Viewed 7530 times
Obviously this is true for rectangles and squares, but not for ellipses and circles
____________
DiGro

AOO 4.1.15 (Dutch) on Windows 11. Scanned with Ziggo Safe Online (F-Secure)
User avatar
Lupp
Volunteer
Posts: 3553
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: How to make simple Connector between centers of two circ

Post by Lupp »

Lupp wrote:I wouldn't discuss this feature any more.
However, on occasion a man must do what a man must do. In this case it is to break his word.
I don't know what version of the OOo (or AOO?) Draw guide the original questioner quoted, and can't find the words in my guide. The most recent guide I have at hand is "LibreOffice Draw Guide 4.3".
There the respectiv chapter is numbered 8, and it tells me that actually glue points can be added to a shape without resorting to any workaround.
Thanks to @timehavenmedia for driving me into the guide where I found something I never noticed for the many years of occasionally using Draw.

See See LibO Draw Guide 4.3, chapter 8, p 160 !

I also tested with AOO 4.1.7, and everything worked.
The little cloud: I didn't find a way to create an additional glue point in the "felt area" of a shape with setting "Area=None". The workaround now needed is simple and obvious, however.
New demo (also concerning the old feature the OQ mentioned):
Attachments
aoo106017AditionalGluePoints2.odg
(16.91 KiB) Downloaded 217 times
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
User avatar
DiGro
Posts: 175
Joined: Mon Oct 08, 2007 1:31 am
Location: Hoorn NH, The Netherlands

Re: How to make simple Connector between centers of two circ

Post by DiGro »

Another option might be to copy an existing circle with gluepoint in the center to the Gallery to reuse again.

You might even consider to put two circles with a connecting line in the Gallery to reuse again.
Connected circles in Gallery
Connected circles in Gallery
See this link: viewtopic.php?f=11&t=686
____________
DiGro

AOO 4.1.15 (Dutch) on Windows 11. Scanned with Ziggo Safe Online (F-Secure)
User avatar
DiGro
Posts: 175
Joined: Mon Oct 08, 2007 1:31 am
Location: Hoorn NH, The Netherlands

Re: How to make simple Connector between centers of two circ

Post by DiGro »

Lupp wrote:I don't know what version of the OOo (or AOO?) Draw guide the original questioner quoted, and can't find the words in my guide.
I suppose it came from
https://wiki.openoffice.org/wiki/Docume ... e_Chapters

there it would be https://wiki.openoffice.org/w/images/f/ ... Charts.odt
(page 9 just below Figure 9) ((page 165 to 168 in the full book OpenOffice.org 3.3 Draw Guide))

which gives about nearly the same explanation.
____________
DiGro

AOO 4.1.15 (Dutch) on Windows 11. Scanned with Ziggo Safe Online (F-Secure)
timehavenmedia
Posts: 4
Joined: Mon Aug 30, 2021 9:10 pm

Re: How to make simple Connector between centers of two circ

Post by timehavenmedia »

Aha.. I had not thought of "middle" referring to glue points in the middle of sides. That explains the statement in the documentation*.

Also, Thanks for gallery suggestion. One can create a circle "node" in higher zoom level to place glue point in center. (Otherwise it's impossible for a small circle (1/4") which I might want to use in a graph drawing.) This seminal node would added to the gallery as used as needed.

However, while a glue point in center works, in practice it competes with the other glue points (at 12, 3, 6, 9 o'clock) for the connection endpoint, especially with a typically small node in a graph. That's why I think that a shape should (optionally) be able to have only a center glue point. I'm wondering if this Feature is in a request database?

*Lastly, the quotation I included was from: Chapter 9, Page 10 of
Organization Charts, Flow Diagrams, and More.
https://wiki.openoffice.org/w/images/3/ ... Charts.pdf

John Miller
Open Office 4.1.10 on Mac OS 10.13.16
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: How to make simple Connector between centers of two circ

Post by John_Ha »

Draw is not designed to be a CAD package - it is designed for doing things like flow charts, organisation charts etc. The centre of a circle or other shape is therefore irrelevant. The middle of a 5-point star is not at the centre of the star - it is halfway between the single top point and the lower two points. Anything you may get to work will be a hack.

Chapter 10 - Advanced Draw Techniques says
Drawing to scale

Draw is not a CAD (computer-aided design) program but a graphics program with which you can produce drawings to scale. The example used for this chapter is a drawing of a Logic Circuit Diagram. The exact meaning of the individual symbols is not described here as we are only interested in the drawing techniques used to produce the diagram.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
cwolan
Posts: 129
Joined: Sun Feb 07, 2021 3:44 pm

Re: How to make simple Connector between centers of two circ

Post by cwolan »

With the help of a short Basic macro I added a glue point in the centre of the circle and inserted the circle into the Gallery.
Drawing a graph seems now easy (cf. the screenshot).
Graph.JPG
timehavenmedia wrote:However, while a glue point in center works, in practice it competes with the other glue points (at 12, 3, 6, 9 o'clock) for the connection endpoint, especially with a typically small node in a graph. That's why I think that a shape should (optionally) be able to have only a center glue point. I'm wondering if this Feature is in a request database?
1. I didn't experienced any problem as regards "it competes with other glue points".
2. "This Feature" is in a request database indeed.
See: Bugzilla Issue 105438 - Connectors unable to target shape centers
https://bz.apache.org/ooo/show_bug.cgi?id=105438
OpenOffice 1.1.5 – 4.1.15
LibreOffice 3.3.0.4 – 7.6.6
Windows 7,10,11 64-bit
timehavenmedia
Posts: 4
Joined: Mon Aug 30, 2021 9:10 pm

Re: How to make simple Connector between centers of two circ

Post by timehavenmedia »

EXCELLENT REPLY. Thanks!
Open Office 4.1.10 on Mac OS 10.13.16
cwolan
Posts: 129
Joined: Sun Feb 07, 2021 3:44 pm

Re: How to make simple Connector between centers of two circ

Post by cwolan »

The attached .odg file contains a macro "insertGluePoint" (in the "Standard" library, module "Module1").

1. open the file in AOO
2. insert a shape - e.g. circle
3. run the macro "insertGluePoint" (via Tools - Macros - Run Macro)
4. add a connector (a glue point in the centre of the shape should be visible).
Attachments
testGP.odg
(9.25 KiB) Downloaded 196 times
OpenOffice 1.1.5 – 4.1.15
LibreOffice 3.3.0.4 – 7.6.6
Windows 7,10,11 64-bit
Post Reply