nkh / P5-App-Asciio

Plain ASCII diagram
https://nkh.github.io/P5-App-Asciio/
53 stars 4 forks source link

multi connector box #122

Closed nkh closed 10 months ago

nkh commented 10 months ago

current boxes either

a multi connector box has

Applications:

qindapao commented 10 months ago

@nkh This feature is really great.

nkh commented 10 months ago

I like Graph::Easy which can do grid based layout.

in the image below I drew the first graph manually, it's optimized and looks better but Graph::Easy takes a simpler description:

[ Berlin ] -- train --> [ Bonn ]
[ Bonn ] --> [ Berlin ]
...

but it does its routing by adding connectors to boes when needed , long explanation in the link below.

I'd like to be able to create a Graph::Easy like graph automatically and then modify it manually if necessary, that means having a box with dynamic number of connectors.

screenshot_2023-10-03_17-38-35

http://bloodgate.com/perl/graph/manual/index.html

The multi connector idea can also help with domain specific object #54.

But note that we can already emulate something close for simple drawings by using "enable border connection" or by grouping connectors to objects.

screenshot_2023-10-03_18-01-25

But there's a slight differences between groups and objects so this needs some serious analysis to write a good solution even if I really like the connector objects I'd like to add them to objects without having to create a group.

nkh commented 10 months ago

Another example where having more connectors make sense.

screenshot_2023-10-04_13-07-45

qindapao commented 10 months ago

@nkh I opened boarder connection.I didn't realize the importance of this function until I drew this picture.

nkh commented 10 months ago

@qindapao it's a nice feature but it has made me lazy because it fixes 95% of my needs I never really worked more on connectors.

Note that the "border connection" doesn't connect to the border but anywhere in a box; maybe I should change the name to something else.

qindapao commented 10 months ago

@nkh I know that linking to any part of the box is indeed a very powerful feature.Maybe it would be nice to change the name.Only after reading the documentation and trying it myself did I understand this function.

nkh commented 10 months ago

implemented in 350eaa5

https://github.com/nkh/P5-App-Asciio/blob/main/documentation/mdbook_asciio/src/stencils/box_connectors.md