Skip to content

Cyclic graphs and self-connected nodes? #328

@SunakazeKun

Description

@SunakazeKun

Hello, I'm currently seeking help with a project which utilizes NodeGraphQt for flowchart editing. I thought this might be the right place to ask as one of the labels says "help wanted". In my case, I have graphs that can be cyclic. Furthermore, it's also possible that a node's output is directly connected to its input again. Now, I've noticed that NodeGraph::auto_layout_nodes causes a stack overflow in this case due to recursion. Is there maybe another way to accomplish automatically generated layouts in those cases?
Also, I've noticed that the pipe goes through the node when its output is connected with the input of the same node. Is there a way to make it go around the node?

Below is a simple example of a graph which causes the problems described above. In this case, I wasn't able to use auto_layout_nodes so I moved the nodes around manually. You can also see that the last node connects to itself again. This is a desired behavior that I need in my case:

sample_problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions