Adding junctions to wires #62
Replies: 10 comments 19 replies
-
I must admit that I don't like adding nodes just to get a better visual layout. The blender approach seems interesting though the example you give highlights an issue of how neat the result would be. I think that the resulting point would need to be draggable in its own right so that the visual layout could be manually adjusted. Also, what happens when you need to reset things? That would need a solution as well. |
Beta Was this translation helpful? Give feedback.
-
interesting. I guess visually it could end up being just the size of an existing connection point (so you could grab and move it) - which would then preserve the way "our" wires curve. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hi, I came here after the discussion about Wire tie downs. As I said in that other thread, I am still on the fence about the idea. But looking at things said above, I'd like to submit some thoughts. There is a node already available which I use a lot called This is a very handy node and has a couple of (also) handy features. This is a good example where the Although the tiny example is also good if you only need the anchor point. I'd better stop here as that is all I can contribute. |
Beta Was this translation helpful? Give feedback.
-
I agree with what you say. I was only offering this as a thought. A function node would need - at a minimum - would have to have the ability to look at the message and if it needs parsing. Out of interest, what are the other contrib nodes. Though I don't think I would go through and replace if for them. |
Beta Was this translation helpful? Give feedback.
-
Would this solution allow for 2 of those junctions on the wire ? |
Beta Was this translation helpful? Give feedback.
-
I like the idea of colored wires. I would like the colors to follow through the link nodes. Maybe this could be included in version 3.0 if the wires get properties? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Not to confuse this but just an option of which I thought: It was suggested that the inputs to this new junction node allow the wires to go in at the top or bottom, and so on. Would an option be that you put the junction where needed and the wires conform to it and look nicer. Then: you move the junction node and the in and out positions move as needed for best fit. I have no idea if this would be easy but it is something that may make it nicer. |
Beta Was this translation helpful? Give feedback.
-
Junction nodes I think are very helpful for elegant wiring, but my linux architecture is mips and I can't install node.js above 12.x, so I can only install the 2.x version of nodered, is there any way to port to 2.x to make it usable? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This is an often requested feature that we have historically pushed back on. I recently stumbled over an approach that could work and wanted to get it written down and out of my head.
The wires between nodes are routed using a set of bezier curves and some custom code that tries to shape those curves to make 'nice' paths.
There are cases where a user wants to be able to manually route a wire - usually to help improve the clarify of the flow and reduce instances of wires crossing over other nodes.
Another scenario is where a user has one node wired to lots of other nodes, and wants to simplify the wiring:
The main objection we've had to doing this is that wires don't exist in the flow file as an object with properties - they exist as simple references of what any given node's outputs are connected to.
The standard approach is to add a no-op node (such as a Change node with no rules, or even install the contrib-noop node that exists solely to solve this issue). That works and has been a good enough answer so far, but is a bit of a hack - the flow has the overhead of processing that node, even if it does nothing other than pass on the message.
Blender, the 3D graphics program, has a nodes system under the covers. One of the things it allows you to do is to add a 'reroute' point on a wire:
(That also shows a handy way of adding a reroute that is shared across multiple wires)
That point can then be moved around freely.
Introducing a Junction type node
What if the reroute blob was a special type of node - a
junction
(need to check uniqueness etc of that name... other better names may exist). They can then exist in the flow file alongside all of the other nodes.Let's say we have two nodes, A and B.
In the flow file, node A has a
wires
property containing"B"
.We then add a
junction
to the wire. This exists as a new node in the flow file:Node A is now wired to
C
and C is wired toB
.There's nothing particular revolutionary here - the key thing will be how the editor and runtime handle this special type of node.
In the runtime, when a flow is starting, before the nodes are created, their wiring will be remapped as if the junction nodes don't exist. As far as Node A is concerned, it is only connected to Node B - it never knows about the junction. This removes the overhead of the existing solutions to this problem.
In the editor, the special node type can be visually distinct from 'normal' nodes. There's plenty of UI design work to be done here. For example, whether it becomes a blob like the blender example, or a compact node that still has a distinct input and output.
Anyway - just getting this out of my head so I can forget about it for now.
Beta Was this translation helpful? Give feedback.
All reactions