zhmylove / genealogy

MIT License
6 stars 4 forks source link

Incestuous genealogical trees #1

Open CuloArdido opened 2 years ago

CuloArdido commented 2 years ago

Any ideas on how to make family trees of incestuous families? Because I have been working on this but I would like to redo it with your extension. In case it is not contemplated, the following image could be used as an example where the consanguinity between parents is indicated: Example of a possible incestuous family tree When trying to use genealogy.iuml, the following doubts also arose:

  1. Can strings be used instead of numbers as identifiers when making a person instance?
  2. How do I get the pair_id that can be used in the pair, doublepair and child procedures?
  3. In example.puml the tree is generated from bottom to top, is that normal?
  4. How can I hide the nodes so that the descendants come directly from the lines as in this case?
  5. Is it possible to change the style and color of some lines/joins?
zhmylove commented 2 years ago

Hi @CuloArdido Thank you for paying attention to this module. Currently I'm on a vacation and probably I'll be ready to improve the project since 10th Aug as I don't have an access to my PC now.

As for incestuous families, I've checked that there is no problem when the bond is between brother and sister (like on yours picture). But when the parental bond is between parent/child, then plantuml fails to place some elements. Although the edges are correct. In any case, just child() addition works as expected.

I haven't tested if strings can be used instead of numbers. You can try it out. I bet this will do.

How do I get the pair_id... You just select them by your own. Just see this inside example: I've picked them just sequentially, but they could be any.

...the tree is generated from bottom to top... I believe, you can write them in any order. Plantuml will sort them out correctly.

Is it possible to change the style and color of some lines/joins? Absolutely yes, just like in regular plantuml/graphviz.

How can I hide the nodes so that the descendants come directly from the lines... I don't think, we can hide "interface" objects somehow. I was just thinking about re-implementing the whole thing on a class diagram, instead of on a component. It'll take some time to investigate around it, so I'll be ready to continue only after vacation... Feel free to modify the source in any ways, I'll be glad to get pull requests. Thank you!

zhmylove commented 2 years ago

@CuloArdido it seems, class diagram lacks good positioning:

@startuml
together {
class Child2
class Child1
}
together {
class Parent2
class Parent1
}
Parent1 - Parent2
(Parent1, Parent2) -- Child1
(Parent1, Parent2) -- Child2
@enduml
zhmylove commented 2 years ago

Even without grouping, compare:

@startuml
class Child2
class Child1
class Parent2
class Parent1
Parent1 - Parent2
(Parent1, Parent2) -- Child1
(Parent1, Parent2) -- Child2
@enduml

with

@startuml
class Child2
class Child1
class Parent2
class Parent1
Parent1 - Parent2
(Parent1, Parent2) -- Child1
@enduml
CuloArdido commented 2 years ago

You just select them by your own. Just see this inside example

Is that by the way the example was written I thought that those were shared identifiers or something (anyway I was modifying it to make it clearer how it works).

you can write them in any order. Plantuml will sort them out correctly.

I was talking about this: example.uyml generated diagram I found it strange that it didn't start with Person 4 and Person 5 at the top (being the first generation) so that it was then going down with the offspring of Person 4.

I don't think, we can hide "interface" objects somehow. I was just thinking about re-implementing the whole thing on a class diagram.

Maybe split could be used as shown here to make the unions without the interface, but I have no idea how to adapt it to this type of diagrams. Another option might be WBS but I'm not sure if it would work well when incest is involved.

zhmylove commented 2 years ago

I've merged #2, thank you!

As for WBS and Activity+split, they won't do, I believe :( It's due to they still try to position elements relative to single root.